Design philosophy
- Library-first — the Rust crate is the primary interface; surfaces (CLI, REST, RPC, MCP) are thin wrappers
- Modular — twenty-five crates, all opt-in. Clean trait boundaries let you swap providers, stores, and dispatchers
- No I/O in core —
meerkat-corehas no network or filesystem dependencies; all I/O is in satellite crates - Streaming-first — all LLM interactions use streaming for responsive user experiences
- Budget-aware — built-in resource tracking for tokens, time, and tool calls
- Machine authority — canonical state mutations flow through generated sealed mutator traits; handwritten code classifies inputs and executes effects but cannot invent parallel semantic state
- Formal seam closure — async owner handoffs, wait barriers, and terminal classifications are under formal protocol ownership with generated helpers and obligation tracking
High-level architecture
SessionService routing: All surfaces (CLI, REST, MCP Server, JSON-RPC, SDKs) route through
SessionService for substrate lifecycle and through AgentFactory::build_agent() for agent
construction. Runtime-backed surfaces remain the canonical owner of keep_alive, Queue/Steer,
comms drain, and commit/cancel semantics.Machine authority (RMAT): All canonical state mutations flow through generated sealed mutator
traits in
meerkat-machine-kernels. Handwritten shell code classifies inputs, executes effects,
and manages I/O — but cannot mutate semantic state directly. 19 canonical machines cover turn
execution, runtime control, ops lifecycle, comms drain, mob orchestration, and more. See RMAT.Formal seam closure: Async owner handoffs (comms drain spawn/abort, ops barrier satisfaction,
terminal outcome alignment) are under formal protocol ownership with generated helpers, obligation
tracking, and closure policies. The composition ontology validates handoff protocol coverage at
schema level, and CI gates enforce zero open findings.
Mob runtime contract vs backend selection: Mob tools are exposed through
meerkat-mob-mcp dispatcher composition (SessionBuildOptions.external_tools). CLI run/resume pre-compose this path, while rkat mob ... is the explicit direct lifecycle surface. Backend selection remains realm-driven (realm_manifest.json) and independent from mob tool composition.Detailed component view
Crate structure
meerkat-models
meerkat-models
Curated model catalog and provider profile rules. A leaf crate with no meerkat dependencies:
- Model catalog: single source of truth for model IDs, display names, tiers, context windows, and max output tokens
- Provider profiles: capability detection rules (temperature, thinking, reasoning support) and parameter schemas per model family
- Provider defaults: default model ID per provider
- Allowlists: model ID validation and provider inference
meerkat-core (config defaults), meerkat-client (adapter rules), meerkat-tools (validation), and meerkat (facade).meerkat-core
meerkat-core
The heart of Meerkat. Contains:
- Agent: the main execution engine
- Types:
Message,Session,ToolCall,ToolResult,Usage,ToolCallView,ContentBlock,ContentInput,ToolOutput, etc. - Trait contracts:
AgentLlmClient,AgentToolDispatcher,AgentSessionStore,SessionService,Compactor,MemoryStore,HookEngine,SkillEngine,SkillSource - Service types:
SessionError,CreateSessionRequest,StartTurnRequest,SessionView,SessionInfo,SessionUsage - Budget: resource tracking and enforcement
- Retry: exponential backoff with jitter
- State machine:
LoopStatefor agent lifecycle management - Compaction:
Compactortrait,CompactionConfig, compaction flow wired into agent loop - Forked session branches: lightweight history branching without a standalone child-agent owner
- Hook contracts: typed hook points, decisions, patches, invocation/outcome envelopes
meerkat-runtime
meerkat-runtime
Runtime control plane for session-backed agent lifecycle:
- RuntimeControlPlane: manages runtime-level state (attached, idle, retiring) and dispatches commands
- RuntimeDriver: per-session driver that owns the
Agentexclusively in a dedicated tokio task - RuntimeSessionAdapter: bridges
SessionServiceinto the runtime’s event-driven model - Input taxonomy: typed
Inputenum (Prompt, Peer, FlowStep, ExternalEvent, Continuation, Operation) with durability, origin, and visibility metadata - InputLifecycleState: full state machine for input processing (Accepted → Consumed | Superseded | Coalesced | Abandoned)
SessionService, providing the stateful runtime that owns
keep-alive, ingress admission, and live routing semantics for the product surfaces.meerkat-machine-schema
meerkat-machine-schema
Formal machine definitions powering the RMAT authority model:
- Machine catalog: 19 canonical machines (turn execution, runtime control, ops lifecycle, comms drain, peer directory reachability, mob orchestrator, peer comms, external tool surface, input lifecycle, and more)
- Composition ontology:
ActorSchema(Machine/Owner kinds),EffectHandoffProtocol,ClosurePolicy - Handoff protocols: obligation tracking, feedback constraints, and terminal classification for async owner seams
- Schema validation:
CompositionSchema::validate()enforces handoff protocol coverage as a closed-world property
meerkat-machine-codegen
meerkat-machine-codegen
Code generation from machine schema definitions:
- Reads machine definitions from
meerkat-machine-schema - Generates sealed mutator traits, typed input/effect enums, and transition logic
- Generates protocol helpers for handoff seams (obligation structs, executor functions, feedback submitters)
- Generated code is marked with
// @generatedheaders for RMAT audit rules
meerkat-machine-kernels
meerkat-machine-kernels
Generated sealed mutator implementations:
- One kernel per canonical machine (e.g.,
TurnExecutionKernel,OpsLifecycleKernel,RuntimeControlKernel) - Each kernel implements a sealed mutator trait that is the only code path allowed to mutate canonical state
- Authority modules in satellite crates (e.g.,
TurnExecutionAuthorityinmeerkat-core,OpsLifecycleAuthorityinmeerkat-runtime) wrap the generated kernels with effect execution - Handwritten shell code calls
authority.apply(input)and handles the returned effects
meerkat-hooks
meerkat-hooks
Hook runtime adapters and the default deterministic hook engine:
- In-process runtime: register Rust handlers by name
- Command runtime: execute external processes via stdin/stdout JSON
- HTTP runtime: invoke remote hook endpoints
- Deterministic execution: foreground hooks execute in
(priority ASC, registration_index ASC)order - Guardrail semantics: first deny short-circuits remaining hooks; deny always wins over allow
- Patch semantics: patches from executed hooks are applied in execution order (last patch to same field wins)
- Failure policy defaults:
observe=> fail-openguardrail/rewrite=> fail-closed
- Background behavior:
pre_*background hooks are observe-onlypost_*background hooks publishHookPatchEnvelopeevents
meerkat-client
meerkat-client
LLM provider implementations:
- AnthropicClient: Claude models via Messages API
- OpenAiClient: GPT models via Chat Completions API
- GeminiClient: Gemini models via GenerateContent API
LlmClient trait and normalize responses to LlmEvent:meerkat-store
meerkat-store
Session persistence:
- JsonlStore: production storage using append-only JSONL files
- SqliteSessionStore: sqlite-backed storage for the default persistent same-realm workflow
- RedbSessionStore: redb-backed storage for explicit single-owner embedded workflows
- MemoryStore: in-memory storage for testing
- SessionStore trait: implement for custom backends
meerkat-session
meerkat-session
Session service orchestration:
- EphemeralSessionService: in-memory session lifecycle (always available)
- PersistentSessionService: durable session lifecycle over
SessionStorebackends - DefaultCompactor: context compaction implementation (feature:
session-compaction)
SessionService remains the substrate lifecycle layer underneath those
semantics.Feature gates: session-store, session-compaction.meerkat-memory
meerkat-memory
Semantic memory indexing:
- HnswMemoryStore: production memory store using hnsw_rs + redb (feature:
memory-store-session) - SimpleMemoryStore: in-memory implementation for testing
- MemoryStore trait (defined in meerkat-core): indexing, retrieval, similarity search
meerkat-tools
meerkat-tools
Tool management:
- ToolRegistry: register and validate tool definitions
- ToolDispatcher: route tool calls with timeout handling
- Schema validation: JSON Schema validation of tool arguments
meerkat-mcp
meerkat-mcp
MCP protocol client implementation:
- McpConnection: manages stdio connection to MCP server
- McpRouter: routes tool calls to appropriate MCP servers (implements
AgentToolDispatcher) - Protocol handling: initialize, tools/list, tools/call
meerkat-mcp-server
meerkat-mcp-server
MCP server exposing Meerkat as tools for other MCP clients (25 tools total):
- Core:
meerkat_run,meerkat_resume,meerkat_config,meerkat_capabilities,meerkat_models_catalog - Session lifecycle:
meerkat_read,meerkat_sessions,meerkat_interrupt,meerkat_archive - Skills:
meerkat_skills - MCP management:
meerkat_mcp_add,meerkat_mcp_remove,meerkat_mcp_reload - Event streaming:
meerkat_event_stream_open,meerkat_event_stream_read,meerkat_event_stream_close - Mob (feature-gated):
meerkat_mob_prefabs,meerkat_mob_event_stream_open,meerkat_mob_event_stream_read,meerkat_mob_event_stream_close - Comms (feature-gated):
meerkat_comms_send,meerkat_comms_peers
handler: "callback" support a callback pattern where the MCP client executes tools and returns results via meerkat_resume.meerkat-comms
meerkat-comms
Inter-agent communication system:
- CommsRuntime: runtime for peer-to-peer agent messaging
- Ed25519 identity: cryptographic signing and verification of messages
- Trust model:
TrustedPeerswith explicit peer verification - Transports: inproc (in-process), TCP, and UDS
- Inbox: bounded message queue feeding runtime-backed ingress admission
- Message types:
Message,Request,Response,Ack - Keep-alive: runtime-backed session behavior that keeps a session alive for future admitted work
comms.meerkat-contracts
meerkat-contracts
Canonical wire types and capability model shared across all surfaces:
- Wire types:
WireRunResult,WireSessionInfo,WireEvent,WireUsage,WireError,WireContentBlock,WireContentInput,WireToolResultContent - Capabilities:
CapabilityId,CapabilityStatus,CapabilityRegistration,CapabilitiesResponse - Error codes:
ErrorCodewith stable projections to JSON-RPC codes, HTTP status, and CLI exit codes - Contract version: semver versioning for API compatibility (
0.5.0) - Parameter types:
CoreCreateParams,StructuredOutputParams,HookParams,CommsParams,SkillsParams
meerkat-skills
meerkat-skills
Skill loading, resolution, rendering, and introspection:
- DefaultSkillEngine: resolves and renders skills from multiple sources
- Sources:
FilesystemSkillSource,EmbeddedSkillSource,InMemorySkillSource,CompositeSkillSource - Frontmatter parsing: YAML metadata with capability gating
- Rendering: inventory section for system prompt, injection block for per-turn context
- Discovery tools:
browse_skillsandload_skill(when builtins enabled) - Introspection:
list_all_with_provenance()returns active + shadowed skills;load_from_source()bypasses first-wins resolution
skills.meerkat-mob
meerkat-mob
Mob runtime for multi-agent coordination:
- MobBuilder: construct or resume a mob runtime from a
MobDefinitionandMobStorage - MobHandle: runtime handle for lifecycle, membership, wiring, turns, flows, and tasks
- MobDefinition: declarative mob structure (profiles, wiring, topology, limits, flows)
- MobStorage: event/run/spec storage bundle (in-memory or redb)
- Flow engine:
run_flow/flow_status/cancel_flowfor multi-step orchestration - Task board: shared
task_create/task_update/task_listfor structured work assignment - Parallel spawn:
spawn_manybatches provisioning and wiring concurrently
meerkat-core directly.meerkat-mob-pack
meerkat-mob-pack
Mobpack archive format for packaging and distributing mob definitions:
- Mobpack archive: tar+gzip bundle containing mob definition, skills, and metadata
- Ed25519 signing: cryptographic signing and verification of mobpack archives
- Trust policies: configurable trust model for accepting packaged mob definitions
- Validation: structural and signature verification on load
meerkat-mob for mob definition types.meerkat-mob-mcp
meerkat-mob-mcp
Tool-dispatch bridge that exposes mob capabilities to non-Rust-SDK surfaces:
- MobMcpState: shared state handle wrapping the
MobSessionService - MobMcpDispatcher: implements
AgentToolDispatcher, routingmob_*tool calls into the mob runtime
SessionBuildOptions.external_tools so CLI, REST, RPC, and MCP server surfaces all get mob tool capability through the same path.meerkat-rpc
meerkat-rpc
JSON-RPC 2.0 stdio server for IDE and desktop app integration:
- SessionRuntime: stateful agent manager — keeps agents alive between turns
- RpcServer: JSONL transport multiplexing requests and notifications via
tokio::select! - MethodRouter: maps JSON-RPC methods to SessionRuntime/ConfigStore operations
- Handlers: typed param parsing and response construction for each method group
Agent ownership,
enabling cancel(&mut self) without mutex. Commands flow through channels;
events stream back as JSON-RPC notifications.meerkat (facade)
meerkat (facade)
The main entry point. Re-exports types and provides:
- AgentFactory: centralized agent construction pipeline shared across all surfaces
- FactoryAgentBuilder: bridges
AgentFactoryintoSessionAgentBuilder - FactoryAgent: wraps
DynAgentimplementingSessionAgent - build_persistent_service(): runtime-backed persistent service constructor for the main Rust embedding path
- build_ephemeral_service(): in-memory substrate constructor for testing and embedded Queue-only use
- AgentBuildConfig: per-request configuration (model, system prompt, tool overrides, realm metadata)
- SessionBuildOptions: in-band request build options used by all surfaces
FactoryAgentBuilder pattern works as follows:Delegate to factory
FactoryAgentBuilder converts SessionBuildOptions into AgentBuildConfig and delegates to AgentFactory::build_agent().Agent loop
The agent executes a state machine loop. The user-facing loop shape isLoopState in meerkat-core/src/state.rs, while canonical transition legality is enforced by TurnExecutionAuthority (the sealed mutator for TurnExecutionMachine):
States
| State | Description |
|---|---|
CallingLlm | Sending request to LLM, streaming response |
WaitingForOps | No LLM work, waiting for machine-owned barrier operations to complete (gated by barrier_satisfied in TurnExecutionMachine) |
DrainingEvents | Processing buffered operation events at turn boundary |
Cancelling | Gracefully stopping after cancel signal or budget exhaustion |
ErrorRecovery | Attempting recovery from transient LLM error |
Completed | Terminal state — agent has finished (success or failure) |
Valid state transitions
Valid state transitions
| From | To | Trigger |
|---|---|---|
CallingLlm | WaitingForOps | ops pending after tool dispatch |
CallingLlm | DrainingEvents | tool_use stop reason |
CallingLlm | Completed | end_turn and no ops |
CallingLlm | ErrorRecovery | LLM error |
CallingLlm | Cancelling | cancel signal |
WaitingForOps | DrainingEvents | when ops complete |
WaitingForOps | Cancelling | cancel signal |
DrainingEvents | CallingLlm | more work needed |
DrainingEvents | Completed | done |
DrainingEvents | Cancelling | cancel signal |
Cancelling | Completed | after drain |
ErrorRecovery | CallingLlm | after recovery |
ErrorRecovery | Completed | if unrecoverable |
ErrorRecovery | Cancelling | cancel during recovery |
Completed | (none) | terminal state |
Turn boundaries
Turn boundaries are critical moments where:- Tool results are injected into the session
- Steering messages (from parent agents) are applied
- Any local projections or staged updates that follow canonical seam truth are applied
- Delegated-work projections are collected and injected
- Budget is checked
- Session is checkpointed
turn_boundaryhooks run before the next state transition
TurnCompletedToolResultReceivedHookStarted/HookCompleted/HookFailedHookDeniedHookRewriteAppliedHookPatchPublished
Hook insertion points
The core loop executes hooks at these points:run_startedrun_completedrun_failedpre_llm_requestpost_llm_responsepre_tool_executionpost_tool_executionturn_boundary
foreground) patches are applied in-loop.
Asynchronous (background) post-hook rewrites are event-only (HookPatchPublished) and do not retroactively mutate persisted session history.
Hook pipeline architecture
TheDefaultHookEngine (in meerkat-hooks/src/lib.rs) processes hooks in a two-phase pipeline:
Foreground phase
Hooks sorted by
(priority ASC, registration_index ASC) execute sequentially. Each hook receives a HookInvocation containing the hook point, session ID, turn number, and point-specific context (LLM request, tool call, etc.). Hooks return a RuntimeHookResponse with an optional HookDecision (Allow/Deny) and optional HookPatch list. A Deny decision short-circuits remaining hooks immediately.Background phase
If no deny occurred, background hooks are spawned as independent tokio tasks bounded by a
Semaphore (background_max_concurrency). Pre-hooks in background mode are forced to observe-only (patches and deny decisions are dropped). Post-hooks in background mode publish HookPatchEnvelope records that are drained on the next execute() call.| Adapter | Mechanism |
|---|---|
| In-process | Calls a registered InProcessHookHandler (Rust closure) directly |
| Command | Spawns an external process, writes HookInvocation as JSON to stdin, reads RuntimeHookResponse from stdout. Stream sizes bounded by payload_max_bytes |
| HTTP | POSTs HookInvocation JSON to a remote endpoint and parses the response. Response body bounded by payload_max_bytes |
Run-scoped overrides (
HookRunOverrides) allow callers to disable specific hooks or inject additional entries for a single run without mutating the base configuration.Delegated work and forked branches
In0.5, the standalone child-agent subsystem is gone. Delegated work now routes through mob orchestration plus the canonical runtime/control-plane path, while Session::fork() remains as the lightweight history-branching primitive.
Comms transport design
Themeerkat-comms crate provides inter-agent communication with a layered architecture:
Identity layer (identity.rs): Ed25519 Keypair/PubKey/Signature. Every agent has a keypair. Messages are signed by the sender and verified by the receiver.
Trust layer (trust.rs): TrustedPeers maintains a map of known peers (name, public key, address). Only messages from trusted peers are accepted.
Transport layer (transport/): Three backends behind PeerAddr:
| Backend | Use case |
|---|---|
| UDS (Unix Domain Sockets) | Local inter-process, lowest latency |
| TCP | Cross-host communication |
Inproc (InprocRegistry) | In-process channels for peers in the same process. Uses a global registry; the sender looks up the peer by name, verifies the keypair signature, and delivers directly to the peer’s inbox |
Envelope containing {id, from, to, kind, sig}. MessageKind variants: Message (fire-and-forget text), Request/Response (intent + params / in_reply_to + status + result), Ack (delivery confirmation). The Router handles serialization via TransportCodec (length-prefixed framing) and waits for ACK on non-response messages with a configurable timeout.
Agent integration: CommsToolDispatcher wraps the base tool dispatcher via wrap_with_comms(), overlaying comms tools (send, peers) without modifying the CompositeDispatcher. Inbox delivery and runtime admission are separate concerns: transport queues work first, then runtime-backed ingress decides when those messages become session input.
Data flow through the agent loop
Machine authority (RMAT)
Meerkat enforces a strict authority model for all canonical state: generated code is the only path allowed to mutate semantic state. This is not convention — it is enforced at compile time through sealed traits.The core rule
For any canonical domain (turn lifecycle, runtime control, ops lifecycle, mob orchestration, comms drain, etc.), there is exactly one answer to “what state is this in, what transitions are legal, and what happens next?” That answer is:- The machine definition in
meerkat-machine-schema— declares states, inputs, transitions, effects, and terminal outcomes - The generated kernel in
meerkat-machine-kernels— implements a sealed mutator trait that is the sole mutation path - The authority wrapper in the owning crate — calls
apply(input)on the kernel and executes returned effects
Machine catalog
19 canonical machines cover the full system:| Machine | Domain | Owner crate |
|---|---|---|
TurnExecutionMachine | Agent turn lifecycle, LLM calls, tool dispatch | meerkat-core |
OpsLifecycleMachine | Async operation tracking, barrier satisfaction | meerkat-runtime |
RuntimeControlMachine | Runtime attach/detach, retire, reset | meerkat-runtime |
RuntimeIngressMachine | Input acceptance, deduplication, rejection | meerkat-runtime |
InputLifecycleMachine | Input processing state (accepted → consumed/superseded/abandoned) | meerkat-runtime |
ExternalToolSurfaceMachine | MCP and external tool dispatch authority | meerkat-mcp |
CommsDrainLifecycleMachine | Host-mode drain task spawn/abort lifecycle | meerkat-comms |
PeerCommsMachine | Peer-to-peer messaging authority | meerkat-comms |
PeerDirectoryReachabilityMachine | Resolved peer reachability and last-known send-result truth | meerkat-comms |
MobLifecycleMachine | Mob creation, activation, completion, destruction | meerkat-mob |
MobOrchestratorMachine | Member spawning, wiring, turn dispatch | meerkat-mob |
MobMemberLifecycleAnchor | Per-member lifecycle within a mob | meerkat-mob |
MobHelperResultAnchor | Helper result collection and anchoring | meerkat-mob |
MobRuntimeBridgeAnchor | Runtime-to-mob bridge lifecycle | meerkat-mob |
MobWiringAnchor | Peer wiring topology management | meerkat-mob |
FlowRunMachine | DAG flow execution, step dispatch, completion | meerkat-mob |
What handwritten code may and may not do
Allowed:- Classify raw inputs into typed machine inputs
- Route inputs to the correct machine owner
- Schedule and execute effects (I/O, persistence, channel management)
- Manage tokio tasks, notifiers, and completion waiters
- Mutate canonical semantic state directly
- Decide transition legality outside the machine
- Implement alternate reducers or shadow state machines
- Invent duplicate semantic enums that diverge from machine truth
- Hide transition-relevant truth in side booleans or maps the machine doesn’t own
RMAT audit
Thextask rmat-audit CI gate verifies structural compliance:
- Every authority module is declared in the policy
- Protected fields (
wake_requested,process_requested,comms_drain_active) are only written through authority paths - Handoff protocol coverage is complete
- Terminal mapping constraints are satisfied
- The baseline (
xtask/rmat-baseline.toml) has zero open findings
Formal seam closure
Single-machine sealed mutators are necessary but not sufficient. Meerkat also has semantic seams between machines — async owner handoffs where one machine emits an effect and another actor must realize it and feed back the outcome.The three closed seams
-
Comms drain seam:
TurnExecutionMachineemitsSpawnDrainTask/AbortDrainTaskeffects. The comms drain lifecycle must spawn or abort the actual drain task and feed backTaskSpawned/TaskExited. Generated protocol helpers (protocol_comms_drain_spawn.rs,protocol_comms_drain_abort.rs) constrain the obligation and feedback to exactly the allowed inputs. -
Ops barrier seam:
TurnExecutionMachinedelegates operation tracking toOpsLifecycleMachine. The barrier-satisfaction signal (all pending barrier ops complete) flows throughAsyncOpRefwith typedWaitPolicy(Barrier vs Detached). Thebarrier_satisfiedguard onToolCallsResolvedensures the turn cannot advance until the barrier is met. -
Terminal outcome alignment: Machine terminal outcomes (
Completed,Failed,Cancelled) are the single source of truth for surfaced API results. Generated terminal classification helpers produce exhaustive matches with no default arm, so adding a new terminal outcome is a compile error until all surfaces handle it.
Handoff protocol anatomy
Each seam is formalized as anEffectHandoffProtocol in the composition schema:
- Obligation: what must happen (correlation fields, obligation fields)
- Allowed feedback inputs: exactly which machine inputs the owner may submit
- Closure policy:
AckRequired,AckOrAbort, orTerminalClosure - Liveness annotation: fairness assumptions under which feedback eventually occurs
- Generated helpers: obligation struct, executor function, feedback submitters — all generated, all exhaustive
validate() function enforces that every effect crossing an ownership boundary has a declared handoff protocol. This is a closed-world property: unprotocolized handoffs are a CI-blocking error.
Proof model
Three claim types classify every acceptance criterion:| Claim type | What it proves | Verified by |
|---|---|---|
| Structural coverage | Protocol exists, realization sites declared, no missing path | Schema validation, RMAT audit, CI gate |
| Safety | No invalid state or transition reachable, machine truth ≠ runtime behavior divergence impossible | Machine-level TLC model checking, composition-level TLC model checking, obligation closure invariants |
| Liveness | Under stated fairness assumptions, required feedback eventually occurs | Scoped liveness claims with explicit fairness conditions |
Extension points
Meerkat is extended by implementing three core traits. See the Rust SDK for full examples with code.| Extension | Trait | Purpose |
|---|---|---|
| Custom LLM provider | AgentLlmClient | Integrate any LLM API |
| Custom tool dispatcher | AgentToolDispatcher | Route tool calls to your own handlers |
| Custom session store | AgentSessionStore | Persist sessions to any backend |
| MCP tool servers | McpRouter | Connect external MCP servers for tool discovery |
Security model
- API key isolation: keys are passed explicitly, never stored in config
- Tool sandboxing: MCP tools execute in separate server processes
- Input validation: JSON Schema validation for tool arguments
- Delegated-work isolation: forked branches and mob-managed child workflows do not get implicit recursive orchestration powers
Crate ownership
| Owner | Owns |
|---|---|
meerkat-models | Model catalog, provider profiles, parameter schemas (leaf crate, no meerkat deps) |
meerkat-core | Trait contracts, SessionError, agent loop, types, TurnExecutionAuthority |
meerkat-machine-schema | Machine definitions, composition ontology, handoff protocols |
meerkat-machine-kernels | Generated sealed mutator implementations |
meerkat-runtime | Runtime control plane, RuntimeDriver, InputLifecycleAuthority, OpsLifecycleAuthority |
meerkat-store | SessionStore implementations (SQLite, JSONL, redb, in-memory) |
meerkat-session | Session orchestration, EventStore, compactor |
meerkat-memory | HnswMemoryStore, SimpleMemoryStore |
meerkat (facade) | Feature wiring, re-exports, AgentFactory, persistence helpers, build_persistent_service, build_ephemeral_service |
Dependency rules
meerkat-modelsdepends on nothing in the workspace (leaf crate)meerkat-machine-schemadepends on nothing in the workspace (leaf crate)meerkat-coredepends onmeerkat-modelsfor catalog data and defaultsmeerkat-machine-kernelsdepends onmeerkat-machine-schemafor definitions- All runtime crates depend on
meerkat-corefor types and traits meerkat-toolsdepends onmeerkat-mcpfor MCP routingmeerkat(facade) re-exports from all cratesmeerkat-cliis the top-level binary crate
Canonical runtime state is realm-scoped (
realm_manifest.json, realm config, and pinned session backend).
Sharing and isolation are controlled by realm_id, not by working directory alone.See also
- RMAT - Rust Machine Authority Theory foundational document
- Formal seam closure - ADR for handoff protocol design
- Finite ownership ledger - state cell and semantic operation inventory
- Rust SDK reference - types, traits, and usage examples
- API reference - quick-lookup type index
- Session contracts - concurrency, durability, and compaction semantics
- Capability matrix - build profiles, error codes, feature behavior
- Configuration - config file reference
