Cross-Agent Context (CACP)
The Cross-Agent Context Protocol (CACP) enables multi-agent session collaboration within CortexPrism, allowing agents to share context, goals, and workspace state across concurrent sessions.
Overview
CACP provides a structured protocol for agents to exchange information during collaborative workflows. When multiple agents are working on related tasks, CACP ensures they maintain a shared understanding of the problem domain, progress made, and current state.
Key Concepts
| Concept | Description |
|---|---|
| Context Bus | Message-passing channel between agent sessions |
| Context Snapshot | Serialized agent state (goals, memory, tool history, workspace) |
| Context Merge | Resolution strategy for combining snapshots from multiple agents |
| Inheritance | Child agents can inherit parent context at spawn time |
Context Sharing Flow
Agent A (Parent)
│
├── shareContext() → Context Bus
│ context includes: goals, tool history, memory hits, workspace state
│
├── Spawn Agent B with inherited context
│ └── Agent B receives filtered context snapshot at init
│
├── Agent B completes → returns enriched context
│ └── Parent merges child's findings into its own context
│
└── Context resolution ── merge strategy applied (union / replace / keep-parent)
Context Merge Strategies
| Strategy | Behavior |
|---|---|
union | Combine all non-conflicting state from both agents |
replace | Child context fully replaces parent in specified scope |
keep-parent | Parent context takes precedence; child additions are additive |
Integration Points
- Sub-agents — automatic context inheritance when spawning typed child agents
- Multi-Agent Orchestration — context sharing between agents in sequential, parallel, and debate strategies
- Swarm Coordination — cross-instance context via A2A protocol transport
- Memori Checkpoints — context captured in checkpoint snapshots for session resumption
See Also
- Sub-Agents — Spawning specialized child agents
- Multi-Agent Orchestration — 6 coordination strategies
- Swarm Orchestration — Distributed agent coordination
- Memori Checkpoints — Session snapshot and restore