aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/llm_agent.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/aflow: ask LLM to call several tools at the same timeDmitry Vyukov2026-01-201-0/+7
| | | | This seems to help a bit with number of round-trips.
* pkg/aflow: add BadCallErrorDmitry Vyukov2026-01-201-10/+11
| | | | | | | | | | The error allows tools to communicate that an error is not an infrastructure error that must fail the whole workflow, but rather a bad tool invocation by an LLM (e.g. asking for a non-existent file contents). Previously in the codesearcher tool we used a separate Missing bool to communicate that. With the error everything just becomes cleaner and nicer. The errors also allows all other tools to communicate any errors to the LLM when the normal results cannot be provided and don't make sense.
* pkg/aflow: handle common LLM mis-behaviors wrt tool callingDmitry Vyukov2026-01-201-10/+35
| | | | | | | | | | | | | Gracefully handle (reply to LLM with error): - incorrect tool name - incorrect tool arg type - missing tool arg Silently handle: - more than one call to set-results - excessive tool args Fixes #6604
* pkg/aflow: handle model quota errorsDmitry Vyukov2026-01-201-1/+8
| | | | | | | | Detect model quota violations (assumed to be RPD). Make syz-agent not request jobs that use the model until the next quota reset time. Fixes #6573
* pkg/aflow: make LLM model per-agent rather than per-flowDmitry Vyukov2026-01-201-3/+16
| | | | | | Having LLM model per-agent is even more flexible than per-flow. We can have some more complex tasks during patch generation with the most elaborate model, but also some simpler ones with less elaborate models.
* pkg/aflow: retry LLM requests on transient errorsDmitry Vyukov2026-01-191-1/+20
| | | | Update #6573
* pkg/aflow: add ability to generate several candidate replies for LLM agentsDmitry Vyukov2026-01-191-17/+79
| | | | | | | | | Add LLMAgent.Candidates parameter. If set to a value N>1, then the agent is invoked N times, and all outputs become slices. The results can be later aggregated by another agent, as shown in the test.
* pkg/aflow: expect CitationMetadataDmitry Vyukov2026-01-151-3/+3
| | | | | | | | | | | | | | CitationMetadata may be present in replies sometimes. CitationMetadata is a specific field in the Gemini API's response object that alerts you when the model has directly quoted or closely derived content from a specific source, such as a book, website, or open-source code repository. We've got the following error: syz-agent: unexpected reply fields ({Content:0xc0058eb4a0 CitationMetadata:0xc0094009a8 FinishMessage: TokenCount:0 FinishReason:STOP AvgLogprobs:0 GroundingMetadata:<nil> Index:0 LogprobsResult:<nil> SafetyRatings:[] URLContextMetadata:<nil>})
* pkg/aflow: add package for agentic workflowsDmitry Vyukov2026-01-091-0/+254