Expand description
Agent primitives — the surface a user of Odori programs against.
The primitive set is borrowed deliberately from the OpenAI Agents SDK so
the shape is already familiar; the substrate underneath is what Odori
adds. One run is one workflow (run::AgentRun); each harness turn the
loop takes is one activity (run::TurnActivities); the loop itself is
therefore replayable history, and a crashed run resumes from its last
completed turn.
agent::Agent— a named configuration: instructions, provider binding, tools, guardrails, output shape.runner::Runner— the client surface: start runs, follow conversations, fetch typed outputs.tool::Tool— a typed, framework-owned capability executed durably through the mcp-bridge.handoff::Handoff— a model-visible delegation to another agent’s child workflow.guardrail::Guardrail— deterministic input/output validation, plusguardrail::RunBudgetturn/token/cost caps enforced by the run loop.output::AgentOutput— typed outputs: a run produces a value, not a string.provider::Provider— the frozen seam to model backends; the unit is one harness turn.
Nothing here talks to a model vendor directly: providers live in
odori-providers, and the embedded engine plus worker bootstrap live in
odori-engine.
Re-exports§
pub use agent::Agent;pub use agent::AgentRegistry;pub use guardrail::Guardrail;pub use guardrail::GuardrailVerdict;pub use guardrail::RunBudget;pub use handoff::Handoff;pub use handoff::HandoffContext;pub use invocation::InvocationId;pub use invocation::InvocationRegistry;pub use invocation::ToolCallResult;pub use output::AgentOutput;pub use output::Json;pub use provider::Effort;pub use provider::Provider;pub use provider::ProviderLimitStatus;pub use provider::TurnError;pub use provider::TurnEventSink;pub use provider::TurnOutcome;pub use provider::TurnRequest;pub use run::AgentRun;pub use run::BudgetCap;pub use run::Providers;pub use run::RunConfig;pub use run::RunEnd;pub use run::RunOutput;pub use run::RunUsage;pub use run::TurnActivities;pub use run::TurnRecord;pub use runner::Conversation;pub use runner::Runner;pub use runner::RunnerError;pub use runner::register_odori;pub use tool::Tool;pub use tool::ToolFailure;pub use tool::ToolPolicy;
Modules§
- agent
- The
Agentprimitive and the worker-side registry. - guardrail
- The
Guardrailprimitive and the run-budget hook. - handoff
- Agent-to-agent delegation as a durable child workflow.
- invocation
- The invocation registry: the workflow-owned authority on tool execution (mcp-bridge spec, Requirements 3 and 4).
- output
- Typed outputs: a run produces a value, not a string.
- provider
- The provider seam: one implementation per model backend, one call per harness turn.
- run
- The run loop as a workflow; the turn as an activity.
- runner
- The
Runner: start runs, follow conversations, fetch typed results. - tool
- The
Toolprimitive: a typed, framework-owned capability.