AICP-Protocol

AICP - AI Inter-Communication Protocol

English 한국어 中文

License: MIT Python 3.11+ MCP Compatible Docker Status

If the internet broke down the walls of information, we’re building the internet of intelligence.

🌐 Introduction

AICP (AI Inter-Communication Protocol) is an open protocol that enables different LLMs and users to collaborate freely within a unified network. With MCP (Model Context Protocol) compatibility, it can be used immediately with existing LLM services.

🎯 Key Differentiators

AICP creates an “Intelligence Network” where users bring their own AI agents (Claude, GPT, Gemini, etc.) and collaborate in real-time, sharing context and distributing tasks intelligently.

🧠 Relationship to Trust Data & Citation Readiness

AICP was originally designed as an open intelligence network protocol for connecting multi-user LLM environments through a shared neural context.

In applied enterprise and B2B systems, this architectural framework scales directly into Evaluating and Optimizing how multiple LLM engines interpret, verify, and cite real-world entities (such as medical professionals, industry experts, and commercial brands).

This open-source foundation directly powers advanced applied research on:

✨ Key Features

🏗️ Architecture

Core Concept: Intelligence Network

AICP implements a true intelligence network where users connect through their own LLMs, not just simple AI tool connections.

        [User A + Claude]              [User B + GPT-4]
                │                            │
                └──────────┬─────────────────┘
                           │
                    ┌──────▼──────┐
                    │  AICP Hub   │
                    │ (Neural Bus)│
                    └──────┬──────┘
                           │
                ┌──────────┴─────────────────┐
                │                            │
        [User C + Gemini]              [User D + Claude]

Detailed Architecture

┌──────────────────────────────────────────────────────────┐
│                    User Network Layer                     │
├──────────────────────────────────────────────────────────┤
│   User A                 User B                User C     │
│     ↓                      ↓                     ↓        │
│   Claude                ChatGPT              Gemini       │
└─────┬──────────────────────┬────────────────────┬────────┘
      │                      │                    │
      └──────────────────────┼────────────────────┘
                             │
                    MCP WebSocket Protocol
                             │
┌─────────────────────────────▼────────────────────────────┐
│                    AICP Neural Bus                       │
│                                                          │
│  ┌──────────────────────────────────────────────────┐   │
│  │           🧠 Intelligent Routing Engine          │   │
│  │                                                  │   │
│  │  • User intent analysis                         │   │
│  │  • Optimal AI agent matching                    │   │
│  │  • Load balancing & QoS management              │   │
│  └──────────────────────────────────────────────────┘   │
│                                                          │
│  ┌──────────────────────────────────────────────────┐   │
│  │           🔄 Collaboration Orchestration         │   │
│  │                                                  │   │
│  │  • Multi-user session management                │   │
│  │  • Real-time message broadcasting               │   │
│  │  • Task distribution & synchronization          │   │
│  └──────────────────────────────────────────────────┘   │
│                                                          │
│  ┌──────────────────────────────────────────────────┐   │
│  │           💾 Shared State Hub (SSoT)            │   │
│  │                                                  │   │
│  │  • Global context repository                    │   │
│  │  • Inter-user data sharing                      │   │
│  │  • Real-time state synchronization              │   │
│  └──────────────────────────────────────────────────┘   │
└──────────────────────┬───────────────────────────────────┘
                       │
         ┌─────────────┴─────────────┐
         │                           │
    ┌────▼────┐              ┌──────▼──────┐
    │  Redis  │              │  PostgreSQL │
    │ (Cache) │              │  (Persist)  │
    └─────────┘              └─────────────┘

Communication Flow

User1+Claude ─────► AICP Hub ─────► User2+GPT
     ▲                 │                 │
     │                 ▼                 ▼
     └──── Shared Context (SSoT) ◄──────┘

🚀 Quick Start

Prerequisites

Installation

# 1. Clone repository
git clone https://github.com/your-username/AICP-Protocol.git
cd AICP-Protocol

# 2. Run setup script
chmod +x setup-aicp.sh
./setup-aicp.sh

# 3. Verify services
docker ps
curl http://localhost:8080/health

Manual Setup (Docker Compose)

# Basic setup
docker-compose up -d

# Full stack with monitoring
docker-compose -f docker/docker-compose.secure.yml --profile monitoring up -d

📖 Usage

1. WebSocket Connection Test

import asyncio
import websockets
import json

async def test_connection():
    uri = "ws://localhost:8765/mcp"
    async with websockets.connect(uri) as ws:
        # Initialize
        await ws.send(json.dumps({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "initialize",
            "params": {"clientInfo": {"name": "test", "version": "1.0"}}
        }))
        response = await ws.recv()
        print("Connected:", response)

asyncio.run(test_connection())

2. AI Routing

# Route to optimal AI agent
await ws.send(json.dumps({
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
        "name": "route_to_agent",
        "arguments": {
            "message": "Analyze this complex dataset",
            "target_capabilities": ["analysis", "reasoning"]
        }
    }
}))

3. Context Sharing

# Share context between AI agents
await ws.send(json.dumps({
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
        "name": "share_context",
        "arguments": {
            "context_key": "project_status",
            "context_value": {"phase": "development", "progress": 75}
        }
    }
}))

🛠️ MCP Tools

Tool Name Description Parameters
route_to_agent Route message to optimal AI agent message, target_capabilities, context
share_context Share context between agents context_key, context_value
orchestrate_collaboration Orchestrate multi-agent collaboration task, agents

🎬 Use Cases

Multi-AI Collaborative Project

Team Member A (Claude) → "Start project proposal"
         ↓
    AICP Hub → Distributes tasks
         ↓
Team Member B (GPT-4) → "Market research"
Team Member C (Gemini) → "Technical specifications"
         ↓
    AICP Hub → Integrates results
         ↓
    Shared document for all team members

Real-time Translation Meeting

📊 Monitoring

🔧 Configuration

Environment Variables

# MCP Server Configuration
HOST=0.0.0.0
PORT=8765
HTTP_PORT=8080

# Redis Configuration
REDIS_URL=redis://redis:6379/0

# Logging
LOG_LEVEL=INFO

# Security (Production)
JWT_REQUIRED=true
JWT_SECRET=your-secret-key

Docker Compose Profiles

# With database
docker-compose --profile db up -d

# With monitoring
docker-compose --profile monitoring up -d

# With proxy
docker-compose --profile proxy up -d

📁 Project Structure

AICP-Protocol/
├── aicp/                    # Core library
│   ├── __init__.py
│   ├── mcp_server.py       # MCP server implementation
│   ├── neural_bus.py       # Routing engine
│   ├── shared_state.py     # SSoT implementation
│   └── security.py         # Security module
├── docker/                  # Docker configuration
│   ├── Dockerfile.mcp
│   ├── docker-compose.secure.yml
│   └── nginx/              # Proxy configuration
├── examples/               # Usage examples
│   ├── basic_routing.py
│   └── collaboration.py
├── tests/                  # Tests
├── docs/                   # Documentation
├── scripts/                # Utilities
├── setup-aicp.sh          # Setup script
├── requirements.txt        # Python dependencies
└── README.md              # This document

🧪 Testing

# Unit tests
python -m pytest tests/

# Integration tests
python examples/basic_routing.py
python examples/collaboration.py

# Load testing
python tests/load_test.py

🔒 Security

See SECURITY.md for details

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📈 Roadmap

📄 License

MIT License - See LICENSE file for details

🙏 Acknowledgments

📞 Contact

📚 How to Cite AICP

If you use AICP in your research or project, please cite:

BibTeX:

@software{aicp2025protocol,
  title = {AICP: AI Inter-Communication Protocol - Building the Intelligence Internet},
  author = {AHN SANGHYO},
  year = {2025},
  url = {https://github.com/hungryangel/AICP-Protocol},
  note = {An open protocol for multi-user LLM collaboration networks}
}

APA Style: hungryangel. (2025). AICP: AI Inter-Communication Protocol [Computer software]. GitHub. https://github.com/hungryangel/AICP-Protocol


⭐ If this project helps you, please give it a star!

Made with ❤️ by the AICP Team


Korean

한국어 문서 (클릭하여 펼치기) ## 🌐 소개 AICP(AI Inter-Communication Protocol)는 서로 다른 LLM과 사용자가 하나의 네트워크에서 자유롭게 협업할 수 있도록 하는 오픈 프로토콜입니다. MCP(Model Context Protocol) 호환으로 기존 LLM 서비스에서 바로 사용 가능합니다. ## 🧠 신뢰 데이터 및 인용 준비도(Citation Readiness)와의 연관성 AICP는 본래 공유된 신경망 맥락(Shared Neural Context)을 통해 멀티 유저 LLM 환경을 연결하는 오픈 지능 네트워크 프로토콜로 설계되었습니다. 실제 비즈니스 및 B2B 시스템 환경에서 이 아키텍처 프레임워크는 다중 LLM 엔진이 병원 의사, 전문가, 상업 브랜드와 같은 실재 비즈니스 대상을 어떻게 해석하고, 검증하며, 인용(Cite)하는지 평가하고 최적화하는 영역으로 직결됩니다. 본 오픈소스 기술 기반은 현재 벨녹(VELNOC)이 진행하는 다음 선행 연구들의 핵심 뼈대로 작동합니다: - AI 인용 준비도 진단 및 벤치마킹: ChatGPT, Perplexity 등 다중 AI 엔진 내 브랜드 인용 밀도 실시간 교차 측정. - 다중 LLM 응답 자동화 측정 (Citation Lab): 분산 실행 모델을 통한 다중 AI 답변 분석 프로세스 자동화. - 동적 에비던스 패킷(Evidence Packet) 라우팅: 기업의 실제 운영 로그 및 인증 데이터를 AI 에이전트가 인식할 수 있는 신뢰 신호 체계로 구조화. - 기억 최신화(Active Memory Refresh) 동기화: 대화형 엔진 및 생성형 검색(GEO/AEO)의 휘발성 높은 인덱싱 주기에 맞춰 최신 브랜드 근거 데이터를 지속 업데이트. ### 빠른 시작 ```bash # 저장소 클론 git clone https://github.com/your-username/AICP-Protocol.git cd AICP-Protocol # 설치 스크립트 실행 chmod +x setup-aicp.sh ./setup-aicp.sh ``` 자세한 한국어 문서는 [README.ko.md]를 참조하세요.