Expand description
Pure type definitions for the agent-base runtime.
This crate contains data structures and enums with zero runtime dependencies — no async, no I/O, no trait objects. It exists so that downstream crates (SDKs, protocol layers, tool definitions) can depend on just the types without pulling in the full agent-base runtime.
agent-base re-exports everything from this crate, so existing
use agent_base::Content continues to work.
Structs§
- Activation
Context - Context passed to
Tool::should_activatefor Deferred tools. - Approval
Request - Checkpoint
Data - Guard
Ctx - Guard context information — built by runtime, passed to guard.
- Plan
Item - A single step in a lightweight plan checklist.
- Session
Id - Unique identifier for an agent session.
- Tool
Metadata - Machine-readable metadata for a registered tool — origin, version, and runtime requirements in a stable shape consumers can inspect without parsing the LLM-facing definition JSON.
- Tool
Result Data - Update
Plan Args - Arguments for the
update_plantool.
Enums§
- Approval
Decision - Checkpoint
Step - Content
- Structured content returned by a tool, aligned with the MCP
contentarray shape (no envelope, no orchestration/failure/truncation semantics). - Finish
Reason - Semantic finish reason, replacing scattered
Option<String>matching. - Guard
Decision - Guard decision — returned by guard, executed by base loop.
- Message
Role - Plan
Step Status - Lightweight plan step status — display-only, no execution semantics.
- Risk
Level - RunOutcome
- The outcome of an Agent turn or run.
- Tool
Exposure - Visibility level of a tool to the LLM model.
Functions§
- content_
text - Join the textual portion of tool output into a single string for display
and session history. Non-text variants (e.g.
Image) are skipped.