Skip to main content

Module executor

Module executor 

Source
Expand description

Agent base traits and executor implementation.

Structs§

AgentExecutor
Agent executor.
BudgetConfig
Hard budget for the agent control loop. A None field means that item is unlimited.
CompactionConfig
Compaction configuration: trigger + strategy + safety floor.
FileMemoryTool
An Arc<dyn BaseTool> adapter over a FileMemoryStore, exposing the store’s ops as a single string-in/string-out tool for the agent loop.

Enums§

AgentError
Agent error types.
BudgetExceeded
Details of a budget over-limit.
CompactionStrategy
How to compact. All strategies drop the oldest turns and keep at least CompactionConfig::min_recent_turns recent ones.
CompactionTrigger
When to compact. Checked before every plan() round.

Traits§

BaseAgent
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 (Err when the root dir can’t be set up).