Skip to content

Conversation

@dvyukov
Copy link
Collaborator

@dvyukov dvyukov commented Oct 27, 2025

Add infrastructure for defining LLM agent workflows. The workflows can be executed using the tools/syz-agent tool from the command line, or programmatically.

@dvyukov
Copy link
Collaborator Author

dvyukov commented Oct 27, 2025

@sirdarckcat fyi

@dvyukov dvyukov changed the title pkg/agent: add package pkg/aflow: add package Nov 11, 2025
@dvyukov
Copy link
Collaborator Author

dvyukov commented Nov 11, 2025

cc @FlorentRevest moving the discussion from the commit to here:

Trying to build this, I added the following block to the root Makefile:

diff --git a/Makefile b/Makefile
index 1e8948240..cf7b66a3a 100644
--- a/Makefile
+++ b/Makefile
@@ -178,6 +178,9 @@ repro: descriptions
 mutate: descriptions
        GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-mutate github.com/google/syzkaller/tools/syz-mutate
 
+agent: descriptions
+       GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-agent github.com/google/syzkaller/tools/syz-agent
+
 diff: descriptions target
        GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-diff github.com/google/syzkaller/tools/syz-diff
but make agent quickly runs into:

pkg/agent/agent.go:13:2: google.golang.org/adk@v0.0.0-20251024065725-37e04037159e: invalid version: git ls-remote -q origin in /usr/local/google/home/revest/go/pkg/mod/cache/vcs/f142e901226cb24eb9f75fff006ce9a90a64a51a1daa660c09b28dac4d5d0490: exit status 128:
	fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If I skip this line instead, I get various

pkg/agent/agent.go:13:2: no required module provides package google.golang.org/adk/agent; to add it:
Am I missing something here ?

I also hit this initially.
But now I tried this and it worked:

test$ go mod init example.com/m/v2
test$ go get google.golang.org/adk/agent

Perhaps something was fixed somewhere meanwhile.

We can add a Makefile rule, but locally I just use:

go install ./tools/syz-agent && syz-agent -workflow=patching -large-model=false -input=input.json -workdir=/tmp/syz-agent/

@dvyukov dvyukov force-pushed the dyvukov-patching branch 7 times, most recently from d8aaa95 to 41ca2f4 Compare November 18, 2025 09:43
@FlorentRevest
Copy link
Collaborator

pkg/agent/agent.go:13:2: no required module provides package google.golang.org/adk/agent; to add it:
Am I missing something here ?

I also hit this initially. But now I tried this and it worked:

test$ go mod init example.com/m/v2
test$ go get google.golang.org/adk/agent

Perhaps something was fixed somewhere meanwhile.

Looks like it yes!

We can add a Makefile rule, but locally I just use:

go install ./tools/syz-agent && syz-agent -workflow=patching -large-model=false -input=input.json -workdir=/tmp/syz-agent/

Ah nice, thanks!

@dvyukov dvyukov force-pushed the dyvukov-patching branch 5 times, most recently from dc66c72 to 53e8c44 Compare November 21, 2025 17:30
@dvyukov dvyukov force-pushed the dyvukov-patching branch 6 times, most recently from be8490e to 774f60b Compare December 22, 2025 10:49
@dvyukov dvyukov changed the title pkg/aflow: add package AI patch generation Dec 22, 2025
@dvyukov dvyukov changed the title AI patch generation ✨ AI patch generation Dec 22, 2025
Copy link
Collaborator

@a-nogikh a-nogikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I suggest that we do a follow-up change series to support K8S environment before the actual deployment on prod.

dvyukov added 12 commits January 9, 2026 12:36
DiskUsage returns total recursive disk usage of the dir (similar to du -s).
syz-aflow tool can be used to invoke any agentic workflow registered with pkg/aflow.
For example, to run the patching workflow use:
  go run ./tools/syz-aflow -input=input.json -download-bug=d8fd35fa6177afa8c92b
  go run ./tools/syz-aflow -input=input.json -workflow=patching-baseline -workdir=workdir
Add server for running agentic workflows as part of syzbot.
The architecture and use are similar to that of syz-ci.
@dvyukov dvyukov requested a review from a-nogikh January 9, 2026 12:34
@dvyukov dvyukov enabled auto-merge January 9, 2026 12:34
@dvyukov dvyukov added this pull request to the merge queue Jan 9, 2026
Merged via the queue into google:master with commit 5335465 Jan 9, 2026
20 checks passed
@dvyukov dvyukov added the AI patching Feature requests and bugs related to AI-based kernel bug fix generation. label Jan 15, 2026
@blackgnezdo
Copy link
Collaborator

ce25ef7 breaks on BSDs with:

--- FAIL: TestDiskUsage (0.01s)
    osutil_test.go:165: got usage 512 when expected (1, 5120)
    osutil_test.go:165: got usage 1024 when expected (513, 5632)
    osutil_test.go:165: got usage 2048 when expected (2048, 6144)
    osutil_test.go:167: bad usage 2048, expect (2048, 6144)
FAIL
coverage: 42.2% of statements
FAIL	github.com/google/syzkaller/pkg/osutil	0.893s

FreeBSD
OpenBSD
@dvyukov PTAL

@dvyukov
Copy link
Collaborator Author

dvyukov commented Jan 23, 2026

👋
Sent #6663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI patching Feature requests and bugs related to AI-based kernel bug fix generation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants