CrabTalkCrabTalk

Extensions

CrabTalk Extensions — external processes that extend the daemon with memory, search, messaging, and custom capabilities.

CrabTalk extends its daemon through extensions — external child processes that communicate via the CrabTalk Extension Protocol (protobuf over UDS). Official extensions for search and messaging ship alongside the daemon. Third-party extensions use the same protocol.

Extension kinds

KindProtocolDirectionUse case
extensionext.proto (UDS)Daemon → extensionSearch, custom tools
gatewaycrabtalk.proto (TCP)Service → daemonGateway (Telegram)

Official extensions

ExtensionCrateKindCapabilities
Searchcrabtalk-searchextensionTools
Telegramcrabtalk-telegramgatewayTelegram bot

Configuration

Each extension is a [services.<name>] section in crabtalk.toml:

[services.search]
kind = "extension"
crate = "crabtalk-search"
enabled = true
FieldTypeDescriptionDefault
kindstring"extension" or "gateway""extension"
cratestringCargo package name (used as binary name)Required
restartstring"never", "on_failure", or "always""never"
enabledboolWhether to start this extensiontrue
envmap?Environment variables for the child process{}
configtable?Opaque config passed as JSON at handshake{}

Extension lifecycle

  1. Spawn — daemon starts the extension process with socket path or daemon address
  2. Handshake — extension declares its name and capabilities via ExtReady
  3. Configure — daemon sends opaque config JSON, extension acknowledges
  4. Register tools — extension declares tool schemas for agent use
  5. Ready — tools are routed to the extension, lifecycle hooks fire as agents run
  6. Shutdown — daemon sends ExtShutdown, extension exits gracefully

Capabilities

Extensions declare what they can do at handshake:

CapabilityDescription
ToolsProvides tool schemas that agents can call
BuildAgentEnriches agent config at creation (inject system prompt, override tools)
BeforeRunInjects context before each agent execution
CompactEnhances context compaction prompts
EventObserverObserves agent lifecycle events (text deltas, tool calls, completions)
AfterRunRuns after each agent execution completes
InferRequests LLM inference from the daemon
AfterCompactRuns after context compaction completes
QueryResponds to structured queries from the daemon

What's next

On this page