You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've developed an extension to A2A, I call OCP - organization consciousness protocol. https://github.com/alinaqi/ocp .. lmk what you think..
Here's why I've done it..
In A2A we have task delegation and tool invocation which are request/response patterns - they are insufficient for having a true organization consciousness where all agents collaborate with eachother.
// Example: Team decides on architectural change
await send({
protocol: "a2a+ocp",
type: "ocp.consensus.propose",
to: "broadcast",
payload: {
proposalId: "prop-789",
topic: "Switch to PostgreSQL",
proposal: {
decision: "Migrate from MySQL to PostgreSQL",
rationale: "Better JSON support, more features",
impact: "2 weeks migration time"
},
votingPeriod: 86400, // 24 hours
requiredVotes: 3 // Need 3 agents to agree
}
});
A2A has no real time collective awareness. OCP has
// Broadcast what you're currently working on
interface AwarenessBeacon {
type: "ocp.awareness.beacon";
payload: {
status: "working" | "blocked" | "reviewing" | "idle";
currentContext: {
task?: string;
file?: string;
blockedOn?: string;
};
availability: "available" | "busy" | "away";
};
}
// Bob broadcasts he's blocked
await send({
protocol: "a2a+ocp",
type: "ocp.awareness.beacon",
to: "broadcast",
payload: {
status: "blocked",
currentContext: {
task: "Implement auth",
blockedOn: "Waiting for API keys"
},
availability: "available"
}
});
An example flow for knowledge streaming woudl be:
Alice learns about a bug fix
↓
Alice's agent creates knowledge node
↓
Alice's agent sends KNOWLEDGE_STREAM to subscribers
↓
Bob's agent receives stream
↓
Bob's agent merges into local graph
↓
Bob's Claude Code now knows about the fix
Collection query example would be:
User asks Alice's agent: "How do we handle auth?"
↓
Alice's agent sends COLLECTIVE_QUERY (broadcast)
↓
Bob, Carol, Dave agents search their graphs
↓
Each sends COLLECTIVE_RESPONSE with findings
↓
Alice's agent synthesizes responses
↓
Alice's agent sends COLLECTIVE_SYNTHESIS (to all)
↓
All agents learn from the synthesis
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've developed an extension to A2A, I call OCP - organization consciousness protocol. https://github.com/alinaqi/ocp .. lmk what you think..
Here's why I've done it..
In A2A we have task delegation and tool invocation which are request/response patterns - they are insufficient for having a true organization consciousness where all agents collaborate with eachother.
What we need are:
Given this, I've designed OCP
┌─────────────────────────────────────────────────────┐
│ OCP (Organizational Consciousness Protocol) │
│ - Knowledge streaming │
│ - Subscription management │
│ - Consensus formation │
│ - Collective memory sync │
│ - Event propagation │
└─────────────────────────────────────────────────────┘
↓ Built on
┌─────────────────────────────────────────────────────┐
│ A2A Core Protocol │
│ - Agent identity (a2a:// URIs) │
│ - Discovery │
│ - Basic messaging │
│ - Task/Tool (when appropriate) │
└─────────────────────────────────────────────────────┘
I've defined different message types as mentioned below:
interface OCPMessage extends A2AMessage {
protocol: "a2a+ocp"; // Declares extension
version: "1.0";
// A2A required fields
id: string;
from: string; // a2a:// URI
to: string | "broadcast"; // a2a:// URI or broadcast
timestamp: string;
// OCP-specific
type: OCPMessageType; // Extended message types
payload: OCPPayload;
}
enum OCPMessageType {
// A2A standard (still supported)
TASK = "task",
TOOL_CALL = "tool_call",
RESPONSE = "response",
ERROR = "error",
// OCP extensions for consciousness
KNOWLEDGE_STREAM = "ocp.knowledge.stream",
KNOWLEDGE_SUBSCRIBE = "ocp.knowledge.subscribe",
KNOWLEDGE_UNSUBSCRIBE = "ocp.knowledge.unsubscribe",
KNOWLEDGE_SYNC_REQUEST = "ocp.knowledge.sync.request",
KNOWLEDGE_SYNC_RESPONSE = "ocp.knowledge.sync.response",
KNOWLEDGE_UPDATE = "ocp.knowledge.update",
COLLECTIVE_QUERY = "ocp.collective.query",
COLLECTIVE_RESPONSE = "ocp.collective.response",
COLLECTIVE_SYNTHESIS = "ocp.collective.synthesis",
CONSENSUS_PROPOSE = "ocp.consensus.propose",
CONSENSUS_VOTE = "ocp.consensus.vote",
CONSENSUS_ACHIEVED = "ocp.consensus.achieved",
AWARENESS_BEACON = "ocp.awareness.beacon",
AWARENESS_UPDATE = "ocp.awareness.update",
EVENT_PUBLISH = "ocp.event.publish",
EVENT_SUBSCRIBE = "ocp.event.subscribe"
}
This is needed because:
// ❌ Can't do this with A2A tasks alone:
// "When Bob learns something, Alice automatically knows"
// ✅ OCP enables this:
interface KnowledgeStream {
type: "ocp.knowledge.stream";
payload: {
streamId: string;
nodes: KnowledgeNode[];
isIncremental: boolean; // Delta vs full sync
sequenceNumber: number; // For ordering
};
}
// Bob streams knowledge to subscribers
await send({
protocol: "a2a+ocp",
type: "ocp.knowledge.stream",
from: "a2a://claude-code-bob",
to: "a2a://claude-code-alice", // or "broadcast"
payload: {
streamId: "stream-123",
nodes: [newKnowledgeNode],
isIncremental: true,
sequenceNumber: 42
}
});
In a2a we cant do pub/sub, in OCP we can
// Subscribe to another agent's knowledge stream
interface KnowledgeSubscribe {
type: "ocp.knowledge.subscribe";
payload: {
subscriptionId: string;
filters?: {
domains?: string[];
nodeTypes?: string[];
tags?: string[];
};
deliveryMode: "push" | "pull";
batchSize?: number;
};
}
// Alice subscribes to Bob's backend knowledge
await send({
protocol: "a2a+ocp",
type: "ocp.knowledge.subscribe",
from: "a2a://claude-code-alice",
to: "a2a://claude-code-bob",
payload: {
subscriptionId: "sub-456",
filters: {
domains: ["backend"],
tags: ["critical"]
},
deliveryMode: "push"
}
});
In A2A we have no distributed consensus. In OCP
// When multiple agents need to agree on something
interface ConsensusPropose {
type: "ocp.consensus.propose";
payload: {
proposalId: string;
topic: string;
proposal: any; // What's being proposed
votingPeriod: number; // Seconds
requiredVotes: number; // Quorum
};
}
interface ConsensusVote {
type: "ocp.consensus.vote";
payload: {
proposalId: string;
vote: "approve" | "reject" | "abstain";
reasoning?: string;
};
}
// Example: Team decides on architectural change
await send({
protocol: "a2a+ocp",
type: "ocp.consensus.propose",
to: "broadcast",
payload: {
proposalId: "prop-789",
topic: "Switch to PostgreSQL",
proposal: {
decision: "Migrate from MySQL to PostgreSQL",
rationale: "Better JSON support, more features",
impact: "2 weeks migration time"
},
votingPeriod: 86400, // 24 hours
requiredVotes: 3 // Need 3 agents to agree
}
});
A2A has no real time collective awareness. OCP has
// Broadcast what you're currently working on
interface AwarenessBeacon {
type: "ocp.awareness.beacon";
payload: {
status: "working" | "blocked" | "reviewing" | "idle";
currentContext: {
task?: string;
file?: string;
blockedOn?: string;
};
availability: "available" | "busy" | "away";
};
}
// Bob broadcasts he's blocked
await send({
protocol: "a2a+ocp",
type: "ocp.awareness.beacon",
to: "broadcast",
payload: {
status: "blocked",
currentContext: {
task: "Implement auth",
blockedOn: "Waiting for API keys"
},
availability: "available"
}
});
An example flow for knowledge streaming woudl be:
Alice learns about a bug fix
↓
Alice's agent creates knowledge node
↓
Alice's agent sends KNOWLEDGE_STREAM to subscribers
↓
Bob's agent receives stream
↓
Bob's agent merges into local graph
↓
Bob's Claude Code now knows about the fix
Collection query example would be:
User asks Alice's agent: "How do we handle auth?"
↓
Alice's agent sends COLLECTIVE_QUERY (broadcast)
↓
Bob, Carol, Dave agents search their graphs
↓
Each sends COLLECTIVE_RESPONSE with findings
↓
Alice's agent synthesizes responses
↓
Alice's agent sends COLLECTIVE_SYNTHESIS (to all)
↓
All agents learn from the synthesis
Beta Was this translation helpful? Give feedback.
All reactions