CLI & SDKs

Python SDK · Apache-2.0 · on PyPICLI · Apache-2.0TypeScript SDK · not published

Build agents. Operate your runtime.

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-sdk

CLI and Core

curl -fsSL https://cambrian.sh/install.sh | sh

Python SDK

An agent is a small Python class

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.

Agent shapes

CognitiveAgent
Reasons with a model: memory, tools, and a ReAct loop.
DeterministicAgent
A scripted step with a typed run() and no model.
DaemonAgent
A long-running background producer.

What an agent can call

memory_query
Facts from shared memory.
recall_precedents
Earlier steps like this one, with how they turned out.
tool_call
Kernel tools the agent was granted, or its own @tool methods.
yield_subgoal
Hand part of the work back to the planner.
calculator_agent.py
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 tasks

Shortened from example-agents/calculator_agent.py in the SDK repository.

Python SDK

Write Python agents for Cambrian Core.

TypeScript SDK

not published

Write TypeScript agents for Cambrian Core. Not published yet: once it is on npm, install it with bun add @cambrian-sh/sdk.

CLI

Connect to and operate your Cambrian instance.

CLI

Run your instance from the terminal

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.

cambrian --help

Set up and run

  • cambrian initDatabase, config, and kernel setup (safe to re-run)
  • cambrian startStart the local kernel and wait for :50051
  • cambrian statusOne-line summary of server state
  • cambrian doctorDiagnose config and server connectivity

Approvals

  • cambrian approve listWatch the stream of pending tool requests
  • cambrian approve <id>Approve a pending tool request
  • cambrian deny <id>Deny a pending tool request, with a reason

Memory and tools

  • cambrian memory query <text>Semantic memory search
  • cambrian memory write <text>Write text to long-term memory
  • cambrian tools list --querySemantic search for tools
  • cambrian tools exec <name> --dry-runShow the payload without executing

Audit and access

  • cambrian audit listRecent audit entries, filterable by actor and action
  • cambrian audit exportExport entries as JSON, CSV, or NDJSON
  • cambrian loginSign in; the token is kept in the OS keychain
  • cambrian whoamiCurrent user, role, and token expiry

Run cambrian with no command for the interactive dashboard.

From cambrian --help

How it fits

Two planes, one kernel

Agents and people reach Cambrian Core through separate, authenticated gRPC planes. Neither touches the database directly.

Agent plane

Your agents, through the Python SDK

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

People, through the CLI and Studio

Operators sign in with their own credentials to submit work, review approvals, and inspect memory and the audit log.

Cambrian Core architecture

FAQ

Questions about the CLI and SDKs

Which Python versions does the SDK support?

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.

How do I keep the SDK and the kernel in step?

The SDK’s minor version tracks the agent-plane contract it targets. Pin it like any other dependency.

Is there a TypeScript SDK?

It is not published yet. Once it is on npm, you will install it with bun add @cambrian-sh/sdk.

Can I script the CLI?

Yes. Most commands take --json, and --token passes a one-shot operator token that is never stored.

What licences apply?

The Python SDK and the CLI are under Apache-2.0. Cambrian Core, which they connect to, is under the Elastic License 2.0.

Write your first agent

Install the SDK, serve an agent, and let the kernel send it work.

pip install cambrian-agent-sdk