aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow
Commit message (Collapse)AuthorAgeFilesLines
* syz-agent: systematically show verbose error messagesDmitry Vyukov7 days3-5/+4
| | | | | | | | | | | | | Currently we added custom code to kernel build action, and few others to expose verbose errors from executed binaries (notably make). But lots of other binary executions missing this logic, e.g. for git failure we currently see unuseful: failed to run ["git" "fetch" "--force" "--tags" exit status 128 Instead of adding more and more custom code to do the same, remove the custom code and always add verbose output in syz-agent and tools/syz-aflow.
* pkg/aflow/tool/grepper: disable tests on non-linuxDmitry Vyukov7 days1-0/+3
| | | | | | | | | The tests fail on OpenBSD with: expected: "bad expression: fatal: command line, 'bad expression (': Unmatched ( or \\(" actual : "bad expression: fatal: command line, 'bad expression (': parentheses not balanced" Disable the tests on non-linux for now.
* pkg/aflow: return syzkaller program as outputAlexander Potapenko7 days1-3/+1
| | | | | Requesting to return the program as one of the agent's outputs enforces its structure and prevents LLM from using garbage formatting.
* pkg/aflow: ensure we don't register MCP tools with duplicate namesDmitry Vyukov7 days5-4/+40
| | | | | | | If we have duplicate names, then only one of the duplicates will be used at random. Add a check that we don't have duplicate names. Currently it's only "crash-reproducer" (both action and a tool). Also ignore "set-results" tool, and all tools created in tests.
* pkg/aflow: handle more genai errorsDmitry Vyukov7 days2-6/+41
| | | | Fixes #6897
* pkg/aflow: add Flow.Consts instead of ProvideDmitry Vyukov8 days12-64/+133
| | | | | | | | | There is no point in using Provide more than once, and anywhere besides the first action of a flow. So it's not really an action, but more of a flow property. Add Flow.Consts field to handle this case better. Also provide slightly less verbose syntax by using a map instead of a struct, and add tests.
* pkg/aflow/flow/repro: give agent relevant docsDmitry Vyukov8 days1-2/+17
| | | | | | | LLM seems to have some knowledge about syzkaller program syntax, but presumably it's still useful to give it all details about syntax. Update #6878
* pkg/aflow/flow/repro: give agent codesearch toolsDmitry Vyukov8 days1-5/+12
| | | | | | | | | | It's useful to be able to look at the kernel source code when creating a reproducer for a bug. So give the agent codesearch tools. Also slightly refine prompt wording. Update #6878
* pkg/aflow: instructions for implementing tools in GEMINI.mdAlexander Potapenko8 days1-0/+5
| | | | | | | Provide some instructions on how tools should be named, implemented and registered. Update #6878
* pkg/aflow/flow/repro: add `read-description` to the flowAlexander Potapenko8 days1-1/+4
| | | | | | Teach the repro flow about the `read-description` tool. Update #6878
* pkg/aflow/tool/syzlang: add the `read-description` toolAlexander Potapenko8 days2-0/+34
| | | | | | | | | | | Adds a tool that allows an agent to read the content of syzlang description files (e.g., `sys.txt`, `socket.txt`). Providing the ability to fetch exact system call definitions helps reasoning models generate correct and compiling programs from crash reports. Update #6878
* pkg/aflow: add Reproduce toolTaras Madan8 days3-0/+88
|
* pkg/aflow/action/crash: collect test coverageDmitry Vyukov8 days2-35/+86
| | | | | | | Collect code coverage for test programs. This is likley to be needed for #6878 and seed generation workflow. For now it's not wired into any workflow/tool and is not tested. But this should provide most of the plumbing to wire it up.
* pkg/aflow: add GEMINI.mdTaras Madan11 days1-0/+64
|
* pkg/aflow: add Tools functionDmitry Vyukov12 days4-5/+22
| | | | | | When we combine tool sets for agents, there is always a protential problem with aliasing existing slices and introducing subtle bugs. Add Tools function that can append tool/tool sets w/o aliasing problem.
* pkg/aflow/flow/repro: provide proper syzkaller commitDmitry Vyukov12 days1-5/+10
| | | | Update #6878
* pkg/aflow/tool/syzlang: provide list of description filesDmitry Vyukov12 days4-0/+49
| | | | Update #6878
* pkg/aflow: repro workflow skeletonTaras Madan12 days3-0/+65
|
* pkg/aflow: delete SyzkallerCommitTaras Madan14 days3-30/+26
| | | | It is not used.
* pkg/aflow: add the repro workflow constAleksandr Nogikh2026-02-261-0/+1
| | | | | There's no workflow implementation, but having the const there will let us implement the dashboard side in parallel.
* dashboard/app: apply actionable label after AI moderationDmitry Vyukov2026-02-242-7/+7
| | | | | | This allows auto-upstreamming of actionable bugs. Fixes #6779
* pkg/aflow: fix handling of optional tool argumentsDmitry Vyukov2026-02-194-1/+227
| | | | | | | Currently we crash on nil deref, if LLM specifies explicit 'nil' for an optional (pointer) argument. Handle such cases properly. Fixes #6811
* pkg/aflow/tool/codesearcher: add end-to-end testsDmitry Vyukov2026-02-192-16/+69
| | | | Update #6811
* syz-agent: add MCP serverDmitry Vyukov2026-02-183-3/+79
| | | | | | The MCP server exports all aflow tools (and actions as tools) we have. Fixes #6763
* pkg/aflow: export Context.CloseDmitry Vyukov2026-02-183-5/+5
| | | | This will be needed to an MCP server.
* pkg/aflow: factor out sliding window logicDmitry Vyukov2026-02-101-43/+44
| | | | | Linter started complaining about too high cyclomatic complexity. Split the chat function.
* pkg/aflow: make it possible for LLMAgent to return only structured outputsDmitry Vyukov2026-02-104-2/+183
| | | | | In some cases there may be not final text reply, only some structured outputs (e.g. some bool). Don't require final reply, if structured outputs are specified.
* pkg/aflow: fix structured outputs handlingDmitry Vyukov2026-02-104-1/+351
| | | | | | If LLM calls set-results tool to set structured results, and then calls another unrelated tool, currently we lose structured results (overwrite with nil). Don't do that, keep structured results.
* pkg/aflow: simplify TestSummaryWindow testDmitry Vyukov2026-02-101-19/+14
| | | | We don't a separate var for agent, nor the Pipeline for 1 agent.
* pkg/aflow/tool/grepper: fix grep invocationDmitry Vyukov2026-02-062-8/+21
| | | | | If LLM searches for "->", grep considered it as a flag and failed. Add "--" before the expression to fix such cases.
* syz-agent: wipe codesearch binaryDmitry Vyukov2026-02-064-22/+18
| | | | Now it's compiled into the syz-agent binary itself.
* tools/clang: compile clang tools into the binaryDmitry Vyukov2026-02-061-1/+2
| | | | | | | | | | | | | | | | | | Compiled clang tools into Go binaries using cgo. This significantly simplifies building and deployment. This also enables unit testing of clang tools. Now raw go test for clang tools will build them, run, and verify output. Each clang tool is still started as a subprocess. I've experimented with running them in-process, but this makes stdout/stderr interception extremly complicated, and it seems that clang tools still use unsynchronized global state, which breaks when invoked multiple times. Subprocesses also make it safer in the face of potential memory leaks, or memory corruptions in clang tools. Fixes #6645
* pkg/aflow/action/crash: handle boot errors betterDmitry Vyukov2026-02-052-7/+34
| | | | Provide better errors messages on boot errors.
* pkg/aflow/flow/assessment: mention adjacent races in the KCSAN promptDmitry Vyukov2026-02-031-0/+14
| | | | Update #6578
* pkg/aflow/tool/grepper: add the toolDmitry Vyukov2026-02-027-13/+192
| | | | | | Add a tool that executes git grep with the given expression. It can handle long tail of cases that codesearcher can't handle, while still providing less output than reading whole files.
* pkg/aflow/action/crash: clang-format the patch diffDmitry Vyukov2026-02-021-1/+37
| | | | Fixes #6671
* pkg/aflow/flow/patching: fix getting list of recent commitsDmitry Vyukov2026-02-023-11/+21
| | | | | We need to run git log in the master git repo b/c out KernelSrc/KernelScratchSrc are shallow checkouts that don't have history.
* pkg/aflow: abstract away LLM temperatureDmitry Vyukov2026-02-0215-44/+59
| | | | | | | | | | Introduce abstract "task type" for LLM agents instead of specifying temperature explicitly for each agent. This has 2 advantages: - we don't hardcode it everywhere, and can change centrally as our understanding of the right temperature evolves - we can control other LLM parameters (topn/topk) using task type as well Update #6576
* pkg/aflow/flow/patching: use recent commit subjectsDmitry Vyukov2026-01-318-11/+163
| | | | | | | Give LLM the recent commit subjects when it generates description, so that it can use the same style. Add infrastrcuture to write end-to-end action tests to test it.
* syz-agent: don't send poll requests w/o workflowsDmitry Vyukov2026-01-301-0/+3
| | | | This will cause dashboard to log errors.
* pkg/aflow: add a TODODmitry Vyukov2026-01-301-0/+4
|
* pkg/aflow: fix role in test repliesDmitry Vyukov2026-01-302-10/+10
|
* pkg/aflow: refactor the LLM summarization testDmitry Vyukov2026-01-304-72/+213
| | | | | | | | | It's very inconvinient to hardcode exact LLM replies in this test, because it's hard to understand when exactly it will be asked to summarize. It's easy to make a bug in the test, and provide summary reply when it wasn't asked to. Instead support proving full generateContent callback, and just model what an LLM would do -- provide summary only when it's asked to.
* pkg/aflow: reduce size of golden test filesDmitry Vyukov2026-01-306-1263/+12
| | | | Don't memorize repeated request configs.
* pkg/aflow/flow/patching: improve promptsDmitry Vyukov2026-01-302-5/+36
| | | | | More instructions slightly more concrete, and add details about some bug types.
* pkg/aflow/flow/patching: move Outputs type to ai packagesDmitry Vyukov2026-01-303-24/+31
| | | | | | Move it so that it can be accessed by the dashboard as well. Add kernel branch to output (it's needed for gerrit), provide actual kernel commit hash instead of tag name.
* pkg/aflow: adding sliding window summary featureYulong Zhang2026-01-305-47/+919
| | | | | | | | | This adds a flow feature (and creates a new flow using it) called "sliding window summary". It works by asking the AI to always summarize the latest knowledge, and then we toss the old messages if they fall outside the context sliding window.
* pkg/aflow/action/crash: cache patch testing resultDmitry Vyukov2026-01-291-25/+42
| | | | | | | | | This caching is very handy when testing some dashboard features related to stating jobs, or handling jobs completion, or testing changes in the last steps of patching workflow. Without caching each testing takes 10 mins, with caching the whole workflow completes almost immidiatly .
* pkg/aflow/flow/patching: find maintainers for patchesDmitry Vyukov2026-01-292-0/+49
| | | | Provide base kernel repo/commit and recipients (to/cc) for patches.
* pkg/aflow: add timeout for LLM queriesDmitry Vyukov2026-01-281-1/+10
| | | | | Sometimes LLM requests just hang dead for tens of minutes, abort them after 10 minutes and retry.