mirror of
https://github.com/trycua/computer.git
synced 2026-01-06 05:20:02 -06:00
Clarify lifecycle and built-in callbacks
This commit is contained in:
@@ -42,11 +42,4 @@ Called when responses are received from agent loop.
|
||||
- `on_screenshot(screenshot, name)` - When screenshots are taken
|
||||
|
||||
### 10. `on_run_end(kwargs, old_items, new_items)`
|
||||
Called when agent run completes. Finalize tracking, save trajectories.
|
||||
|
||||
## Built-in Callbacks
|
||||
|
||||
- **ImageRetentionCallback**: Limits recent images in context
|
||||
- **BudgetManagerCallback**: Stops execution when budget exceeded
|
||||
- **TrajectorySaverCallback**: Saves conversation trajectories
|
||||
- **LoggingCallback**: Logs agent activities
|
||||
Called when agent run completes. Finalize tracking, save trajectories.
|
||||
@@ -4,11 +4,12 @@ title: Callbacks
|
||||
|
||||
Callbacks in the Agent SDK provide hooks into the agent's lifecycle, allowing for custom functionality to be executed at various stages of an agent's run. They enable extensibility by allowing developers to integrate their own logic for tasks such as logging, cost management, and data anonymization.
|
||||
|
||||
This section details the various callbacks available in the Agent SDK.
|
||||
The callback lifecycle is described in [Agent Lifecycle](callbacks/agent-lifecycle).
|
||||
|
||||
## Available Callbacks
|
||||
## Built-in Callbacks
|
||||
|
||||
- [Cost Saving](callbacks/cost-saving)
|
||||
- [Logging](callbacks/logging)
|
||||
- [BudgetManagerCallback](callbacks/cost-saving): Stops execution when budget exceeded
|
||||
- [LoggingCallback](callbacks/trajectories): Logs agent activities
|
||||
- **ImageRetentionCallback**: Limits recent images in context
|
||||
- **TrajectorySaverCallback**: Saves conversation trajectories
|
||||
- [PII Anonymization](callbacks/pii-anonymization)
|
||||
- [Trajectories](callbacks/trajectories)
|
||||
Reference in New Issue
Block a user