Skip to main content

agent_types/
lib.rs

1//! Pure type definitions for the agent-base runtime.
2//!
3//! This crate contains data structures and enums with **zero runtime
4//! dependencies** — no async, no I/O, no trait objects. It exists so that
5//! downstream crates (SDKs, protocol layers, tool definitions) can depend on
6//! just the types without pulling in the full agent-base runtime.
7//!
8//! agent-base re-exports everything from this crate, so existing
9//! `use agent_base::Content` continues to work.
10
11mod approval;
12mod checkpoint;
13mod execution;
14mod guard;
15mod message;
16mod plan;
17mod session;
18mod tool;
19
20pub use approval::{ApprovalDecision, ApprovalRequest, RiskLevel};
21pub use checkpoint::{CheckpointData, CheckpointStep, ToolResultData};
22pub use execution::{FinishReason, RunOutcome};
23pub use guard::{GuardCtx, GuardDecision};
24pub use message::MessageRole;
25pub use plan::{PlanItem, PlanStepStatus, UpdatePlanArgs};
26pub use session::SessionId;
27pub use tool::{ActivationContext, Content, ToolExposure, ToolMetadata, content_details, content_text};