> ## 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.

# CXP Protocol

> Progressive context exchange for agents and robots

<div className="cxp-page">
  <div className="cxp-hero">
    {/* Ambient layers */}

    <div className="cxp-ambient">
      <div className="cxp-aurora" />

      <div className="cxp-grid" />

      <div className="cxp-noise" />

      <div className="cxp-scan" />
    </div>

    <div className="cxp-hero-inner">
      <div className="cxp-toprow">
        <div className="cxp-pill">
          <span className="cxp-dot" />

          Context Exchange Protocol

          <span className="cxp-pill-glow" />
        </div>

        <div className="cxp-mini-metric">
          <div className="cxp-mini-k">Mode</div>
          <div className="cxp-mini-v">SPARSE → FULL</div>
        </div>
      </div>

      <h1 className="cxp-h1">
        Share context between agents and robots —{" "}
        <span className="cxp-grad">without flooding</span>.
      </h1>

      <p className="cxp-sub">
        CXP standardizes how structured context is packaged, governed, and exchanged across agent runtimes and robot stacks.
        Start with a preview, expand only when needed.
      </p>

      <div className="cxp-cta">
        <a className="cxp-btn cxp-btn-primary" href="/docs/getting-started/intro">
          <span className="cxp-btn-text">Read the docs</span>

          <span className="cxp-btn-shine" />

          <span className="cxp-btn-glow" />
        </a>

        <a className="cxp-btn cxp-btn-ghost" href="/docs/getting-started/quickstart">
          Quickstart
        </a>
      </div>

      {/* Animated “packet” protocol diagram (pure CSS) */}

      <div className="cxp-packets">
        <div className="cxp-packet-node">
          <div className="cxp-packet-title">Preview</div>
          <div className="cxp-packet-sub">minimal summary + refs</div>
          <div className="cxp-chip">CONTEXT\_PREVIEW</div>
        </div>

        <div className="cxp-packet-lane">
          <span className="cxp-packet p1" />

          <span className="cxp-packet p2" />

          <span className="cxp-packet p3" />

          <span className="cxp-packet p4" />
        </div>

        <div className="cxp-packet-node">
          <div className="cxp-packet-title">Request</div>
          <div className="cxp-packet-sub">ask for specific IDs</div>
          <div className="cxp-chip">CONTEXT\_REQUEST</div>
        </div>

        <div className="cxp-packet-lane">
          <span className="cxp-packet p5" />

          <span className="cxp-packet p6" />
        </div>

        <div className="cxp-packet-node">
          <div className="cxp-packet-title">Expand</div>
          <div className="cxp-packet-sub">return only requested slices</div>
          <div className="cxp-chip">CONTEXT\_EXPAND</div>
        </div>
      </div>

      {/* Living demo strip (cleaner, less black) */}

      <div className="cxp-live">
        <div className="cxp-live-title">CXP Sparse mode</div>

        <div className="cxp-live-row">
          <div className="cxp-live-chip">CONTEXT\_PREVIEW</div>
          <div className="cxp-live-arrow">→</div>
          <div className="cxp-live-chip">CONTEXT\_REQUEST</div>
          <div className="cxp-live-arrow">→</div>
          <div className="cxp-live-chip">CONTEXT\_EXPAND</div>
        </div>

        <div className="cxp-live-code" aria-label="CXP preview snippet">
          <pre>
            <code>
              {`{
                            "cxp_version": "1.0",
                            "mode": "SPARSE",
                            "type": "CONTEXT_PREVIEW",
                            "summary": "Minimal info + references",
                            "context_refs": ["mem_332", "doc_882"],
                            "policy": { "ttl": "15m", "purpose": "planning" }
                            }`}
            </code>
          </pre>

          <div className="cxp-cursor" />
        </div>
      </div>

      <div className="cxp-float-row">
        <div className="cxp-float-card">
          <div className="cxp-float-title">Typed context</div>
          <div className="cxp-float-body">Task · Memory · World · Policy · Provenance</div>

          <div className="cxp-float-glow" />
        </div>

        <div className="cxp-float-card">
          <div className="cxp-float-title">Governed sharing</div>
          <div className="cxp-float-body">Purpose limits · Retention TTL · Audit signals</div>

          <div className="cxp-float-glow" />
        </div>

        <div className="cxp-float-card">
          <div className="cxp-float-title">Embodied support</div>
          <div className="cxp-float-body">Frames · Timebases · Safety constraints</div>

          <div className="cxp-float-glow" />
        </div>
      </div>
    </div>

    {/* Orbs */}

    <div className="cxp-orb cxp-orb-1" />

    <div className="cxp-orb cxp-orb-2" />
  </div>

  <div className="cxp-marquee" aria-hidden>
    <div className="cxp-marquee-track">
      <span>preview-first</span><span>policy-bound</span><span>provenance</span><span>robot-ready</span><span>transport-neutral</span><span>budget-aware</span>
      <span>preview-first</span><span>policy-bound</span><span>provenance</span><span>robot-ready</span><span>transport-neutral</span><span>budget-aware</span>
    </div>
  </div>

  ***

  ## Progressive context flow

  <div className="cxp-flow-wrap" data-cxp-scroll>
    <div className="cxp-flow-head">
      <div className="cxp-flow-title">Preview → Request → Expand</div>
      <div className="cxp-flow-sub">A progressive disclosure handshake for fast, private coordination.</div>
    </div>

    {/* Pure CSS “progress” animation (no scroll JS) */}

    <div className="cxp-flow" data-cxp-flow>
      <div className="cxp-track">
        <div className="cxp-track-fill" />

        <div className="cxp-pulse" />
      </div>

      <div className="cxp-node cxp-node-1">
        <div className="cxp-node-title">Preview</div>
        <div className="cxp-node-sub">Minimal summary + references</div>
        <div className="cxp-chip">CONTEXT\_PREVIEW</div>
      </div>

      <div className="cxp-node cxp-node-2">
        <div className="cxp-node-title">Request</div>
        <div className="cxp-node-sub">Ask for specific IDs</div>
        <div className="cxp-chip">CONTEXT\_REQUEST</div>
      </div>

      <div className="cxp-node cxp-node-3">
        <div className="cxp-node-title">Expand</div>
        <div className="cxp-node-sub">Return only requested slices</div>
        <div className="cxp-chip">CONTEXT\_EXPAND</div>
      </div>
    </div>
  </div>

  ***

  ## CXP in 30 seconds

  <CardGroup cols={3}>
    <Card title="1) Provider publishes previews">
      The context provider returns a small summary + references — not a full dump.
    </Card>

    <Card title="2) Receiver requests only what it needs">
      The runtime asks for specific IDs (and can set a strict budget).
    </Card>

    <Card title="3) Provider expands targeted slices">
      The provider enforces policy + provenance and returns only the requested slices.
    </Card>
  </CardGroup>

  ***

  ## Interop

  CXP is designed to coexist with other protocols:

  * **MCP** for tool access and action execution.
  * **A2A / A2R** for agent-to-agent and agent-to-robot coordination.
  * **ROS2 / MQTT / gateways** for embodied transport.

  CXP focuses on **progressive context exchange** (preview → request → expand). MCP focuses on **tool invocation**.

  ## Why teams use CXP

  <CardGroup cols={3}>
    <Card title="Lower tokens + bandwidth">
      Preview-first exchange avoids context dumps. Robots stay fast. Agents stay cheap.
    </Card>

    <Card title="Policy travels with context">
      Share with purpose limits, retention TTL, and auditable use.
    </Card>

    <Card title="Works across stacks">
      Cloud agents, tools, and robots (ROS2, MQTT/IoT, gateways) can interop with one contract.
    </Card>
  </CardGroup>

  ***

  ## Get started

  <Steps>
    <Step title="Read the introduction">
      Learn the CXP contract and message types.
    </Step>

    <Step title="Implement a Preview handler">
      Start with CXP-SPARSE: preview → request → expand.
    </Step>

    <Step title="Add robot adapters">
      Map perception summaries + safety constraints into the CXP context model.
    </Step>
  </Steps>

  <a className="cxp-btn cxp-btn-wide cxp-btn-primary" href="/docs/getting-started/intro">
    <span className="cxp-btn-text">Go to Documentation</span>

    <span className="cxp-btn-shine" />

    <span className="cxp-btn-glow" />
  </a>
</div>
