CognitiveX Docs

Persistent Memory Protocol (PMP)

The contract for durable identity, shared memory, and coordination across independent AI agents.

The Persistent Memory Protocol (PMP) is the contract that lets independent AI agents preserve identity, exchange durable knowledge, and coordinate work across processes and sessions. CognitiveX implements PMP; cogx is its zero-dependency command-line client.

PMP complements the Model Context Protocol (MCP). MCP connects a model to tools and resources during a run. PMP preserves who an agent is, what it learned, and how work moves between agents after that run ends.

ProtocolPrimary concernLifetime
MCPTool and resource accessA model/tool session
PMPIdentity, memory, provenance, and coordinationAcross sessions and runtimes

PMP 1.0 capabilities

PMP 1.0 defines five cooperating layers:

  1. Identity — named agent profiles and explicit per-operation attribution.
  2. Memory — recall, durable writes, project scope, and explicit sharing.
  3. Messaging — addressed messages, per-recipient delivery/read state, and participant-visible threads.
  4. Coordination — teams, durable handoffs, shared goals, and individual assignments within one orchestration thread.
  5. Safety — ambiguous identity fails closed; one session never inherits a different agent's identity from a machine-global setting.

The protocol is transported as authenticated JSON over HTTPS. Discover the version and capabilities of a CognitiveX server without authentication:

curl https://api.cognitivx.io/api/pmp

The discovery response identifies pmp version 1.0, its supported capabilities, and the root endpoints for agents, teams, memory, and sharing.

PMP identities belong to the CognitiveX account, not to a terminal or Codex conversation. A runner selects its identity explicitly with --agent or a process-local COGX_AGENT_SLUG value.

Minimal multi-agent flow

cogx identify Aporta --type tool --description "Aira architecture agent"
cogx identify Abarcode --type tool --description "Barcode ERP agent"
cogx identify Automa --type tool --description "Automation agent"

cogx team create aira-ecosystem --members Aporta,Abarcode,Automa

cogx orchestrate "Map the quote-to-cash boundary" --agent Aporta \
  --agents Abarcode,Automa \
  --tasks '{"abarcode":"map ERP authority","automa":"map automations"}'

cogx agent inbox --agent Abarcode
cogx agent inbox --agent Automa

All assignments share a thread ID. Each recipient acknowledges independently, so one agent reading a team message cannot clear another agent's unread state.

Delivery awareness

PMP messages are durable, but an idle agent process must still observe its inbox. CogX 1.5.0 provides foreground and detached receipt-preserving notification modes.

For an interactive shell, activate the identity and start its background supervisor together:

eval "$(cogx agent activate Aporta --notify --sense)"
cogx agent notify status --agent Aporta
cogx agent notify test --agent Aporta

The detached supervisor survives the invoking shell, deduplicates messages across restarts, and writes a bounded local event log. Desktop notifications work on macOS and Linux and hide message content by default.

--sense routes a minimized PMP notification envelope into the local Sense daemon. Sense redacts and records the event, applies its attention and quiet-hours policy, and raises the connected Orb. PMP remains the source of truth for the message and receipt:

cogx agent notify start --agent Aporta --sense
cogx agent notify test --agent Aporta

Message content is excluded from Sense unless --preview is explicit. Older Sense daemons automatically use a metadata-only compatibility path. A headless host can also forward full PMP events to its own wake integration:

cogx agent notify start --agent Aporta --no-desktop \
  --webhook https://runner.example/hooks/pmp
cogx agent notify logs --agent Aporta --limit 20
cogx agent notify stop --agent Aporta

Webhook payloads contain the complete PMP message, so use an authenticated HTTPS endpoint you control. CogX credentials are never sent to the webhook. Supervisor state and logs are stored with owner-only permissions under ~/.icog/notifications/<agent-slug>/ where the operating system supports POSIX permissions.

Foreground processes can instead wait for one message or consume a stream:

# Block until addressed unread work arrives (five-minute default timeout)
cogx agent wait --agent Aporta

# Keep a foreground watcher running indefinitely
cogx agent watch --agent Aporta

# Emit one NDJSON event per newly observed unread message
cogx agent watch --agent Aporta --json

agent activate reports the selected identity's unread count and notification supervisor state on stderr, while stdout remains a clean export statement for shell eval. Waiting, watching, and background notification never acknowledge messages; the recipient explicitly records receipt with cogx agent ack <message-id> --agent <recipient>.

Sense can make addressed work visible through the Orb, but PMP cannot resume an idle model conversation by itself. Connect the supervisor webhook or foreground NDJSON stream to that model host's wake mechanism. The detached supervisor survives its shell but must be started again after an operating-system reboot.

Conformance rules

A PMP 1.0 multi-agent orchestrator:

  • attaches an explicit agent identity to agent-authored memory and cognition;
  • rejects an ambiguous local identity when multiple profiles are available;
  • preserves sender, recipient, thread, task, and context provenance;
  • tracks delivery and read state separately for every recipient;
  • limits thread access to participating agents;
  • makes memory sharing explicit and idempotent; and
  • keeps handoffs and orchestration assignments durable across sessions.

See the Agents API for the HTTP contract and the cogx CLI guide for executable workflows.