Expand description
Agent base traits and executor implementation.
Structs§
- Agent
Executor - Agent executor.
- Budget
Config - Hard budget for the agent control loop. A
Nonefield means that item is unlimited. - Compaction
Config - Compaction configuration: trigger + strategy + safety floor.
- File
Memory Tool - An
Arc<dyn BaseTool>adapter over aFileMemoryStore, exposing the store’s ops as a single string-in/string-out tool for the agent loop.
Enums§
- Agent
Error - Agent error types.
- Budget
Exceeded - Details of a budget over-limit.
- Compaction
Strategy - How to compact. All strategies drop the oldest turns and keep at least
CompactionConfig::min_recent_turnsrecent ones. - Compaction
Trigger - When to compact. Checked before every
plan()round.
Traits§
- Base
Agent - Base Agent trait.
Functions§
- estimate_
step_ tokens - Token estimate for one step: ~4 bytes per token over the serialized step
(tool name + input + observation). Providers that do not report per-step
usage leave no better signal — this mirrors the byte-length fallback used
elsewhere (
TokenTrackingLLM,get_num_tokens). - mount
- Convenience: builds and mounts as a boxed
BaseTool(Errwhen the root dir can’t be set up).