cedarcedar
Rust · Apache 2.0 · self-hosted

Run LLM agents on your own hardware, each one in its own box.

cedar is a small backend that runs agent loops against the models you register: DeepSeek V4 on a local vLLM, Ollama or LM Studio on a Mac, or any other OpenAI-compatible server. Submit a task, follow it live over SSE, and let every tool call run inside a throwaway Docker container. Talk to it from the browser, a Mac menu bar app, or your iPhone.

View on GitHub Download for Mac Read the docs →
Contributions welcome. Issues and PRs open.
cedar-chat: the agent writes a test file, runs pytest in its sandbox, and summarizes the result cedar-chat, the included web UI. Light and dark, desktop and mobile.

How a run works

  1. 1POST /v1/runs queues the task, with any PDFs or images attached, and answers 202 right away.
  2. 2When a slot frees up, cedar spins up a fresh sandbox container for the run. If you asked for a plan, the model breaks the task into steps first, and an interactive run waits for you to agree to them.
  3. 3The model gets the conversation and the tools you chose. Tool calls run in the sandbox and results go back, errors included so it can recover. Risky calls (sending mail, installs, deletes) can wait for your approval.
  4. 4Loop until the model is done, asks you a question, hits max_turns, or runs out of time.
  5. 5The sandbox is destroyed. The run ends completed, failed, or cancelled, with everything logged to SQLite, and a webhook tells you it's over. Its workspace stays for a follow-up.

Quick start

# 0. any OpenAI-compatible model server
vllm serve deepseek-ai/DeepSeek-V4-Flash \
  --trust-remote-code --tokenizer-mode deepseek_v4 \
  --enable-auto-tool-choice --tool-call-parser deepseek_v4

# 1. the sandbox image, then the server
docker build -t cedar-sandbox sandbox/
export CEDAR_API_KEYS=$(openssl rand -hex 24) \
  CEDAR_ADMIN_KEYS=$CEDAR_API_KEYS
cargo run --release

# 2. register the model, start a run, follow it live
curl -s -X PUT -H "Authorization: Bearer $KEY" \
  -H 'content-type: application/json' \
  -d '{"base_url": "http://localhost:8000/v1",
       "model": "deepseek-ai/DeepSeek-V4-Flash"}' \
  localhost:8080/v1/admin/models/deepseek
curl -s -H "Authorization: Bearer $KEY" \
  -H 'content-type: application/json' \
  -d '{"prompt": "write hello.py, run it"}' \
  localhost:8080/v1/runs
curl -N -H "Authorization: Bearer $KEY" \
  localhost:8080/v1/runs/<id>/events

Tools, in and out of the box

Inside the sandbox: bash, files, Python, PDFs, charts, and reading Word, Excel, and PowerPoint. On the host, each behind a switch: web search and fetch, weather, maps, recipes, trip planning, stock comparisons, a headless browser, Gmail and Calendar.

Add your own as a Rust trait, or drop a Python script in TOOLS_DIR: no rebuild, and each call runs in a container of its own. Then share it with everyone.

A small HTTP API

Start, list, cancel, and delete runs. Pick the model, reasoning level, and tools per run. Stream events with replay and resume, answer plans and approvals, download workspace files, continue a finished run, or compact one into a single prompt.

Signed webhooks or one event stream when runs end. Bearer keys, per-key limits, plain JSON errors.

Isolation is the design

One container per run, non-root, all capabilities dropped, memory and CPU limits, networking off by default. The host filesystem is never touched. Model keys and saved credentials stay out of the sandbox, encrypted at rest, and out of the logs.

Workspaces persist for continuations, then expire.

Runs well on a DGX Spark

vLLM, cedar, and the chat UI together on one NVIDIA DGX Spark, as systemd services you reach from your laptop, and over Tailscale HTTPS from your phone. The guide walks through it.

Read DEPLOYMENT.md →

Write a tool in Python, share it on GitHub

A tool is a folder: a tool.json that tells the model what it does, and a Python script that reads JSON on stdin and prints its answer. No Rust, no rebuild.

The manifest also says what the tool needs: the hosts it reaches, the secrets it reads, the packages it installs, and whether it handles health data. cedar holds it to that. Every call runs in a container of its own that sees only that tool, gets the network only if it declared hosts, and gets only its own secrets, saved encrypted in the settings, never in a file.

1 · write

Put the folder in your TOOLS_DIR and try it in a conversation right away.

2 · share

Open a pull request that adds it to registry/ in the cedar repo. CI checks the rules, a maintainer reads the code.

3 · install

Anyone's cedar lists it under Community tools. One click shows what it asks for, installs it, and checks every file's hash.

Community tools are not officially supported, so each call waits for your OK until you allow that version. Health tools come with built-in rules: informational only, safety first, and never a dose or a device setting. The first one in the registry reads a Tandem insulin pump and CGM and compares your last day with the week before.

Share a tool Browse the registry How installs work →
# tools/air_quality/tool.json
{
  "description": "Current air quality for a city.",
  "version": "1.0.0",
  "author": "You",
  "license": "Apache-2.0",
  "input_schema": {
    "type": "object",
    "properties": { "city": { "type": "string" } },
    "required": ["city"]
  },
  "network": ["api.openaq.org"],
  "secrets": ["OPENAQ_API_KEY"],
  "pip": ["requests>=2.31"]
}
# tools/air_quality/tool.py
import json, os, sys
import requests

args = json.load(sys.stdin)
r = requests.get(
    "https://api.openaq.org/v3/locations",
    params={"city": args["city"], "limit": 1},
    headers={"X-API-Key": os.environ["OPENAQ_API_KEY"]},
    timeout=20,
)
if not r.ok:
    sys.exit(f"OpenAQ said {r.status_code}")  # the model sees it
print(json.dumps(r.json()["results"][:1]))

# share it
python3 registry/build_index.py --check

Apps that talk to it

cedar-chat, in the browser

Conversations with live tool calls, a files panel, and maps, recipes, routes, and stock charts drawn as cards. Attach PDFs and photos. Turn a conversation into a scheduled agent that runs daily or weekly, and get told when a response ends: browser push, Pushover, email, or your iPhone.

chat/README.md →

Cedar for Mac

A signed menu bar app that bundles both servers in one DMG. Bring Docker (or OrbStack, Colima) and a model server, Ollama or LM Studio on the Mac or a vLLM elsewhere, pick a model from the list it reports, and chat. One checkbox shares it with your iPhone over Tailscale, paired by QR code.

Download from releases →

Cedar for iPhone and iPad

A native SwiftUI client for the same conversations: streaming replies, native cards with Apple Maps, clarifying questions as a form, plans and tool calls to approve, and push notifications through APNs when a run ends while you are away. HTTPS only.

iOS/README.md →

cedar and OpenClaw

Both are open-source agents you run yourself. OpenClaw is a personal assistant that lives in your chat apps and acts on your computer. cedar is a run service: every task gets its own disposable sandbox, behind an API that your own clients, and ours, call.

cedar OpenClaw
Where tools run In a fresh Docker container per run: non-root, capabilities dropped, no network unless you turn it on. Never on the host. On the host for the main session, unless you configure sandboxing.
How you reach it An HTTP API with live SSE events and webhooks, plus a web chat, a Mac app, and an iOS app. The messaging apps you already use (WhatsApp, Telegram, Slack, Discord, iMessage, and many more), plus a CLI and companion apps.
Models Any OpenAI-compatible server, registered per model. Built for local inference: vLLM, Ollama, LM Studio. Hosted and local providers, swappable as plugins.
Guardrails Plans to agree to, and approvals for mail, downloads, installs, deletes, network calls, and community tools. Every run, message, and event is kept in SQLite. Inbound messages are treated as untrusted; unknown senders in DMs have to be paired first.
Extending it A Rust trait, or a Python script with a JSON manifest that runs in a container of its own. Share it through the community registry on GitHub, where every file is hash-pinned and reviewed. Skills and plugins, with a community registry in ClawHub.
Stack Rust, SQLite, Docker. Apache 2.0. Node.js and TypeScript. MIT.

Pick cedar when the agent should never touch the machine it runs on, when you want to build on it over HTTP, or when the model runs on your own GPU. Pick OpenClaw when you want one assistant across all your chat apps that can act on your own computer.

OpenClaw details from its README, October 2026. Corrections welcome.