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 action;
12mod approval;
13mod checkpoint;
14mod execution;
15mod guard;
16mod interaction;
17mod message;
18mod notify;
19mod plan;
20mod run_state;
21mod session;
22mod tool;
23
24pub use action::{Action, ActionFormat, ActionOutcome, BatchStatus, Observation, ObservationEvent};
25pub use approval::{ApprovalDecision, ApprovalRequest, RiskLevel};
26pub use checkpoint::{
27    CHECKPOINT_VERSION, CheckpointData, CheckpointStep, MigrationKind, MigrationSource,
28    ToolResultData,
29};
30pub use execution::{FinishReason, RunOutcome};
31pub use guard::{GuardCtx, GuardDecision};
32pub use interaction::{AskAnswer, AskOption};
33pub use message::MessageRole;
34pub use notify::{Notice, NoticeKind};
35pub use plan::{PlanItem, PlanStepStatus, UpdatePlanArgs};
36pub use run_state::RunState;
37pub use session::SessionId;
38pub use tool::{
39    ActivationContext, Content, ToolExposure, ToolMetadata, content_details, content_images,
40    content_text,
41};