children | ReactNode | — | The prompt to send to Amp |
mode | 'smart' | 'rush' | 'smart' | smart uses SOTA models; rush is faster/cheaper for small tasks |
maxTurns | number | — | Maximum number of agentic loops |
systemPrompt | string | — | System prompt for the agent |
permissionMode | 'default' | 'acceptEdits' | 'bypassPermissions' | 'default' | Permission mode for file operations |
timeout | number | — | Timeout in milliseconds |
cwd | string | — | Working directory for the agent |
continueThread | boolean | — | Continue from previous thread |
resumeThread | string | — | Resume a specific thread by ID |
labels | string[] | — | Labels to attach to the thread |
validate | (result: AgentResult) => boolean | Promise<boolean> | — | Validate result before accepting |
retryOnValidationFailure | boolean | — | Retry if validation fails |
maxRetries | number | 3 | Maximum retry attempts |
stopConditions | StopCondition[] | — | Conditions that will stop the agent |
middleware | SmithersMiddleware[] | — | Middleware applied to this execution |
tailLogCount | number | 10 | Number of tail log entries to display during execution |
tailLogLines | number | 10 | Number of lines to show per tail log entry |
reportingEnabled | boolean | true | Enable database reporting for this agent |
recordStreamEvents | boolean | true when reportingEnabled | Record stream events to the database |
onFinished | (result: AgentResult) => void | — | Called when agent finishes successfully |
onError | (error: Error) => void | — | Called when agent encounters an error |
onProgress | (message: string) => void | — | Called for progress updates |
onToolCall | (tool: string, input: any) => void | — | Called when agent makes a tool call |
onStreamPart | (part: SmithersStreamPart) => void | — | Called for typed stream events (when enabled) |