Skip to content

Request for direction: Context Continuity Packet metadata for CAP events #477

Description

@SeCuReDmE-main-dev

Summary

A comment on the OpenAI Swarm context-continuity discussion pointed to Commonly as a kernel-owned/shared-layer approach to continuity, rather than runtime-attached memory.

That maps closely to Commonly's existing architecture:

  • Commonly is the social/kernel layer, not the agent runtime.
  • CAP keeps the external runtime surface small.
  • AgentMemory already owns durable continuity by (agentName, instanceId).
  • Agent events already carry delivery and memory freshness signals.

I would like maintainer direction on whether this pattern should be named explicitly in Commonly as Context Continuity Packet / CCP metadata, or whether maintainers prefer another name, shape, or smaller scope.

Context

The useful distinction from the Swarm thread is not "add another memory system." It is:

continuity should be owned by the shared layer/kernel, not attached to each runtime.

Commonly already seems to be on that side of the design:

  • docs/adr/ADR-003-memory-as-kernel-primitive.md
  • docs/adr/ADR-004-commonly-agent-protocol.md
  • docs/adr/ADR-012-memory-propagation-and-injection.md
  • docs/agents/AGENT_RUNTIME.md

The open question is whether external CAP driver authors would benefit from a small named convention for optional continuity metadata at event/message boundaries.

Request For Direction

Which direction would you prefer?

  1. No new convention.

    • Existing AgentMemory and CAP docs are enough.
  2. Docs-only convention.

    • Document Context Continuity Packet / CCP as optional CAP event metadata.
    • No code or behavior change.
  3. Full additive kernel metadata.

    • Attach a computed top-level continuity packet to CAP events.
    • Use existing AgentEvent and AgentMemory state.
    • No new CAP verb, no new memory store, no prompt injection.
  4. Rename or reshape the convention.

    • Keep the kernel-owned continuity idea, but choose a different name, field placement, or schema shape.

My preference is option 3, with the name Context Continuity Packet / CCP, because that name has already been useful in organizing this pattern and appears recognizable across adjacent discussions.

PR Timing

I am currently testing a full draft implementation locally. I am opening this issue first so maintainers can give direction before the PR is published.

After the local tests pass, I plan to open a PR linked from this issue. The PR will be an implementation proposal attached to this RFI, not a final maintainer decision. If maintainers prefer a different name, schema shape, field placement, or a smaller docs-only convention, I can adjust the branch accordingly.

This issue should remain open after the PR is opened, so maintainers can answer the direction questions here.

Proposed Shape

The draft implementation adds optional top-level event metadata:

interface ContextContinuityPacketV1 {
  schema: 'commonly.ccp.v1';
  contextId: string;
  owner: {
    agentName: string;
    instanceId: string;
    podId?: string;
  };
  provenance: {
    source: 'cap.event';
    eventId?: string;
    eventType?: string;
    trigger?: string;
    createdAt?: string;
    deliveredAt?: string;
  };
  freshness?: {
    memoryRevision?: number;
    memoryRevisionAtDelivery?: number;
    lastSeenRevision?: number;
    status: 'valid' | 'stale' | 'unknown';
  };
  refs?: {
    messageId?: string;
    replyToMessageId?: string;
    threadId?: string;
    taskId?: string;
    requestId?: string;
    summaryId?: string;
    integrationId?: string;
    memorySections?: string[];
  };
}

The packet is intended to reference existing kernel state only. It should not copy full prompt content or memory bodies.

Non-Goals

  • No new CAP verb.
  • No replacement for AgentMemory.
  • No new persistence model.
  • No default prompt-prefix injection.
  • No runtime-specific memory glue.
  • No claim that Commonly must adopt Swarm terminology unchanged.

Acceptance Criteria For A Draft PR

  • event.continuity is additive and optional.
  • Existing CAP payload fields remain unchanged.
  • AgentMemory remains the durable continuity primitive.
  • CCP references memory freshness but does not store memory bodies.
  • Older drivers can ignore the packet safely.
  • Docs explain that maintainers can rename or reshape the convention.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions