children | ReactNode | - | Prompt for the agent |
mode | 'smart' | 'rush' | 'smart' | Agent mode |
maxTurns | number | - | Max turns |
systemPrompt | string | - | System instructions |
permissionMode | 'default' | 'acceptEdits' | 'bypassPermissions' | 'default' | File permission policy |
cwd | string | - | Working directory |
timeout | number | - | Timeout in ms |
continueThread | boolean | - | Continue previous thread |
resumeThread | string | - | Resume thread by id |
labels | string[] | - | Thread labels |
onFinished | (result: AgentResult) => void | - | Success callback |
onError | (error: Error) => void | - | Error callback |
onProgress | (message: string) => void | - | Progress callback |
onToolCall | (tool: string, input: any) => void | - | Tool call callback |
onStreamPart | (part: SmithersStreamPart) => void | - | Typed stream events |
reportingEnabled | boolean | true | DB reporting |
maxRetries | number | 3 | Retry attempts |
validate | (result: AgentResult) => boolean | Promise<boolean> | - | Custom validation function |
retryOnValidationFailure | boolean | false | Retry on validation failure |
stopConditions | StopCondition[] | - | Conditions for early termination |
tailLogCount | number | 10 | Tail log entries |
tailLogLines | number | 10 | Lines per entry |
middleware | SmithersMiddleware[] | - | Execution middleware |
recordStreamEvents | boolean | true (when reportingEnabled) | Record stream events to DB |