meerkat-sdk) lets you manage sessions, run agent turns, stream events, and query capabilities from Python. It communicates with a local rkat rpc subprocess over JSON-RPC 2.0.
- Python:
>=3.10 - Dependencies: zero runtime dependencies
Getting started
Method overview
| Method | Description |
|---|---|
connect() | Spawn rkat rpc, handshake, fetch capabilities |
close() | Terminate the subprocess |
create_session(prompt, ...) | Create a session and run the first turn |
start_turn(session_id, prompt) | Continue an existing session |
interrupt(session_id) | Cancel an in-flight turn |
list_sessions() | List active sessions |
read_session(session_id) | Read session state |
archive_session(session_id) | Remove a session |
get_capabilities() | Get runtime capabilities |
has_capability(id) | Check if a capability is available |
require_capability(id) | Guard a code path by capability |
get_config() | Read runtime configuration |
set_config(config) | Replace runtime configuration |
patch_config(patch) | Merge-patch runtime configuration |
MeerkatClient
Constructor
MeerkatError (code "BINARY_NOT_FOUND") if the binary is not found.
connect()
rkat rpc subprocess, performs the initialize handshake, checks contract version compatibility, and fetches capabilities. Returns self for chaining.
close()
SIGTERM and waits up to 5 seconds; falls back to SIGKILL on timeout.
create_session()
WireRunResult.
start_turn()
interrupt()
Session management
Config management
Examples
Multi-turn conversation
Multi-turn conversation
Structured output
Structured output
Using with tools enabled
Using with tools enabled
See also
- Python SDK reference - wire types, capabilities, skills, errors
- Rust SDK overview - Rust library API
- RPC reference - JSON-RPC protocol specification
