Expand description
merlion-core
Shared types for the Merlion Agent: chat messages, tool calls, the tool trait, and the agent loop that drives an LLM ↔ tool conversation.
This crate is intentionally provider-agnostic. merlion-llm plugs a
concrete LLM behind LlmClient, and merlion-tools plugs concrete
tools behind Tool.
Re-exports§
pub use agent::Agent;pub use agent::AgentEvent;pub use agent::AgentOptions;pub use approval::AllowAllApprover;pub use approval::ApprovalDecision;pub use approval::DenyAllApprover;pub use approval::ToolApprover;pub use curator::Curator;pub use error::Error;pub use error::Result;pub use llm::LlmClient;pub use llm::LlmRequest;pub use llm::LlmResponse;pub use llm::LlmStreamEvent;pub use llm::Usage;pub use message::Message;pub use message::Role;pub use message::ToolCall;pub use message::ToolResult;pub use tool::Tool;pub use tool::ToolRegistry;pub use tool::ToolSchema;
Modules§
- agent
- approval
- Tool approval — a gate the agent runs through before dispatching a tool
call. Mirrors hermes’s
approval.py/set_approval_callbackpattern but shaped around an async trait so non-CLI surfaces (a future messaging gateway, an HTTP API) can plug in their own approver. - curator
- The Curator — a small turn counter that decides when the agent should pause to extract memories from the recent conversation.
- error
- llm
- message
- tool