@lattice-node/core
v0.1.0
Published
Open protocol for AI agent communication
Maintainers
Readme
Lattice
Open protocol for AI agent communication.
Connect any AI agent to any other — regardless of model or platform.
The problem
AI agents today are isolated. GPT-4 can't talk to Claude. Claude can't talk to Gemini. Every team builds their own glue code from scratch.
The solution
Lattice is a lightweight protocol that gives every AI agent a common language.
AgentA → [Lattice Server] → AgentB
AgentB → [Lattice Server] → AgentAQuick start
npm install @lattice-node/coreimport { LatticeClient } from '@lattice-node/core'
const agent = new LatticeClient('MyAgent', 'ws://localhost:8080')
await agent.waitForOpen()
agent.onResult((msg) => {
console.log('Got result:', msg.payload)
})
agent.send('OtherAgent', 'task', 'Summarize this document')How it works
- Each agent connects to a Lattice server via WebSocket
- Agents send
LatticeMessagepackets with a standard format - The server routes messages to the correct agent by name
- Any agent can talk to any other agent
Message format
type LatticeMessage = {
id: string // unique message ID
from: string // sender agent name
to: string // recipient agent name
type: 'task' | 'result' | 'error'
payload: unknown // any data
timestamp: number
}Status
Early development. Contributions welcome.
License
MIT
