Skip to content

Edwards-Tech-Innovation/CAM-PROTOCOL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

100 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Complete Arbitration Mesh (CAM)

Complete Arbitration Mesh Logo

Complete Arbitration Mesh (CAM) Protocol

License: Apache-2.0 Version Status Compliance Build Status Coverage MCP Coverage SBOM

Intelligent Orchestration and Collaboration for Modern AI Ecosystems

Built by Andrew "Dru" Edwards

Production Status: CAM Protocol is production ready as of the v2.0.0 release on May 28, 2025. The v2.1.2 release adds official SDK integrations, response caching, streaming support, rate limiting, a production-ready MCP Gateway with policy enforcement, retry logic, health checks, and OpenTelemetry instrumentation.

Security Status: Core security hardening complete. See Security Checklist for current status. Report vulnerabilities to edwardstechpros@outlook.com.

🌟 Overview

The Complete Arbitration Mesh (CAM) is a comprehensive platform that combines intelligent orchestration with advanced inter-agent collaboration capabilities. CAM serves as both the central nervous system for your AI integrations and the coordination layer for complex multi-agent collaborations.

πŸ” Problem We Solve

Organizations face evolving challenges in the AI space:

  • Managing multiple AI providers and their varying capabilities
  • Orchestrating collaboration between specialized AI agents
  • Optimizing costs while maintaining performance
  • Enforcing governance policies across AI usage
  • Ensuring reliability through intelligent failover
  • Maintaining compliance with regulatory requirements
  • Scaling agent ecosystems for complex tasks

πŸš€ Key Features

Core Orchestration (CAM Classic)

  • FastPath Routing System - Route requests to optimal AI providers
  • Official SDK Integrations - OpenAI, Anthropic, Google, and Azure SDKs
  • Streaming Responses - Real-time streaming via async generators
  • Response Caching - In-memory LRU + Redis distributed caching
  • Rate Limiting - Sliding window per-user and per-provider limits
  • Advanced Arbitration Engine - Make decisions based on comprehensive criteria
  • Secure Authentication - Protect access to your CAM instance
  • Comprehensive Monitoring - Track detailed performance metrics
  • Policy Enforcement - Apply governance rules consistently

Inter-Agent Collaboration (IACP)

  • Agent Discovery - Find and leverage specialized agents
  • Task Decomposition - Break complex tasks into manageable components
  • Role-Based Collaboration - Assign specialized roles to agents
  • Secure Inter-Agent Messaging - Enable protected agent communication
  • Collaboration Marketplace - Access specialized agent capabilities

πŸ”Œ MCP Gateway

CAM integrates with Model Context Protocol (MCP) as a governance layer that sits above MCP servers, providing policy enforcement, intelligent routing, and audit capabilities.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Your AI Application                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    CAM MCP Gateway                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   Policies   β”‚  β”‚  Arbitration β”‚  β”‚    Audit     β”‚           β”‚
β”‚  β”‚  Trust Tiers β”‚  β”‚   Scoring    β”‚  β”‚   Logging    β”‚           β”‚
β”‚  β”‚  Rate Limits β”‚  β”‚  Cost/Latencyβ”‚  β”‚   Tracing    β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β–Ό                      β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MCP Server A   β”‚   β”‚  MCP Server B   β”‚   β”‚  MCP Server C   β”‚
β”‚  (File System)  β”‚   β”‚   (Database)    β”‚   β”‚  (Web Search)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

What CAM Adds to MCP

MCP Provides CAM Adds
Tool discovery Policy-based tool selection
Server connections Trust tier enforcement
Tool execution Cost/latency arbitration
β€” Audit logging with trace IDs
β€” Rate limiting per tenant
β€” Data classification filtering

Quick Example

import { MCPGateway } from '@cam-protocol/complete-arbitration-mesh/mcp';

const gateway = new MCPGateway({
  servers: [
    { id: 'fs', name: 'filesystem', transport: 'stdio', command: 'mcp-fs', trustTier: 'trusted', enabled: true },
    { id: 'web', name: 'websearch', transport: 'sse', endpoint: 'http://localhost:3001', trustTier: 'standard', enabled: true },
  ],
  policies: [{
    id: 'no-pii-external',
    name: 'Block PII to external tools',
    description: 'Deny tool calls that handle PII data',
    priority: 100,
    enabled: true,
    conditions: [{ field: 'tool.dataClassifications', operator: 'contains', value: 'pii' }],
    actions: ['deny'],
  }],
  defaults: {
    timeout: 30000,
    maxRetries: 2,
    retryDelayMs: 500,
    defaultTrustTier: 'standard',
    protocolVersion: '2025-11-25',
  },
  rateLimit: { enabled: true, requestsPerMinute: 100 },
  audit: { enabled: true, retentionDays: 30, includeArguments: true, includeResults: false },
});

await gateway.initialize();

// CAM selects best tool, enforces policies, logs decision
const result = await gateway.callTool({
  toolName: 'search',
  arguments: { query: 'latest news' },
  tenantId: 'tenant-123',
});

console.log(result.traceId);  // Audit trace
console.log(result.serverId); // Which MCP server was used

See docs/architecture/MCP-ENHANCEMENT-PLAN.md for the full integration roadmap.

πŸ“š Quick Start

# Install the Complete Arbitration Mesh
npm install @cam-protocol/complete-arbitration-mesh

# Or using Docker
docker run -p 8080:8080 cam-protocol/complete-arbitration-mesh:latest

Complete Environment with Docker Compose

For a full-featured environment including CAM Protocol, a toy LLM, and monitoring:

# Clone the repository
git clone https://github.com/Complete-Arbitration-Mesh/CAM-PROTOCOL.git

# Start the quickstart environment
cd CAM-PROTOCOL/examples/quickstart
docker-compose up -d

# Test it with a simple request
curl localhost:8080/mesh/chat -d '{"message":"Hello CAM!"}' -H "Content-Type: application/json" -H "Authorization: Bearer demo-key-for-quickstart"

See examples/quickstart for more details.

Try it in 30 Seconds

# Try our value demonstration script
npm run demo:value

SDK Examples

CAM Protocol provides SDKs for multiple languages. Here are examples in TypeScript, Python, and Go:

TypeScript/JavaScript (SDK Documentation)

import { CompleteArbitrationMesh } from '@cam-protocol/complete-arbitration-mesh';

const cam = new CompleteArbitrationMesh({
  apiKey: process.env.CAM_API_KEY,
  endpoint: 'https://api.complete-cam.com'
});

// Intelligent routing (original CAM functionality)
const routingResult = await cam.routeRequest({
  prompt: "Analyze this dataset",
  requirements: { cost: "optimize", performance: "balanced" }
});

// Agent collaboration (new IACP functionality)
const collaboration = await cam.initiateCollaboration({
  task: "Complex data analysis and visualization",
  requirements: ["data-analyst", "visualization-expert"],
  decomposition: "auto"
});
from cam_protocol import CompleteArbitrationMesh

# Initialize the CAM client
cam = CompleteArbitrationMesh(
    api_key=os.environ.get("CAM_API_KEY"),
    endpoint="https://api.complete-cam.com"
)

# Intelligent routing
routing_result = cam.route_request(
    prompt="Analyze this dataset",
    requirements={"cost": "optimize", "performance": "balanced"}
)

# Agent collaboration
collaboration = cam.initiate_collaboration(
    task="Complex data analysis and visualization",
    requirements=["data-analyst", "visualization-expert"],
    decomposition="auto"
)
package main

import (
	"os"
	"github.com/complete-arbitration-mesh/cam-protocol-go"
)

func main() {
	// Initialize the CAM client
	cam, err := camprotocol.NewClient(
		camprotocol.WithAPIKey(os.Getenv("CAM_API_KEY")),
		camprotocol.WithEndpoint("https://api.complete-cam.com"),
	)
	if err != nil {
		panic(err)
	}

	// Intelligent routing
	routingResult, err := cam.RouteRequest(camprotocol.RouteRequest{
		Prompt: "Analyze this dataset",
		Requirements: map[string]string{
			"cost":        "optimize",
			"performance": "balanced",
		},
	})

	// Agent collaboration
	collaboration, err := cam.InitiateCollaboration(camprotocol.CollaborationRequest{
		Task:         "Complex data analysis and visualization",
		Requirements: []string{"data-analyst", "visualization-expert"},
		Decomposition: "auto",
	})
}

πŸ—οΈ Architecture

The Complete Arbitration Mesh integrates three systems:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Complete Arbitration Mesh                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Routing System    β”‚   MCP Gateway       β”‚  Inter-Agent Collaboration  β”‚
β”‚    (CAM Core)       β”‚    (Preview)        β”‚   Protocol (IACP)           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ FastPath Routing  β”‚ β€’ MCP Server Mgmt   β”‚ β€’ Agent Discovery           β”‚
β”‚ β€’ Provider Selectionβ”‚ β€’ Policy Arbitrationβ”‚ β€’ Task Decomposition        β”‚
β”‚ β€’ Cost Optimization β”‚ β€’ Trust Tiers       β”‚ β€’ Role-Based Collaboration  β”‚
β”‚ β€’ Rate Limiting     β”‚ β€’ Audit Logging     β”‚ β€’ Secure Messaging          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Shared Infrastructure                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ Authentication & Authorization  β€’ Provider/MCP Connectors             β”‚
β”‚ β€’ State Management               β€’ Metrics & Telemetry (OTel)           β”‚
β”‚ β€’ Configuration                  β€’ Security Layer                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“– Documentation

For a complete overview of all documentation, see our Documentation Index.

Guides

Technical Documentation

Legal & Compliance

πŸ”§ Development

# Clone the repository
git clone https://github.com/Complete-Arbitration-Mesh/CAM-PROTOCOL.git
cd CAM-PROTOCOL

# Install dependencies
npm install

# Start development server
npm run dev

# Run tests
npm test

# Run benchmarks
npm run benchmark:cost
npm run benchmark:collaboration

# Build for production
npm run build

πŸ›‘οΈ Security

The Complete Arbitration Mesh takes security seriously:

  • Enterprise Authentication - SAML, LDAP, OAuth 2.0
  • Zero-Trust Architecture - Every request is authenticated and authorized
  • End-to-End Encryption - All communications are encrypted
  • Audit Logging - Comprehensive audit trails for compliance
  • FIPS Compliance - Available in Enterprise tier

See Security Checklist for detailed security controls and deployment guidance.

πŸ“‹ Editions

CAM Protocol is available in three editions. See EDITIONS.md for complete details.

Feature Community Pro Enterprise
Core Routing Engine βœ… βœ… βœ…
Basic MCP Gateway βœ… βœ… βœ…
Basic Policies βœ… βœ… βœ…
Redis Caching ❌ βœ… βœ…
Rate Limiting ❌ βœ… βœ…
OpenTelemetry ❌ βœ… βœ…
Multi-Tenant ❌ βœ… βœ…
SSO/SAML ❌ ❌ βœ…
RBAC ❌ ❌ βœ…
Signed Audit ❌ ❌ βœ…
Support GitHub Issues Email Dedicated
Price Free $99/mo Custom

Get Started: npm install @cam-protocol/complete-arbitration-mesh β€” Community edition works out of the box!

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

πŸ“„ License

CAM Protocol Community Edition is open source under the Apache License 2.0.

Edition License Usage
Community Apache-2.0 Free for any use
Pro Commercial Requires license key
Enterprise Commercial Requires license agreement
import { licenseManager, checkFeature } from '@cam-protocol/complete-arbitration-mesh';

// Community features work immediately
console.log(licenseManager.getEdition()); // 'community'

// Activate Pro/Enterprise with your license key
licenseManager.activateLicense('your-license-key');

// Check feature availability
if (checkFeature('redisCaching')) {
  // Use Pro/Enterprise feature
}

Purchase Pro/Enterprise: EdwardsTechPros@Outlook.com | EDITIONS.md

For complete licensing details including open source dependencies, see LICENSES.md.

πŸ†˜ Support

  • Community: GitHub Discussions
  • Professional: Email support (business hours)
  • Enterprise: 24/7 premium support

πŸ—ΊοΈ Roadmap

See our public roadmap for upcoming features and improvements.

πŸ“Š Value Demonstration

Run the benchmarks yourself to measure CAM's impact in your environment:

Cost Optimization

Intelligent routing can reduce API costs by selecting optimal providers per request.

# Run cost benchmark (compares routing strategies)
npm run benchmark:cost
# Output: costs.json with per-provider breakdown

Multi-Agent Collaboration

Task decomposition + role-based routing improves complex task completion.

# Run collaboration benchmark
npm run benchmark:collaboration
# Output: collaboration-results.json

Reliability

Automatic failover and health-based routing maintain availability.

# Run reliability simulation
npm run demo:value
# Output: failover timing + recovery metrics

Claims & Methodology: Performance claims are based on controlled benchmarks using mock providers. Actual results vary significantly based on your provider latency, pricing, workload patterns, and configuration. Run the benchmarks in your environment for accurate measurements.

See docs/benchmarks/methodology.md for complete methodology including environment assumptions, scripts, and how metrics are computed.

πŸ”’ Legal & Compliance

The CAM Protocol is designed with security and compliance at its core:


Complete Arbitration Mesh - Intelligent orchestration and collaboration for the AI-powered future.

About

Open Standard for AI Routing and Arbitration.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors