Skip to main content
This page is a quick-lookup index. For detailed usage with examples, see the Rust SDK reference.

Core types

TypeModulePurpose
Agentmeerkat_coreMain agent execution engine
AgentBuildermeerkat_coreBuilder pattern for agent construction
Sessionmeerkat_coreConversation state container
SessionIdmeerkat_coreUnique session identifier (UUIDv7)
Messagemeerkat_coreConversation message enum (System, User, Assistant, ToolResults)
ToolDefmeerkat_coreTool definition (name, description, JSON Schema)
ToolCallmeerkat_coreTool invocation request from the model
ToolCallViewmeerkat_coreZero-allocation borrowed view of a tool call
ToolResultmeerkat_coreTool execution result
Usagemeerkat_coreToken usage tracking
StopReasonmeerkat_coreWhy the LLM stopped (EndTurn, ToolUse, MaxTokens, StopSequence, ContentFilter, Cancelled)
RunResultmeerkat_coreAgent execution result (text, session ID, usage, structured output)
AgentEventmeerkat_coreStreaming events during execution
AgentErrormeerkat_coreError types (LLM, tool, budget, hook, cancellation)
BudgetLimitsmeerkat_coreResource constraints (tokens, duration, tool calls)
RetryPolicymeerkat_coreExponential backoff configuration

Traits

TraitModulePurposeDetailed docs
AgentLlmClientmeerkat_coreLLM provider abstractionRust SDK: providers
AgentToolDispatchermeerkat_coreTool routing abstractionRust SDK: tool system
AgentSessionStoremeerkat_coreSession persistence abstractionRust SDK: session stores
SessionServicemeerkat_core::serviceSession lifecycle (create/turn/interrupt/read/list/archive)Rust SDK: sessions
Compactormeerkat_coreContext compaction strategyMemory guide
MemoryStoremeerkat_coreSemantic memory indexingMemory guide
SkillEnginemeerkat_core::skillsSkill loading and injectionSkills guide
SkillSourcemeerkat_core::skillsSkill discovery from various sourcesSkills guide
HookEnginemeerkat_coreHook pipeline executionHooks guide

SDK entry points

Function / TypePurposeDetailed docs
AgentFactory::new(cwd)Create a factory for building agentsRust SDK
build_ephemeral_service(factory, config, cap)Build an in-memory session serviceRust SDK
meerkat::with_anthropic(key)Quick-start builder for AnthropicRust SDK
Config::load()Load layered configuration from diskConfiguration

Structured output types

TypePurpose
OutputSchemaSchema definition with compat/strict/format options
MeerkatSchemaNormalized JSON Schema newtype
SchemaCompatLossy (best-effort lowering) or Strict (reject unsupported features)
SchemaFormatSchema format version (MeerkatV1)
SchemaWarningProvider-specific compilation warning
CompiledSchemaProvider-compiled schema output
SchemaErrorInvalidRoot or UnsupportedFeatures
See the structured output guide for usage details.

Hook types

TypePurpose
HookPoint8 extension points (RunStarted through TurnBoundary)
HookCapabilityObserve, Guardrail, Rewrite
HookExecutionModeForeground (blocking) or Background (async)
HookEntryConfigPer-hook configuration (id, point, priority, runtime, failure policy)
HookRunOverridesPer-run hook customization (add entries, disable by ID)
HookDecisionAllow or Deny with reason code
HookPatchMutations: LlmRequest, AssistantText, ToolArgs, ToolResult, RunResult
HookFailurePolicyFailOpen or FailClosed
See the hooks guide for usage details.

Skill types

TypePurpose
SkillIdNewtype skill identifier
SkillScopeBuiltin, Project, User
SkillDescriptorSkill metadata (id, name, description, required capabilities)
SkillDocumentLoaded skill with body content
SkillErrorNotFound, CapabilityUnavailable, Ambiguous, Load, Parse
See the skills guide for usage details.

Wire types (meerkat-contracts)

TypePurpose
CapabilityIdAll known capabilities (Sessions, Streaming, Hooks, Shell, etc.)
CapabilityStatusAvailable, DisabledByPolicy, NotCompiled, NotSupportedByProtocol
ErrorCodeStable error codes with projections to JSON-RPC, HTTP, and CLI exit codes
WireErrorCanonical error envelope (code, message, details, capability hint)
ContractVersionSemver version (0.1.0 currently)
CoreCreateParamsSession creation parameters
StructuredOutputParamsSchema + retry count
CommsParamsHost mode + agent name
HookParamsHook override entries
SkillsParamsSkill enablement + references

Error code reference

Every ErrorCode maps to a stable string, JSON-RPC code, HTTP status, and CLI exit code:
ErrorCode stringJSON-RPCHTTPCLI
Session not foundSESSION_NOT_FOUND-3200140410
Session busySESSION_BUSY-3200240911
Session not runningSESSION_NOT_RUNNING-3200340912
Provider errorPROVIDER_ERROR-3201050220
Budget exhaustedBUDGET_EXHAUSTED-3201142921
Hook deniedHOOK_DENIED-3201240322
Agent errorAGENT_ERROR-3201350030
Capability unavailableCAPABILITY_UNAVAILABLE-3202050140
Skill not foundSKILL_NOT_FOUND-3202140441
Skill resolution failedSKILL_RESOLUTION_FAILED-3202242242
Invalid paramsINVALID_PARAMS-326024002
Internal errorINTERNAL_ERROR-326035001

Provider clients

ClientProviderDetailed docs
AnthropicClientAnthropic ClaudeRust SDK: providers
OpenAiClientOpenAI GPTRust SDK: providers
GeminiClientGoogle GeminiRust SDK: providers
All implement LlmClient and normalize responses to LlmEvent (text deltas, tool call deltas, usage updates, done). LlmError variants: RateLimited, ServerOverloaded, NetworkTimeout, ConnectionReset, ServerError, InvalidRequest, AuthenticationFailed, ContentFiltered, ContextLengthExceeded, ModelNotFound, InvalidApiKey, Unknown. Use error.is_retryable() to check if an error should be retried.

Storage implementations

StoreFeature flagPurposeDetailed docs
JsonlStorejsonl-store (default)File-based JSONL persistenceRust SDK: session stores
RedbSessionStoresession-storeEmbedded database (redb)Rust SDK: session stores
MemoryStorememory-storeIn-memory (testing)Rust SDK: session stores

See also