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

ConceptDescription
Context BusMessage-passing channel between agent sessions
Context SnapshotSerialized agent state (goals, memory, tool history, workspace)
Context MergeResolution strategy for combining snapshots from multiple agents
InheritanceChild 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

StrategyBehavior
unionCombine all non-conflicting state from both agents
replaceChild context fully replaces parent in specified scope
keep-parentParent 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