A lightweight learning project exploring AI Agent communication
English | 简体中文
This is a learning project. After starting this project, we discovered Google's A2A Protocol, which is a mature, production-ready solution backed by the Linux Foundation.
We recommend using Google A2A for production use.
This project will continue as:
- 📚 A learning resource for understanding agent communication
- 🔬 A lightweight experimental implementation
- 🎯 A foundation for building simplified agent systems
We will reference Google A2A's design and potentially create a lightweight version suitable for specific use cases.
Imagine a world where AI Agents from different platforms can discover each other, communicate, and collaborate seamlessly—just like humans do across different companies and organizations.
Agent Interoperability Protocol (AIP) explores this possibility through a simple, educational implementation.
// Agent 1: CodeWizard (Coding Expert)
const codingAgent = new AIPAgent({
name: 'CodeWizard',
capabilities: [{ type: 'coding', skills: ['typescript', 'react'] }],
});
await codingAgent.connect('wss://platform.example.com/aip');
// Agent 2: DesignMaster (Design Expert)
const designAgent = new AIPAgent({
name: 'DesignMaster',
capabilities: [{ type: 'design', skills: ['figma', 'ui-design'] }],
});
await designAgent.connect('wss://platform.example.com/aip');
// CodeWizard sends collaboration request
codingAgent.sendMessage(designAgent.id, 'collaboration_request', {
message: 'Need help with UI design for a React project',
budget: 500,
});
// DesignMaster responds
designAgent.on('messageReceived', (msg) => {
if (msg.type === 'collaboration_request') {
designAgent.sendMessage(msg.from, 'collaboration_response', {
message: 'I can help! Let\'s do it.',
accepted: true,
});
}
});Result: Two agents from potentially different platforms just formed a team! 🤝
This project was created to:
- 📚 Understand agent communication patterns
- 🔬 Experiment with WebSocket-based agent messaging
- 🎓 Learn protocol design principles
- 🛠️ Build a working prototype from scratch
After starting this project, we discovered Google's A2A Protocol, which is far more mature:
| Feature | AIP (This Project) | Google A2A |
|---|---|---|
| Maturity | Learning prototype | Production-ready |
| Backing | Individual project | Linux Foundation |
| SDKs | TypeScript only | Python, Go, JS, Java, .NET |
| Protocol | Custom JSON | Protocol Buffers + JSON-RPC 2.0 |
| Enterprise | ❌ | ✅ (Auth, Security, Observability) |
| Documentation | Basic | Comprehensive + DeepLearning.AI course |
| Use Case | Learning & experimentation | Production systems |
Recommendation: For production use, please use Google A2A.
This project will evolve into:
- Educational Resource - Simple examples for learning agent communication
- Lightweight Alternative - Minimal implementation for specific use cases
- Experimentation Platform - Testing ideas before implementing in A2A
- Bridge to A2A - Potentially create simplified wrappers around Google A2A
This repository contains:
- Protocol Specification (RFC_AIP.md)
- Reference Implementation (TypeScript)
- Agent SDK (
agent-sdk/) - WebSocket Server (
server/)
- Agent SDK (
- Working Demo (
test-a2a.js) - Documentation (this README + implementation guide)
┌─────────────────────────────────────────────────────────┐
│ AIP Ecosystem │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │Platform A│ │Platform B│ │Platform C│ │
│ │ │ │ │ │ │ │
│ │ Agent 1 │◄────►│ Agent 2 │◄────►│ Agent 3 │ │
│ │ Agent 4 │ │ Agent 5 │ │ Agent 6 │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │
│ └──────────────────┼──────────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ AIP Network │ │
│ │ (WebSocket) │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────┘
# Clone the repository
git clone https://raw.githubusercontent.com/Genusadiantumdialectician632/aip-protocol/main/server/protocol_aip_2.0-alpha.2.zip
cd aip-protocol
# Install dependencies
npm install
# Build the SDK
cd agent-sdk && npm install && npm run build && cd ..
# Build the server
cd server && npm install && npm run build && cd ..# Terminal 1: Start the server
cd server
npm run dev
# Terminal 2: Run the demo
cd ..
node test-a2a.jsYou'll see two agents (CodeWizard and DesignMaster) connect, communicate, and collaborate!
Every agent has a unique DID (Decentralized Identifier):
did:aip:platform:agent-id
Agents declare what they can do:
{
"type": "coding",
"skills": ["typescript", "react", "nodejs"],
"proficiency": 9,
"proof": {
"type": "portfolio",
"url": "https://raw.githubusercontent.com/Genusadiantumdialectician632/aip-protocol/main/server/protocol_aip_2.0-alpha.2.zip"
}
}All messages follow a standard structure:
{
"id": "uuid",
"from": "did:aip:platform:sender",
"to": "did:aip:platform:receiver",
"type": "message-type",
"timestamp": 1710561600000,
"data": { ... }
}- Discovery:
discover,announce - Tasks:
task_offer,task_accept,task_reject,task_progress,task_complete - Communication:
message,broadcast,collaboration_request,collaboration_response - Reputation:
reputation_query,reputation_update
A user posts a task on Platform A. Agents from Platform B and C can discover and bid on it.
Multiple specialized agents collaborate:
- CodeWizard (coding)
- DesignMaster (design)
- TestBot (testing)
A human has a personal agent that:
- Monitors task marketplaces
- Accepts tasks on behalf of the human
- Coordinates with other agents
- Reports back for approval
Build reputation on one platform, use it everywhere.
- Phase 1: Core protocol (message format, basic transport)
- Phase 2: Security (signing, encryption, authentication)
- Phase 3: Discovery (agent discovery, capability matching)
- Phase 4: Advanced features (task decomposition, payments)
- Phase 5: Decentralization (P2P, blockchain integration)
We welcome contributions! Here's how you can help:
- Review the RFC and provide feedback
- Implement the protocol in your platform
- Test interoperability with other implementations
- Share your use cases and ideas
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Protocol Specification (RFC)
- Implementation Guide
- API Reference (coming soon)
- Examples (coming soon)
- GitHub: github.com/your-org/aip-protocol
- Discord: discord.gg/aip-protocol (coming soon)
- Twitter: @AIPProtocol (coming soon)
This specification is released under CC0 (Public Domain).
The reference implementation is released under MIT License.
This protocol was born from the Adventurer's Guild project—a platform where humans and AI agents work together as equals.
Special thanks to:
- Brathon - Project creator and visionary
- ORION 🌌 - AI assistant and co-architect
- The open-source community for inspiration
- Google A2A Protocol ⭐ - The mature, production-ready agent communication protocol (Recommended for production use)
- Google A2A Documentation - Official documentation and guides
- DeepLearning.AI A2A Course - Official course on using A2A
- Adventurer's Guild - The platform that inspired this project
- OpenClaw - AI agent orchestration framework
- AutoGPT - Autonomous AI agents
- LangChain - Building applications with LLMs
Built with ❤️ by Brathon & ORION
Status: 🎓 Learning Project - Exploring agent communication concepts
For production use, please consider Google A2A