> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cxpro.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Run the capsule → match → plan → execute → receipt loop

> 🟢 **Status:** STABLE\
> **Applies to:** CXP-Core · CXP-Agent · CXP-Robot\
> **Last updated:** 2026-02-01

This quickstart shows the minimum flow using JSON payloads. Your transport can be HTTP, ROS2, MQTT, or something else—the core model is the same.

## 1) Create a Context Capsule

A capsule is a versioned document describing intent and constraints.

```json theme={null}
{
  "cxp_version": "0.1",
  "capsule_id": "cap_demo_001",
  "name": "Send follow-up email to lead",
  "goal": {
    "type": "agent_action",
    "success": { "email_sent": true }
  },
  "constraints": {
    "requires_approval": false,
    "allowed_tools": ["email.send"]
  },
  "provenance": {
    "created_by": "agent_A",
    "confidence": 0.8
  }
}
```

## 2) Describe an execution target

Targets advertise capabilities, limits, and tool inventory.

```json theme={null}
{
  "descriptor_version": "0.1",
  "target_id": "agent_local_01",
  "type": "agent",
  "tools": ["email.send", "crm.update"],
  "policy_enforced": true
}
```

## 3) Match

Matching answers: “Can this target execute this capsule safely?”

* **green**: compatible
* **yellow**: compatible with mitigations
* **red**: incompatible

```json theme={null}
{
  "capsule_id": "cap_demo_001",
  "target_id": "agent_local_01",
  "match": "green",
  "reasons": []
}
```

## 4) Plan

The planner binds capsule intent to concrete steps.
Example (simplified):

```json theme={null}
{
  "plan_id": "plan_001",
  "steps": [
    {
      "type": "tool_call",
      "tool": "email.send",
      "args": { "to": "lead@example.com", "subject": "Follow-up", "body": "..." }
    }
  ]
}
```

## 5) Execute + Receipt

Execution produces a receipt so outcomes are auditable and repeatable.

```json theme={null}
{
  "receipt_id": "rcpt_001",
  "plan_id": "plan_001",
  "status": "success",
  "outputs": { "message_id": "abc123" },
  "audit": { "executed_by": "agent_local_01" }
}
```

## Next

* /docs/learn/context-capsules
* /docs/learn/capability-matching
* /docs/learn/policy-and-safety
