Skip to main content
This page documents MobKit v0.8.34 (mirrored from v0.8.34). The Rust crate meerkat-mobkit is the primary interface for MobKit. All other interfaces (JSON-RPC, SDKs, console) are built on top of it.

Installation

Cargo.toml

Quick start

Host-supplied modules are optional. This runnable baseline starts no module processes; add module declarations only for executables or MCP transports your host actually supplies.

Core types

MobKitConfig

Top-level configuration for the module runtime.

ModuleConfig

Configuration for a single module.

EventEnvelope

Timestamped event wrapper.

UnifiedEvent

Agent or module event discriminator.

Runtime functions

start_mobkit_runtime

Bootstrap a module-only runtime:

start_mobkit_runtime_with_options

Bootstrap with additional options:

UnifiedRuntime::builder

Builder for the combined mob + module runtime:
For identity-first runtimes with a roster provider, the Rust builder can enable identity-scoped agent memory injection. Open the SQLite authority explicitly and pass it through the provider seam:
The SQLite provider stores one database per realm. When a realm is first accessed and its SQLite connection is opened, it imports that realm’s legacy markdown files from the same agent-memory directory. Markdown is not a live provider. To supply another storage or retrieval authority, pass any Arc<dyn AgentMemoryProvider> with .agent_memory(provider, config). Rust callers can write, read, and delete durable records through the unified runtime:

Module routing

route_module_call

Route a typed call to a module:

route_module_call_rpc_json

Route a JSON-encoded request and receive a JSON-encoded response:

Operational subsystem functions

Decisions

build_runtime_decision_state is the validating constructor; it checks the trusted OIDC snapshot only when console.require_app_auth is true. RuntimeDecisionState::local_console is the explicit opt-out for local or host-protected consoles; at serve time the runtime reads console, the session-store naming and modules, and a host with trusted modules adds them with .with_modules(...). The default stays fail-closed: ConsolePolicy::default() requires app auth, and a state that trusts no key refuses every request. See Decisions for every check and when it runs. gateway_composition also exports the HTTP exposure vocabulary both binaries use: GatewaySurface (RpcGateway | MobkitGateway, Display is the binary name), ConsoleAuthPosture::of(&decisions) (Open | ClosedToEveryCaller | Enforced, the one classifier behind the bind gate and the non-loopback warning), HttpBindPolicy, validate_http_bind_policy(surface, listen, policy), warn_on_non_loopback_bind(surface, bound, &decisions), and the typed HttpExposureParseError behind parse_http_listen_addr, parse_http_public_base_url and parse_http_listen_arg. The error enums (HttpBindPolicyError, HttpExposureParseError, GatewayHostConfigError, HostConfigTableInMobToml) are #[non_exhaustive].

Authentication

Governance

HTTP routers

Build Axum routers for serving the console and interactions:
Binding is separate from routing. GatewayHttpBinding::bind_loopback() is the default posture (loopback, ephemeral port) and GatewayHttpBinding::bind(addr) takes any SocketAddr; http_base_url() always returns the same-host form (127.0.0.1 for 0.0.0.0 and :: binds) and with_advertised_base_url(..) carries a proxy-facing base for your init reply. Run validate_http_bind_policy("my-host", addr, HttpBindPolicy::for_gateway(allow_remote, &decisions)) before binding to get the gateways’ fail-closed rule (non-loopback needs enforced console auth or the allow_remote acknowledgement) and warn_on_non_loopback_bind for their WARN line; all four live in meerkat_mobkit::gateway_composition. See Deployment.

See also