Expand description
Agent runtime, memory, channels, and tool registry for molo.
Re-exports§
pub use agent::Agent;pub use agent::AgentConfig;pub use agent::AgentError;pub use agent::AgentEvent;pub use agent::AgentKernel;pub use agent::MessageChunk;pub use agent::ReActAgent;pub use agent::ReActAgentBuilder;pub use agent::ReActEvent;pub use agent::StructuredOutcome;pub use agent::StructuredValidator;pub use agent::TypedAgent;pub use event_channel::BroadcastEventChannel;pub use event_channel::EventChannel;pub use event_channel::EventChannelStats;pub use event_channel::EventReceiver;pub use event_channel::MpscEventChannel;pub use memory::Budget;pub use memory::CharTokenCounter;pub use memory::InMemoryMemory;pub use memory::Memory;pub use memory::MemoryError;pub use memory::SummarizeStrategy;pub use memory::TokenCounter;pub use memory::TrimResult;pub use memory::TrimStrategy;pub use memory::WindowDrop;pub use memory::WindowMemory;pub use message_channel::CliMessageChannel;pub use message_channel::BroadcastChannel;pub use message_channel::BroadcastReceiver;pub use message_channel::ChannelError;pub use message_channel::IncomingMessage;pub use message_channel::MessageChannel;pub use message_channel::MpscChannel;pub use message_channel::WatchChannel;pub use message_channel::WatchReceiver;pub use tool::MissingTools;pub use tool::RegistryError;pub use tool::ToolRegistry;
Modules§
- agent
- Agents: reasoning loops.
- effect
- Effect protocol: side-effect requests and observations.
- event_
channel - Observation channels: the Agent publishes process events internally, and the environment / UI side subscribes.
- memory
- Memory: manages the agent’s context.
- message
- Conversation messages.
- message_
channel - MessageChannel: a message transport channel between an Agent and the outside world (a human or another Agent).
- observability
- Lightweight observability record types.
- provider
- Provider: the interface for communicating with an LLM.
- run
- Structured run protocol shared by agent implementations and callers.
- tool
- Tool registry support for agent runtimes.
Macros§
- react_
agent - Convenience assembly macro: registers a list of tools (possibly
heterogeneous) with automatic boxing, creating a
ToolRegistryinternally. The system prompt is optional (omitted = no system prompt). Six arms:
Structs§
- Artifact
- A handle to an artifact produced by a run.
- Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.
- Chat
Request - A single conversation request.
- Chat
Response - The reply to one conversation.
- Display
Output - Output intended for host/UI display.
- Effect
Observation - Observation returned to an agent after an effect request is governed and executed by an outer harness.
- Effect
Output - Output produced by an executed effect.
- Effect
Request - Request for an outer harness to govern and execute a side effect.
- Effect
Source - Source tool call that produced an effect request.
- Fake
Provider - A programmable fake
Provider— a script is a sequence of per-turn replies, consumed in order bychat/stream_chat. - Image
Content - Raw image data carried in a
ContentBlock::Image. - Model
Observation - Successful provider response observed by a step-wise agent kernel.
- Model
Options - Model options for one conversation.
- Model
Request - Provider request emitted by a step-wise agent kernel.
- Provider
Capabilities - Provider capability metadata used by hosts and conformance tests.
- Provider
Request Context - Request-scoped provider context.
- Retry
Policy - Retry policy (with defaults;
Defaultis “exponential backoff + jitter, 3 attempts”). - Retry
Provider - Retry wrapper: implements
Providerand retries inner failures perRetryPolicy. - RunContext
- Execution controls and host-owned metadata for one run.
- RunOutput
- Structured result of one non-streaming run.
- RunRequest
- Input and model parameters for one run.
- RunSummary
- Execution summary for one run.
- Shared
State - Shared state: a heterogeneous container accessed by type.
- Tool
Call - A tool call requested by the model.
- Tool
Context - Context passed to a tool call.
- Tool
Namespace - Namespace assigned to a tool by the host application or extension layer.
- Tool
Output - Model-visible output produced by a tool.
- Tool
Policy - Tool policy metadata declared by the tool author.
- Tool
Schema - The definition of a tool.
- Tool
Source - Host-facing metadata describing where a provider-visible tool came from.
- Typed
RunOutput - Typed-output result paired with the raw structured run output.
- Usage
- Token usage for one conversation.
Enums§
- Agent
Action - Next action requested by a step-wise agent kernel.
- Backoff
- Backoff strategy: how long to wait after each failure before the next attempt.
- Content
Block - A content block within a message.
- Display
Format - Display output format.
- Effect
Kind - Kind of side effect requested by an agent.
- Effect
Status - Terminal status of an executed effect.
- Fake
Reply - One turn of reply from the script.
- Finish
Reason - Why the model ended its reply.
- Message
- A single message in a conversation.
- Observation
- Observation fed back to a step-wise agent kernel.
- Provider
Error - Why a Provider call failed.
- Retryable
- Retry judgment: which errors are worth retrying.
- Risk
Level - Request-declared risk level.
- Side
Effect Level - Declared side-effect level for a tool.
- Stream
Event - An event in a streamed conversation reply.
- Tool
Error - Reasons a tool call fails.
- Tool
Memory Policy - Memory handling policy for model-visible tool/effect output.
- Tool
Namespace Kind - Kind of tool namespace.
- Tool
Result - Result of a tool call.
- Tool
Trust Level - Trust level assigned to a tool source.
- User
Input - User input accepted by a run.
Traits§
Type Aliases§
- RunMetadata
- Request, context, or output metadata for one run.