Getting Started
Quickstart
Section titled “Quickstart”This guide covers everything you need to run Clasper end-to-end.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- OpenAI API key (or other LLM provider)
Step 1: Install Clasper
Section titled “Step 1: Install Clasper”git clone <repo-url>cd claspernpm installcp .env.example .envStep 2: Set Up a Backend
Section titled “Step 2: Set Up a Backend”Clasper is stateless — it needs a backend to store tasks, messages, and documents. Choose one option:
Option A: Reference Implementation (for testing)
Section titled “Option A: Reference Implementation (for testing)”Run the in-memory reference backend:
export AGENT_JWT_SECRET=dev-secret-change-menpx tsx examples/mission-control-lite/server.tsThis starts a backend at http://localhost:9001 with all required endpoints.
Option B: Use an Existing Backend
Section titled “Option B: Use an Existing Backend”If you have a Mission Control-compatible backend, configure Clasper to point to it:
# In .envBACKEND_URL=http://localhost:8000AGENT_JWT_SECRET=<same-secret-as-backend>See Integration Guide for detailed integration patterns.
Option C: Build Your Own Backend
Section titled “Option C: Build Your Own Backend”Your backend must implement these endpoints:
| Endpoint | Method | Purpose |
|---|---|---|
/api/mission-control/capabilities | GET | Feature discovery |
/api/mission-control/tasks | GET | List tasks for user |
/api/mission-control/tasks | POST | Create a task |
/api/mission-control/messages | POST | Post a message |
/api/mission-control/documents | POST | Create a document |
Requirements:
- Shared secret — Clasper and your backend must share the same
AGENT_JWT_SECRET - Agent token auth — Accept
X-Agent-Tokenheader with JWT containingtype,user_id,agent_role - Tenant isolation — Scope all reads/writes by
user_idfrom the token - Idempotency — Create endpoints must accept
idempotency_key
Validate your implementation:
export CONTROL_PLANE_URL=http://localhost:8000export AGENT_TOKEN=<your-agent-jwt>npm run conformanceSee Control Plane Contract for the full specification.
Step 3: Create a Workspace
Section titled “Step 3: Create a Workspace”The workspace defines your agent’s personality and behavior:
mkdir -p workspace/souls workspace/skillsRequired: workspace/AGENTS.md — Operating rules:
# Operating Rules
- Be helpful and accurate- Keep responses concise- Ask for clarification when neededRequired: workspace/SOUL.md — Agent persona (or souls/<role>.md for multi-agent):
# Agent Persona
You are a helpful assistant.
## Communication style- Direct and clear- Evidence-based answersOptional files:
IDENTITY.md— Branding (name, tagline)HEARTBEAT.md— Checklist for autonomous health checksskills/<name>/SKILL.md— Skill definitions for tool use
See Workspace Configuration for the full specification.
Step 4: Configure Environment
Section titled “Step 4: Configure Environment”Edit .env:
# Backend connectionBACKEND_URL=http://localhost:9001 # or your backend URLAGENT_JWT_SECRET=dev-secret-change-me
# LLM providerOPENAI_API_KEY=sk-...
# Workspace path (default: ./workspace)CLASPER_WORKSPACE=./workspace
# Optional: auto-create task with this titleCLASPER_DEFAULT_TASK=My Agent ThreadStep 5: Start the Daemon
Section titled “Step 5: Start the Daemon”npm run devClasper starts at http://localhost:8081.
Verify it’s running:
curl http://localhost:8081/health# {"status":"ok"}Step 6: Send Your First Message
Section titled “Step 6: Send Your First Message”curl -X POST http://localhost:8081/api/agents/send \ -H "Content-Type: application/json" \ -H "X-Daemon-Key: <your-daemon-key>" \ -d '{ "user_id": "user-123", "agent_role": "default", "message": "Hello, what can you help me with?" }'Common Commands
Section titled “Common Commands”# Development servernpm run dev
# Production buildnpm run build && npm start
# Run dispatcher (delivers notifications from backend to daemon)npm run dispatcher
# Run heartbeat checkUSER_ID=user-123 AGENT_ROLE=default npm run heartbeat
# Run conformance tests against your backendnpm run conformance
# Run unit testsnpm testDocker
Section titled “Docker”cp .env.example .env# Edit .env with your settingsdocker compose up --buildOps Console (Optional)
Section titled “Ops Console (Optional)”The Operations Console at /ops provides trace viewing, replay, and governance controls. It requires OIDC authentication:
OPS_OIDC_ISSUER=https://your-idp.comOPS_OIDC_AUDIENCE=clasper-opsOPS_OIDC_JWKS_URL=https://your-idp.com/.well-known/jwks.jsonOPS_RBAC_CLAIM=rolesSee Governance & Safety for RBAC configuration.
Next Steps
Section titled “Next Steps”| Document | Description |
|---|---|
| Integration Guide | Backend ↔ Clasper integration patterns |
| Workspace Configuration | Full workspace specification |
| API Reference | API reference |
| Operations & Observability | Tracing, replay, and skill lifecycle |
| Governance & Safety | RBAC, budgets, and audit |