Python SDK
Write Python agents for Cambrian Core.
CLI & SDKs
Write an agent as a small Python class and serve it; the kernel connects and sends it tasks. Run and inspect your instance from the terminal with the CLI.
Python SDK
pip install cambrian-agent-sdkCLI and Core
curl -fsSL https://cambrian.sh/install.sh | shPython SDK
Declare a role and a few tools. The SDK gives the agent a reasoning loop, tool calling, working memory, and the gRPC server the kernel talks to.
from cambrian_agent_sdk import CognitiveAgent, tool
class CalculatorAgent(CognitiveAgent):
role = "a precise calculator. Use the tools for every arithmetic step."
@tool
def add(self, a: float, b: float) -> float:
"""Return the sum a + b."""
return a + b
@tool
def multiply(self, a: float, b: float) -> float:
"""Return the product a * b."""
return a * b
agent = CalculatorAgent(
agent_id="calculator_agent",
description="Solves arithmetic with calculator tools.",
)
if __name__ == "__main__":
agent.serve() # the kernel connects and dispatches tasksShortened from example-agents/calculator_agent.py in the SDK repository.
Write Python agents for Cambrian Core.
Write TypeScript agents for Cambrian Core. Not published yet: once it is on npm, install it with bun add @cambrian-sh/sdk.
Connect to and operate your Cambrian instance.
CLI
Set up and start Core, sign in as an operator, approve or deny tool requests, search memory, and export the audit log. Most commands can print JSON for scripts.
Set up and run
cambrian initDatabase, config, and kernel setup (safe to re-run)cambrian startStart the local kernel and wait for :50051cambrian statusOne-line summary of server statecambrian doctorDiagnose config and server connectivityApprovals
cambrian approve listWatch the stream of pending tool requestscambrian approve <id>Approve a pending tool requestcambrian deny <id>Deny a pending tool request, with a reasonMemory and tools
cambrian memory query <text>Semantic memory searchcambrian memory write <text>Write text to long-term memorycambrian tools list --querySemantic search for toolscambrian tools exec <name> --dry-runShow the payload without executingAudit and access
cambrian audit listRecent audit entries, filterable by actor and actioncambrian audit exportExport entries as JSON, CSV, or NDJSONcambrian loginSign in; the token is kept in the OS keychaincambrian whoamiCurrent user, role, and token expiryRun cambrian with no command for the interactive dashboard.
From cambrian --help
How it fits
Agents and people reach Cambrian Core through separate, authenticated gRPC planes. Neither touches the database directly.
Agent plane
The kernel sends each task to the agent whose declared capabilities fit it. Agents read memory and call tools only within their grants.
Operator plane
Operators sign in with their own credentials to submit work, review approvals, and inspect memory and the audit log.
FAQ
Python 3.10 or later. The gRPC and protobuf code ships inside the wheel, so you do not run protoc yourself. The runtime needs protobuf 6.31 or later, below 7.
The SDK’s minor version tracks the agent-plane contract it targets. Pin it like any other dependency.
It is not published yet. Once it is on npm, you will install it with bun add @cambrian-sh/sdk.
Yes. Most commands take --json, and --token passes a one-shot operator token that is never stored.
The Python SDK and the CLI are under Apache-2.0. Cambrian Core, which they connect to, is under the Elastic License 2.0.
Install the SDK, serve an agent, and let the kernel send it work.
pip install cambrian-agent-sdk