feat: add retryOnParsingError method to BaseAgent for enhanced error handling

This commit is contained in:
extio-de
2026-06-01 22:28:30 +02:00
parent 2083d4f33f
commit e1a70f5397
2 changed files with 100 additions and 85 deletions

View File

@@ -870,6 +870,7 @@ final var blogPostAgent = new Agent(
| `postProcess(context)` | Runs after completion. | no-op |
| `merge(contexts)` | Merges split contexts after branching. | `null` |
| `chooseNextAgent(context)` | Selects the next agent or ends the flow. Required. | none |
| `retryOnParsingError(context)` | When `true`, triggers an outer retry loop that resets both parse attempts and tool call rounds after a parsing failure, allowing the agent to request a fresh completion from scratch. The conversation can be modified before retrying. | `false` |
### Agent Tool Calling