Expand description
Agent-loop graph and runtime executor primitives.
Re-exports§
pub use agent::Agent;pub use agent::AgentEndStrategy;pub use agent::AgentError;pub use agent::AgentInput;pub use agent::AgentOverride;pub use agent::AgentResult;pub use agent::AgentRuntimePolicy;pub use agent::AgentToolExecutionMode;pub use capability::AgentCapability;pub use capability::CapabilityBundle;pub use capability::CapabilityError;pub use capability::CapabilityId;pub use capability::CapabilityOrderError;pub use capability::CapabilityOrdering;pub use capability::CapabilityResult;pub use capability::CapabilitySpec;pub use capability::RUNTIME_CONTEXT_CAPABILITY_ID;pub use capability::RetryEventKind;pub use capability::StaticCapabilityBundle;pub use capability::resolve_capability_order;pub use dependency_assembly::ToolDependencyAssembly;pub use dependency_assembly::assemble_tool_dependencies_for_name;pub use direct::DirectModelRequest;pub use direct::model_request;pub use direct::model_request_stream;pub use direct::tool_call;pub use executor::DirectAgentExecutor;pub use executor::DynAgentExecutor;pub use goal::GOAL_CAPABILITY_ID;pub use goal::GOAL_COMPLETE_EVENT_KIND;pub use goal::GOAL_COMPLETE_MARKER;pub use goal::GOAL_ITERATION_EVENT_KIND;pub use goal::GoalCapability;pub use goal::GoalCompleteReason;pub use goal::GoalRunOptions;pub use goal::build_goal_check_prompt;pub use goal::build_post_restore_goal_audit_prompt;pub use goal::has_completion_marker;pub use graph::AgentGraphStep;pub use graph::AgentGraphTrace;pub use graph::AgentNode;pub use graph::GraphDecision;pub use graph::GraphError;pub use graph::inspect_graph;pub use graph::inspect_next_node;pub use graph::next_node;pub use instructions::DynDynamicInstruction;pub use instructions::DynamicInstruction;pub use instructions::DynamicInstructionError;pub use instructions::DynamicInstructionResult;pub use instructions::FunctionDynamicInstruction;pub use iteration::AgentIterResult;pub use iteration::AgentIterationKind;pub use iteration::AgentIterationStep;pub use iteration::AgentIterationTrace;pub use output::DynOutputFunction;pub use output::FunctionOutputFunction;pub use output::FunctionOutputValidator;pub use output::OutputFunction;pub use output::OutputFunctionContext;pub use output::OutputFunctionDefinition;pub use output::OutputMedia;pub use output::OutputPolicy;pub use output::OutputSchema;pub use output::OutputValidationError;pub use output::OutputValidationResult;pub use output::OutputValidator;pub use output::OutputValue;pub use output::SchemaOutputFunction;pub use output::parse_output;pub use retry_recovery::DEFAULT_MODEL_ERROR_RESUME_PROMPT;pub use retry_recovery::RetryRecoveryResult;pub use retry_recovery::heal_context_overflow_history;pub use retry_recovery::heal_openai_item_reference_history;pub use retry_recovery::recover_retry_message_history;pub use run::AgentRunResult;pub use stream::AgentStreamResult;pub use trace::AdapterTraceRecorder;pub use trace::DynTraceRecorder;pub use trace::InMemoryTraceRecorder;pub use trace::NoopTraceRecorder;pub use trace::OtelGenAiSpan;pub use trace::PolicyTraceRecorder;pub use trace::RecordedSpan;pub use trace::SpanEvent;pub use trace::SpanHandle;pub use trace::SpanKind;pub use trace::SpanSpec;pub use trace::SpanStatus;pub use trace::TraceDebugPolicy;pub use trace::TraceLevel;pub use trace::TraceRecorder;pub use trace::TraceRecorderHandle;pub use trace::TraceRedactionPolicy;pub use trace::export_otel_gen_ai_spans;
Modules§
- agent
- Bare agent runtime.
- capability
- Capability hooks and bundles for the bare agent runtime.
- dependency_
assembly - Shared least-authority tool dependency assembly.
- direct
- Direct model and tool execution helpers.
- executor
- Runtime checkpoint emission helpers and compatibility exports.
- goal
- Runtime goal-mode output validator capability.
- graph
- Deterministic agent-loop graph transitions.
- instructions
- Dynamic instructions for agent runs.
- iteration
- Run iteration inspection records derived from typed stream events.
- output
- Structured output schemas and validators for agent runs.
- retry_
recovery - Error-aware retry recovery for model request retries.
- run
- Runtime run result types and compatibility exports for checkpointable state.
- stream
- Runtime stream-result type and compatibility exports for raw stream protocol records.
- trace
- Runtime trace recording contract and deterministic in-memory recorder.
Structs§
- Agent
Checkpoint - Serializable checkpoint emitted at a durable execution boundary.
- Agent
Resume Cursor - Compact cursor values durable stores use to resume and audit a run.
- Agent
Resume Evidence - Stable resume evidence for durable service runtimes and external session stores.
- Agent
RunState - Checkpointable state shared with durability layers. Checkpointable state owned by the agent graph loop.
- Agent
Sideband Event - Typed view of an application sideband event carried by
AgentStreamEvent::Custom. - Agent
Stream Record - Sequenced stream event record.
- Agent
Stream Sink - In-memory sink used by tools that need to merge child stream records into the parent stream.
- Agent
Stream Source - Source attribution for records merged from nested agent runs.
- Part
Delta - Part delta event.
- PartEnd
- Part end event.
- Part
Start - Part start event.
Enums§
- Agent
Execution Decision - Decision returned by an execution checkpoint handler.
- Agent
Execution Node - Named execution boundary in the agent loop and durable stream protocol.
- Agent
Executor Error - Executor failure.
- Agent
Sideband Event Category - Stable category for context sideband events that are bridged into the runtime stream.
- Agent
Stream Event - Typed event emitted by the agent runtime while a run progresses.
- Agent
Stream Source Kind - Origin type for a stream record emitted by a nested runtime component.
- Model
Response Stream Event - Stream event emitted by model adapters.
- RunStatus
- Shared lifecycle status for an admitted runtime execution. Lifecycle of an admitted runtime execution.
Traits§
- Agent
Executor - Callback contract for persistence, interruption, and durable scheduling.