Telepathy Communication Protocol
The open protocol that lets AI agents communicate like they're telepathic.
Any framework. Any model. Any modality. Zero friction.
Problem β’ Solution β’ Quick Start β’ Multimodal β’ Docs β’ License
Right now, the AI agent ecosystem is fragmented. You build an agent in CrewAI, another in LangGraph, maybe one in AutoGen β and they cannot talk to each other. Every framework is a walled garden.
Want to connect a Claude-powered research agent with a Gemini-powered analyst and an Ollama-hosted local executor? Today, you'd have to write hundreds of lines of glue code β fragile text-passing, polling loops, no security, no state consistency, and it breaks the moment you change anything.
Multi-agent AI is supposed to be the future. But right now, agents can't even have a conversation.
TPCP gives agents telepathy.
It's an open protocol that lets any AI agent β regardless of what LLM powers it, what framework it runs on, or what modality it works with β seamlessly communicate with any other agent, as if they were sharing one brain.
ββββββββββββββββββββ ββββββββββββββββββββ
β Claude Opus 4.6 ββββββββ TPCP Protocol ββββΊβ Gemini 2.5 Pro β
β (Research Agent) β Signed Envelopes β (Analysis Agent) β
β CrewAI / Python β CRDT Memory Sync β LangGraph / Py β
ββββββββββ¬ββββββββββ Vector Telepathy ββββββββββ¬ββββββββββ
β Multimodal Media β
ββββββββββββ βββββββββββββββββ
βΌ βΌ
ββββββββββββββββββββββββββββ
β A-DNS Relay β
β Global Discovery β
β Challenge-Response Auth β
ββββββββββββββ¬ββββββββββββββ
βββββββββββββββββββΌββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
β Ollama Llama β β Whisper Voice β β DALL-E Vision β
β (Local Exec) β β (Audio Agent) β β (Image Agent) β
β Custom / Py β β OpenAI / Py β β React / TS β
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
A Claude agent, a Gemini agent, an Ollama agent, a voice agent, and a vision agent β all sharing state, sending media, and collaborating in real-time. Different LLMs. Different frameworks. Different modalities. One protocol.
| What You Get | How It Works |
|---|---|
| Any LLM β Any LLM | Claude, GPT, Gemini, Llama, Mistral, Qwen, Kimi β TPCP doesn't care what model powers the agent. It just moves signed envelopes between nodes. |
| Any Framework β Any Framework | CrewAI, LangGraph, AutoGen, Semantic Kernel, custom code β adapters decouple the framework from the wire format. |
| Text β Image β Audio β Video | A vision agent sends an image β a text agent reads the caption. A voice agent sends audio β everyone gets the transcript. No agent is ever excluded. |
| Conflict-Free Shared Memory | Multiple agents write to the same state simultaneously β the CRDT mathematically guarantees they all converge to the same result. No locks. No coordinator. |
| Cryptographic Trust | Every message is signed with Ed25519. Unsigned or tampered messages are dropped. No spoofing possible. |
| Works Anywhere | Agents discover each other globally via the A-DNS relay. No static IPs. No VPNs. Just connect and go. |
| Zero Data Loss | If an agent goes offline, messages queue up and drain automatically when it's back. No messages are ever lost. |
| Universal Edge Bridging | Bridge autonomous robots (ROS2), Smart Homes (HomeAssistant/Matter), Industrial Sensors (MQTT), and Zapier/Siri Webhooks natively into the swarm constraint-free. |
| 5 SDK Languages | First-class SDKs for Python, TypeScript, Go, Rust, and Java β use whatever your team already knows. |
cd tpcp
pip install -e ".[dev]"
pip install "tpcp-core[edge]" # Required for Edge hardware adapters (ROS2, MQTT, HA, Webhook)import asyncio
from tpcp.schemas.envelope import AgentIdentity, Intent, TextPayload
from tpcp.core.node import TPCPNode
# Agent powered by ANY model β Claude, GPT, Gemini, Llama, anything
identity = AgentIdentity(
framework="MyAgent",
public_key="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
modality=["text", "image"]
)
async def main():
async with TPCPNode(identity, port=8000) as node:
# Share state β all peers see this instantly
node.shared_memory.set("status", "analyzing")
# Send a message to another agent (any LLM, any framework)
await node.send_message(
target_id=peer_uuid,
intent=Intent.TASK_REQUEST,
payload=TextPayload(content="Summarize the Q3 report")
)
asyncio.run(main())cd tpcp-ts && npm install && npm run buildimport { TPCPNode } from 'tpcp-sdk';
const node = new TPCPNode({
agent_id: crypto.randomUUID(),
framework: "React-Dashboard",
capabilities: ["visualization"],
public_key: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
modality: ["text"]
}, "127.0.0.1", 9000);
// Live CRDT state updates from the Python agent swarm
node.on("onStateSync", (state) => {
console.log("Swarm state:", state);
// Update your React UI here
});
// Receive vector embeddings for semantic search
node.on("onVectorSync", ({ modelId, dimensions }) => {
console.log(`Got ${dimensions}d embedding from ${modelId}`);
});
await node.startListening();cd tpcp-go && go mod tidypackage main
import (
"fmt"
"github.com/tpcp-protocol/tpcp-go/tpcp"
)
func main() {
// Generate a cryptographic identity (Ed25519 keypair)
identity, privKey, _ := tpcp.GenerateIdentity("GoService")
node := tpcp.NewTPCPNode(identity, privKey)
// Handle incoming task requests
node.RegisterHandler(tpcp.IntentTaskRequest, func(env *tpcp.TPCPEnvelope) {
fmt.Printf("Received task from %s\n", env.Header.SenderID)
})
// Start listening for peer connections
go node.Listen(":9000")
<-node.Ready
// Connect to another agent and send a message
node.Connect("ws://localhost:8000")
node.SendMessage("ws://localhost:8000", tpcp.IntentTaskRequest,
tpcp.NewTextPayload("Analyze dataset"))
select {} // Block forever
}cd tpcp-rs && cargo builduse tpcp_std::{TPCPNode, AgentIdentity, Intent};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let identity = AgentIdentity {
agent_id: uuid::Uuid::new_v4().to_string(),
framework: "RustAgent".into(),
public_key: "".into(),
capabilities: vec![],
modality: vec!["text".into()],
};
let node = TPCPNode::new(identity);
// Register a handler for incoming messages
node.register_handler(Intent::TaskRequest, |envelope| {
println!("Got task: {:?}", envelope.payload);
}).await;
// Send a signed message to a peer
node.send_message(
"ws://127.0.0.1:8000",
Intent::TaskRequest,
json!({"payload_type": "text", "content": "Process sensor data"}),
).await?;
Ok(())
}cd tpcp-java && mvn compileimport io.tpcp.core.TPCPNode;
import io.tpcp.core.IdentityManager;
import io.tpcp.schema.*;
import com.fasterxml.jackson.databind.ObjectMapper;
public class Main {
public static void main(String[] args) throws Exception {
// Generate identity with Ed25519 keypair
IdentityManager im = new IdentityManager();
AgentIdentity identity = im.createIdentity("JavaService");
TPCPNode node = new TPCPNode(identity, im);
// Handle incoming messages
node.registerHandler(Intent.TASK_REQUEST, envelope -> {
System.out.println("Task from: " + envelope.header.senderId);
});
// Connect to a peer and send a message
node.connect("ws://localhost:8000").join();
ObjectMapper mapper = new ObjectMapper();
TextPayload payload = new TextPayload("Generate quarterly report");
node.sendMessage("ws://localhost:8000",
Intent.TASK_REQUEST, mapper.valueToTree(payload));
}
}python examples/01_handshake_demo.py # Identity exchange
python examples/02_shared_memory_demo.py # CRDT state sync
python examples/03_telepathy_demo.py # Vector sharingTPCP isn't limited to text. Agents can share images, audio, video, and any binary file β with automatic text fallbacks so no agent is left out.
| Payload | What It Carries | Text Fallback | Example Use Case |
|---|---|---|---|
TextPayload |
Natural language | β | Agent reasoning, instructions, reports |
ImagePayload |
PNG, JPEG, WebP images | caption |
DALL-E output β vision analysis β text agent reads caption |
AudioPayload |
WAV, MP3, OGG audio | transcript |
Whisper transcription β ElevenLabs TTS β text agent reads transcript |
VideoPayload |
MP4, WebM video | description |
Sora generation β video analysis β text agent reads description |
VectorEmbeddingPayload |
Dense float arrays | raw_text_fallback |
Semantic search across the swarm's collective knowledge |
CRDTSyncPayload |
Key-value state | β | Conflict-free shared memory between all agents |
BinaryPayload |
Any file (PDF, dataset) | description |
Sharing documents, spreadsheets, 3D models |
TelemetryPayload |
Industrial sensor readings | β | OPC-UA, Modbus, CANbus, MQTT sensor data streams |
βββββββββββββββββββββββββββ
β DALL-E Agent (Vision) β
β Generates image ββββΊ ImagePayload
β β caption: "Revenue chart Q3"
βββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β Claude Agent (Text) β
β Reads the caption ββββΊ "I see the revenue chart shows 23% growth..."
β Can't see the image β
β But understands it β β
Still participates fully
βββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β Whisper Agent (Voice) β
β Reads Claude's text ββββΊ AudioPayload
β Generates speech β transcript: "Revenue grew 23%..."
βββββββββββββββββββββββββββ
Every agent participates. Every modality connects. Nobody is excluded.
Two agents write to the same key at the same time. Instead of a conflict, the CRDT resolves it mathematically β the higher Lamport timestamp wins. If they're identical, the agent UUID breaks the tie deterministically. Both agents always converge to the same state. Optionally backed by SQLite for persistence.
Every message is signed. Every signature is verified. Keys can persist across restarts via file or environment variable. The A-DNS relay uses challenge-response β agents must prove they own their private key before registering.
Share raw 1536-dimensional embeddings between agents. The VectorBank stores them and supports cosine similarity search β find the most relevant knowledge fragment across the entire swarm.
One command to run the relay. Agents connect from anywhere β home lab, AWS, a phone β and find each other by UUID. No static IPs, no VPN, no DNS records.
Agent goes offline? Messages queue up (max 500/peer). When it's back, they drain one-at-a-time with safe re-queueing. Zero data loss, guaranteed.
agent-telepathy/
βββ tpcp/ # Python SDK (tpcp-core)
β βββ tpcp/
β β βββ core/ # TPCPNode, MessageQueue (DLQ)
β β βββ schemas/ # Pydantic schemas (8 payload types)
β β βββ security/ # Ed25519 with key persistence
β β βββ memory/ # LWWMap CRDT (+ SQLite), VectorBank (+ cosine search)
β β βββ adapters/ # CrewAI, LangGraph, ROS2, HomeAssistant, MQTT adapters
β β βββ relay/ # A-DNS relay & FastAPI Webhook Gateway
β βββ examples/ # Runnable demos
β βββ tests/ # pytest test suite
β βββ pyproject.toml
β
βββ tpcp-ts/ # TypeScript SDK β Node.js / React / Next.js
β βββ src/
β β βββ core/ # TPCPNode (EventEmitter), DLQ, VectorBank
β β βββ schemas/ # Zod schemas (8 payload types)
β β βββ security/ # tweetnacl Ed25519 with key persistence
β β βββ memory/ # LWWMap CRDT
β βββ package.json
β
βββ tpcp-go/ # Go SDK
β βββ tpcp/ # TPCPNode, envelope schemas, Ed25519 signing
β βββ go.mod
β
βββ tpcp-rs/ # Rust SDK (workspace: tpcp-core + tpcp-std)
β βββ tpcp-core/ # Schema types, Ed25519, CRDT
β βββ tpcp-std/ # TPCPNode with tokio-tungstenite transport
β βββ Cargo.toml
β
βββ tpcp-java/ # Java SDK
β βββ src/main/java/io/tpcp/
β β βββ schema/ # Jackson-annotated envelope types
β β βββ core/ # TPCPNode with Java-WebSocket transport
β βββ pom.xml
β
βββ k8s/ # Kubernetes deployment manifests
β βββ relay/ # A-DNS relay Deployment, Service, NetworkPolicy
β βββ redis/ # Redis StatefulSet, Secret, NetworkPolicy
β
βββ docs/ # Project-level documentation
βββ LICENSE # AGPL v3
βββ COMMERCIAL_LICENSE.md # Enterprise terms
βββ CONTRIBUTING.md # Dev setup & PR guide
βββ SECURITY.md # Vulnerability policy
| Document | What's Inside |
|---|---|
| Step-by-Step Guide & API Reference | Full walkthrough: install β connect β share state β send media β global discovery |
| Architecture Deep-Dive | Ed25519, CRDT math, multimodal design, A-DNS flow, DLQ mechanics |
| Universal Edge Architecture | Hardware integration: ROS2 (Nvidia Jetson), MQTT (ESP32), HA (Matter), Webhook Gateway |
| Contributing | Dev setup, code style, PR workflow |
| Security Policy | Vulnerability reporting and crypto model |
TPCP is dual-licensed to support both open-source and commercial use.
| Use Case | License | Cost |
|---|---|---|
| Open-source projects | AGPL v3 | Free |
| Internal tools & research | AGPL v3 | Free |
| Closed-source SaaS / proprietary backends | Commercial License | Contact maintainer |
Built for the multi-agent era.
Give your agents telepathy. β‘