Crates.io | caxton |
lib.rs | caxton |
version | 0.1.4 |
created_at | 2025-08-06 16:38:38.379254+00 |
updated_at | 2025-08-11 05:02:35.183164+00 |
description | A secure WebAssembly runtime for multi-agent systems |
homepage | https://github.com/jwilger/caxton |
repository | https://github.com/jwilger/caxton |
max_upload_size | |
id | 1784047 |
size | 2,935,970 |
Build production-ready multi-agent systems in minutes, not months.
Caxton is a production-ready server that orchestrates multi-agent systems. Deploy agents written in any WebAssembly-compatible language - JavaScript, Python, Go, or Rust - with built-in message routing, fault tolerance, and observability.
⚠️ Important: Caxton is a standalone server application, not a Rust library. You install and run it like any other server (Redis, Nginx, etc.) and interact with it via CLI or API. Unlike traditional databases, Caxton requires no external dependencies - not even PostgreSQL.
Caxton is a multi-agent orchestration server - like Redis for caching or PostgreSQL for data, but for coordinating intelligent agents.
You install Caxton, deploy your agents (written in any language), and it handles all the complex distributed systems challenges: message routing, fault tolerance, observability, and scaling.
✅ Install in seconds - Single binary, no external dependencies ✅ Deploy any language - If it compiles to WebAssembly, it runs on Caxton ✅ Production-ready - Built-in observability, fault tolerance, and horizontal scaling ✅ Zero boilerplate - Message routing and coordination handled for you ✅ Truly lightweight - No databases required, uses coordination protocols instead
Caxton runs as a server on your infrastructure:
Quick Install (Linux/macOS):
curl -sSL https://caxton.io/install.sh | sh
Package Managers:
# macOS
brew install caxton
# Ubuntu/Debian
sudo apt install caxton
# Docker
docker run -d -p 8080:8080 caxton/caxton:latest
Verify Installation:
caxton version
caxton server status
# 1. Start the server (10 seconds)
caxton server start
# ✓ Server running at http://localhost:8080
# ✓ Dashboard available at http://localhost:8080/dashboard
# 2. Deploy agents that talk to each other (20 seconds)
caxton deploy examples/ping.wasm --name ping
caxton deploy examples/pong.wasm --name pong
# ✓ Agent 'ping' deployed and healthy
# ✓ Agent 'pong' deployed and healthy
# 3. Watch them communicate (immediate gratification)
caxton logs --agents ping,pong --follow
# [ping] Sending ping to pong
# [pong] Received ping, sending pong back
# [ping] Received pong, sending ping to pong
# ...
# That's it! You have a working multi-agent system.
# No configuration files. No infrastructure setup. No distributed systems PhD required.
Caxton is a standalone application server that hosts and orchestrates WebAssembly agents:
┌─────────────────────────────────────────────────────────────┐
│ Your Infrastructure │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌────────────────────────────┐ │
│ │ CLI Tool │ │ Management Dashboard │ │
│ │ (caxton) │ │ (Web UI - Future) │ │
│ └──────┬──────┘ └──────────┬─────────────────┘ │
│ │ │ │
│ │ Network │ │
│ └───────────┬───────────────┘ │
│ │ │
│ ┌──────────────────▼────────────────────────────────────┐ │
│ │ Caxton Server Process │ │
│ │ ┌─────────────────────────────────────────────────┐ │ │
│ │ │ Management API Layer │ │ │
│ │ │ • gRPC (primary) • REST (gateway) │ │ │
│ │ │ • Authentication • Authorization │ │ │
│ │ └────────────────┬────────────────────────────┘ │ │
│ │ │ │ │
│ │ ┌────────────────▼────────────────────────────┐ │ │
│ │ │ Agent Runtime Environment │ │ │
│ │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │
│ │ │ │ Agent A │ │ Agent B │ │ Agent C │ ... │ │ │
│ │ │ │ (WASM) │ │ (WASM) │ │ (WASM) │ │ │ │
│ │ │ └────┬────┘ └────┬────┘ └────┬────┘ │ │ │
│ │ │ └───────────┼───────────┘ │ │ │
│ │ │ │ │ │ │
│ │ │ ┌────────────────▼────────────────────┐ │ │ │
│ │ │ │ FIPA Message Bus (Internal) │ │ │ │
│ │ │ └─────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────────┐ │ │
│ │ │ Observability Layer │ │ │
│ │ │ • Structured Logs • Metrics (Prometheus) │ │ │
│ │ │ • Distributed Traces (OpenTelemetry) │ │ │
│ │ └─────────────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Key Points:
Unlike traditional libraries, Caxton runs independently from your application code. You deploy agents to it and interact via API - no Rust knowledge required.
Capability | Description |
---|---|
Agent Hosting | Deploy and run WebAssembly agents from any language |
Message Routing | Automatic message delivery between agents |
Fault Isolation | Agent crashes don't affect other agents or the server |
Resource Management | CPU and memory limits per agent |
Observability | Logs, metrics, and traces out of the box |
Hot Deployment | Deploy/update agents without server restart |
API Access | Full control via gRPC/REST API |
Agents are WebAssembly modules that can be written in any language that compiles to WASM. Here's the basic structure:
// Example agent in Rust
#[no_mangle]
pub extern "C" fn handle_message(msg_ptr: *const u8, msg_len: usize) -> i32 {
// Your agent logic here
}
For language-specific examples, see the Building Agents Guide.
📖 Full Documentation - Complete guide to Caxton
Most agent frameworks either:
Caxton takes a different approach:
Caxton is a multi-agent orchestration server that handles:
Caxton runs as a standalone server (like PostgreSQL or Redis) and manages all agent coordination for you.
Caxton uses a coordination-first architecture instead of shared databases:
This means Caxton can scale horizontally without database bottlenecks. See ADR-0014 for details.
Agents can access external tools through the Model Context Protocol, including state persistence:
// In your agent (JavaScript example)
// Search the web
const result = await mcp_call("web_search", {
query: "latest news on quantum computing"
});
// Persist state (business provides the backend)
await mcp_call("state_tool", {
action: "store",
key: "agent_checkpoint",
value: currentState
});
Caxton provides:
We're intentionally NOT building:
These can all be built as libraries on top of Caxton's simple primitives.
We welcome contributions! See CONTRIBUTING.md for guidelines.
Key areas where we need help:
Caxton is dual-licensed under Apache 2.0 and MIT licenses.
Caxton is inspired by the Actor model, the BEAM VM's approach to fault tolerance, and decades of research in multi-agent systems. Special thanks to the WebAssembly and Rust async communities.