Skip to content

Ankursingh018as/Universal-Agent-Connectivity-Protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UACP — Universal Agent Connectivity Protocol

A proposed open protocol for standardized machine-to-machine communication between AI agents, APIs, services, and devices.


Overview

The modern internet hosts millions of services exposed through APIs and web protocols. In parallel, AI agents are rapidly emerging as autonomous software entities capable of reasoning, planning, and executing complex tasks. Yet these agents operate in deeply fragmented ecosystems — unable to discover one another, incompatible in communication format, and dependent on bespoke integrations.

UACP (Universal Agent Connectivity Protocol) defines a universal interoperability layer that enables intelligent agents to interact with other agents, existing APIs, web services, and distributed internet infrastructure through a standardized interface.

UACP aims to support the emergence of an Internet of AI Agents.


The Problem

Current AI systems face four core limitations:

Problem Description
No agent discoverability Agents cannot locate or identify other agents on the network
Incompatible frameworks Different agent systems use conflicting communication formats
Human-centric APIs Existing services are designed for developers, not autonomous agents
No capability discovery There is no universal mechanism for machine intelligence to describe or query capabilities

As AI systems become increasingly autonomous, a new communication layer is required — one designed from the ground up for machine-to-machine interaction.


What UACP Enables

  • Agent-to-agent communication
  • Agent-to-service interaction
  • Agent-to-API integration
  • Agent-to-device connectivity
  • Dynamic capability discovery
  • Distributed task orchestration

Relationship to Existing Technologies

UACP is not a replacement for HTTP, REST APIs, or MCP. It operates as an orchestration and discovery layer built on top of existing infrastructure.

HTTP and Web APIs

Most internet services already expose functionality through REST or GraphQL APIs. UACP allows AI agents to discover and interact with these APIs automatically by wrapping them with standardized, machine-readable capability metadata.

Example:

An existing weather API exposes:

GET /weather?city=London

With UACP compatibility, the same service additionally provides:

GET /.uacp/meta

This enables agents to automatically understand how to use the service — no hardcoded integration required.


Model Context Protocol (MCP)

MCP is designed to connect language models with external tools and data sources. UACP complements MCP by operating at the network-level coordination layer.

Layer Protocol Focus
Tool integration MCP Model-to-tool communication
Network coordination UACP Agent-to-agent discovery and orchestration

Combined architecture:

User
 └─ AI Agent
     └─ UACP          ← service discovery + inter-agent routing
         └─ MCP        ← tool integration layer
             └─ External tools and APIs

REST APIs

UACP does not replace REST APIs. It provides a standardized interface that allows agents to discover and use APIs dynamically, adding:

  • API discoverability
  • Structured capability descriptions
  • Task abstraction

This eliminates the need for hardcoded integrations and enables agents to adapt to new services at runtime.


Core Architecture

UACP defines five fundamental layers.


Layer 1 — Identity

Each UACP-compatible node exposes a unique identifier, enabling unambiguous addressing across the network.

Format:

uacp://<name>.<type>.<scope>

Examples:

uacp://weather.service.001
uacp://jarvis.agent.local
uacp://research.agent.network

Identity can optionally be verified using public key cryptography.


Layer 2 — Capability

Services describe what they can do through a structured capability schema. This allows agents to locate compatible services programmatically.

Example capability declaration:

{
  "id": "uacp://weather.service.001",
  "skills": [
    "weather_data",
    "forecast",
    "temperature_lookup"
  ],
  "version": "1.0",
  "protocol": "uacp"
}

Layer 3 — Discovery

Agents discover other agents and services through a registry mechanism supporting skill-based queries.

Register a node:

POST /uacp/register
{
  "id": "uacp://weather.service.001",
  "skills": ["forecast", "temperature_lookup"],
  "version": "1.0",
  "endpoint": "http://weather-api.example.com:8000"
}

Response:

{
  "registered": true,
  "id": "uacp://weather.service.001",
  "message": "Node registered successfully."
}

Discover by skill:

GET /uacp/find?skill=forecast

Response:

{
  "skill": "forecast",
  "matches": [
    {
      "id": "uacp://weather.service.001",
      "skills": ["forecast", "temperature_lookup"],
      "version": "1.0",
      "endpoint": "http://weather-api.example.com:8000",
      "registered_at": "2026-03-07T10:00:00Z"
    }
  ]
}

List all nodes:

GET /uacp/registry

Remove a node:

DELETE /uacp/register?identity=uacp://weather.service.001

---

### Layer 4 — Task Execution

Agents communicate tasks through a standardized request/response interface.

**Task request:**

POST /uacp/task

```json
{
  "task": "forecast",
  "input": {
    "city": "Tokyo"
  }
}

Task response:

{
  "status": "success",
  "result": {
    "temperature": "22C",
    "condition": "clear"
  }
}

Layer 5 — Trust

Machine-to-machine communication at scale requires robust trust mechanisms. UACP proposes the following approaches:

  • Cryptographic signatures — requests are signed with private keys and verifiable by recipients
  • Registry verification — services are validated against a trusted registry
  • Domain ownership validation — identity is tied to verifiable domain ownership
  • Reputation scoring — services accumulate trust scores based on reliability and behavior

This framework helps prevent interaction with malicious, compromised, or unreliable services.


Standard Endpoints

Every UACP-compatible system must expose the following endpoints:

Endpoint Method Purpose Phase
/.uacp/meta GET Service metadata and capability declaration 1
/uacp/task POST Task submission and execution 1
/uacp/verify GET Identity and signature verification 1
/uacp/register POST Register a node in the discovery registry 2
/uacp/register DELETE Remove a node from the discovery registry 2
/uacp/find GET Discover nodes by skill 2
/uacp/registry GET List all registered nodes 2

Standalone Registry Service (Phase 2)

In addition to the per-node embedded registry, Phase 2 ships a dedicated registry service (registry/) that can be deployed independently. This is the canonical reference for Layer 3 Discovery and registry-backed Layer 5 Verification at network scale.

Start the registry:

cd registry
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 9000 --reload

Registry runs on port 9000 (node server runs on 8000).

Connect a node to the registry:

Set REGISTRY_URL = "http://localhost:9000" in server/config.py. The node will auto-register with the external registry on startup.

Standalone registry endpoints:

Endpoint Method Purpose
/ GET Registry health and node count
/uacp/register POST Register a node
/uacp/unregister DELETE Remove a node (?identity=uacp://...)
/uacp/find GET Discover nodes by skill (?skill=forecast)
/uacp/nodes GET List all registered nodes
/uacp/verify GET Registry-backed identity verification

Interactive docs: http://localhost:9000/docs


Integration with Existing Infrastructure

UACP is designed to wrap existing services without requiring rewrites. Developers add a UACP compatibility layer on top of existing APIs.

Compatible infrastructure includes:

  • Cloud APIs
  • Search engines
  • Payment gateways
  • IoT devices
  • Databases
  • Web automation systems

Example Workflow

User prompt: "Find the best hotels in Jaipur and check tomorrow's weather."

Execution:

1. Agent queries UACP registry → finds travel services
2. Agent queries UACP registry → finds weather services
3. Agent dispatches tasks to both services in parallel
4. Responses are aggregated and resolved
5. Agent returns a unified, structured answer to the user

This model enables distributed, multi-service problem-solving — coordinated by the agent, not pre-programmed by a developer.


Potential Applications

  • Multi-agent collaboration networks
  • AI service marketplaces
  • Automated research and analysis systems
  • Distributed AI assistants
  • IoT intelligence networks
  • Autonomous internet services

Agent Integration (Phase 3)

Phase 3 adds an autonomous UACP agent and sample services that demonstrate the full discover → verify → dispatch workflow.

Sample Services

Service Port Skills Directory
Weather 8001 forecast, temperature_lookup samples/weather_service.py
Math 8002 calculate, convert_units samples/math_service.py

UACP Agent

The agent (agent/agent.py) accepts natural-language goals and autonomously:

  1. Parses the goal into required skills
  2. Queries the UACP registry to discover matching services
  3. Verifies each service's identity
  4. Dispatches tasks and collects results

Run the full demo:

cd agent
pip install -r requirements.txt
python run_demo.py

This starts all services, registers them, and runs the agent against sample goals:

✓ "What is the weather forecast in Tokyo"
    → {'city': 'Tokyo', 'forecast': 'clear', 'temperature': '22°C'}
✓ "Calculate 42 * 17"
    → {'operation': '*', 'a': 42.0, 'b': 17.0, 'result': 714.0}
✓ "Convert 100 celsius to fahrenheit"
    → {'value': 100.0, 'from': 'celsius', 'to': 'fahrenheit', 'result': 212.0}

Interactive mode:

# Start services first (in separate terminals)
cd server && uvicorn main:app --port 8000 --reload
cd samples && uvicorn weather_service:app --port 8001 --reload
cd samples && uvicorn math_service:app --port 8002 --reload

# Register services, then run the agent interactively
cd agent && python agent.py

UACP Client Library

agent/uacp_client.py provides reusable async Python clients:

  • UACPClient(endpoint) — talk to any UACP node (meta, task, verify)
  • RegistryClient(endpoint) — talk to a registry (register, find, list, verify)

LLM-Powered Agent (Groq, OpenAI, Ollama)

agent/llm_agent.py connects real LLMs to UACP services. The LLM autonomously discovers tools, decides which to call, and processes results.

Supported providers:

Provider Model API Key Env Var
Groq Cloud llama-3.3-70b-versatile GROQ_API_KEY
OpenAI gpt-4o-mini OPENAI_API_KEY
Ollama (local) llama3.1 (none needed)
Together AI Llama-3-70b TOGETHER_API_KEY
OpenRouter llama-3.3-70b-instruct OPENROUTER_API_KEY

Quick start with Groq (free):

# Get a free key at https://console.groq.com/keys
set GROQ_API_KEY=gsk_your_key_here

# Run the full demo (starts services + sends queries through LLM)
cd agent
python run_llm_demo.py --provider groq --verbose

# Interactive mode
python llm_agent.py --provider groq

# Single query
python llm_agent.py --provider groq --query "What is the weather in Tokyo?"

How it works:

User Query → LLM (Groq/OpenAI) → Tool calls → UACP Registry → UACP Services
                                                                    ↓
User ← Natural language answer ← LLM ← Tool results ← UACP Task Response

The LLM sees all UACP skills as function tools and autonomously decides which to call.


Integration Bridges

UACP provides bridge adapters that connect to existing ecosystems — MCP, REST APIs, and websites — so agents can interact with any service on the internet.

MCP-UACP Bridge

Exposes all UACP-discovered skills as MCP tools. Any MCP-compatible LLM (Claude, GPT, etc.) can use UACP services transparently.

LLM ←→ MCP Protocol ←→ [Bridge] ←→ UACP Registry ←→ UACP Services

Usage (stdio — for Claude Desktop / VS Code):

python bridges/mcp_bridge.py --registry http://localhost:8000

Usage (HTTP demo):

python bridges/mcp_bridge.py --http --port 5000

REST API Adapter

Wraps any REST API as a UACP node. Define routes in a JSON config or use built-in examples.

# Built-in jsonplaceholder example
python bridges/rest_adapter.py --example jsonplaceholder --port 8010

# Built-in GitHub API example
python bridges/rest_adapter.py --example github --port 8010

# Custom config
python bridges/rest_adapter.py --config my_api.json --port 8010

Config format:

{
    "name": "my-api",
    "base_url": "https://api.example.com",
    "headers": {"Authorization": "Bearer TOKEN"},
    "routes": [
        {"skill": "get_item", "method": "GET", "path": "/items/{id}"},
        {"skill": "create_item", "method": "POST", "path": "/items"}
    ]
}

Each route becomes a UACP skill, auto-registered with the registry.

Website Interaction Service

A UACP node that enables agents to interact with any website on the internet.

Skill Description
fetch_page Fetch a webpage and return HTML
extract_text Extract clean text from a webpage
extract_links Extract all links from a webpage
search_web Search the web via DuckDuckGo
fill_form Submit form data (POST) to a URL
check_status Check if a website is up
python bridges/web_service.py --port 8020

Example — agent searches the web:

POST /uacp/task
{
    "task": "search_web",
    "input": {"query": "best hotels in Jaipur", "limit": 5}
}

Example — agent reads a webpage:

POST /uacp/task
{
    "task": "extract_text",
    "input": {"url": "https://example.com", "max_length": 5000}
}

Bridges Demo

Run all integration bridges end-to-end:

cd bridges
python run_bridges_demo.py

This starts the registry, REST adapter, web service, and MCP bridge, then tests all skills.


Current Status

UACP has completed Phase 1 (Protocol Draft), Phase 2 (Reference Registry), Phase 3 (Agent Integration), Integration Bridges, and Phase 4 (Universal Adapter Layer).

This repository includes:

  • Protocol specification and JSON schemas (spec/)
  • Reference UACP node (server/) — all mandatory endpoints + embedded discovery
  • Standalone registry service (registry/) — network-scale discovery + verification
  • Sample services (samples/) — weather, math, travel, currency, and places UACP nodes
  • Autonomous agent (agent/) — discovers, verifies, and dispatches tasks via UACP
  • UACP client library (agent/uacp_client.py) — reusable async Python client
  • Python SDK (sdk/) — pip install uacp with UACPClient, Agent, OpenAI tools, and LangChain integration
  • Integration bridges (bridges/) — MCP bridge, REST adapter, website interaction
  • Killer demo (demos/) — "Plan a Trip to Tokyo" using 6 services and 15+ skills
  • Full documentation (docs/) — whitepaper, specification, architecture, phase 4 plan

Phase 4 — Universal Adapter Layer

Phase 4 transforms UACP into the "Internet layer for AI agents" — a universal adapter that bridges MCP, OpenAI Tools, LangChain, and any future agent framework.

New Services

Service Port Skills File
Travel 8003 hotel_search, flight_search samples/travel_service.py
Currency 8004 currency_convert, exchange_rate samples/currency_service.py
Places 8005 attractions, local_tips samples/places_service.py

Python SDK (pip install uacp)

# Install the SDK
pip install -e sdk/               # Core
pip install -e "sdk/[langchain]"  # With LangChain support
pip install -e "sdk/[all]"        # Everything

Usage:

from uacp import UACPClient, RegistryClient, Agent

# Talk to a single UACP node
client = UACPClient("http://localhost:8001")
weather = await client.task("forecast", {"city": "Tokyo"})

# Discover services from registry
registry = RegistryClient("http://localhost:8000")
nodes = await registry.list_nodes()

# LLM Agent with auto-discovery
agent = Agent(registry="http://localhost:8000", provider="groq")
answer = await agent.run("Plan a trip to Tokyo")

OpenAI Tools Integration

from uacp.tools import discover_tools

# Auto-discover UACP skills as OpenAI function tools
tools, skill_map = await discover_tools("http://localhost:8000")
# tools → list of OpenAI-format tool definitions, ready for ChatGPT/Groq/etc.

LangChain Integration

from uacp.langchain import load_tools

# Load all UACP skills as LangChain tools
tools = await load_tools(registry_url="http://localhost:8000")
# tools → list of LangChain BaseTool instances

# Use with any LangChain agent
from langchain.agents import AgentExecutor, create_openai_tools_agent
agent = create_openai_tools_agent(llm, tools, prompt)

Killer Demo — "Plan a Trip to Tokyo"

The killer demo showcases UACP's power: a single LLM agent auto-discovers 15+ skills from 6 independent services and orchestrates them to build a comprehensive travel plan.

set GROQ_API_KEY=gsk_your_key_here
python demos/trip_planner.py --provider groq

What happens:

  1. 6 UACP services start (weather, math, travel, currency, places + registry)
  2. Agent discovers 15+ skills from the registry
  3. LLM orchestrates: weather → hotels → flights → attractions → currency → tips
  4. Returns a complete, organized Tokyo travel plan

Architecture

┌─────────────────────────────────────────────────────┐
│                   Applications                       │
│  ┌──────────┐  ┌──────────┐  ┌───────────────────┐  │
│  │ LangChain│  │  OpenAI  │  │  MCP Client       │  │
│  │  Agent   │  │  Tools   │  │  (Claude/VSCode)  │  │
│  └────┬─────┘  └────┬─────┘  └─────────┬─────────┘  │
│       │              │                  │            │
│  ┌────▼─────┐  ┌────▼─────┐  ┌─────────▼─────────┐  │
│  │  UACP    │  │  UACP    │  │   UACP MCP Bridge │  │
│  │ LangChain│  │  Tools   │  │                    │  │
│  │  Loader  │  │ Converter│  │                    │  │
│  └────┬─────┘  └────┬─────┘  └─────────┬─────────┘  │
│       └──────────────┼──────────────────┘            │
│              ┌───────▼───────┐                       │
│              │  UACP Python  │                       │
│              │     SDK       │                       │
│              └───────┬───────┘                       │
│              ┌───────▼───────┐                       │
│              │ UACP Registry │                       │
│              └───────┬───────┘                       │
│     ┌────────┬───────┼───────┬────────┐              │
│  ┌──▼──┐ ┌──▼──┐ ┌──▼──┐ ┌──▼──┐ ┌──▼──┐           │
│  │Weath│ │Math │ │Trav │ │Curr │ │Plac │           │
│  │ er  │ │     │ │ el  │ │ency │ │ es  │           │
│  └─────┘ └─────┘ └─────┘ └─────┘ └─────┘           │
└─────────────────────────────────────────────────────┘

Roadmap

Phase Description
Phase 1 Protocol Draft — ✅ Complete
Phase 2 Reference Registry Implementation — ✅ Complete
Phase 3 Sample Agent Integration — ✅ Complete
Bridges Integration Adapters (MCP, REST, Web) — ✅ Complete
Phase 4 Universal Adapter Layer (SDK + LangChain + Demo) — ✅ Complete
Phase 5 Security and Trust Framework
Phase 6 Decentralized Discovery Network

Contributing

Contributions are welcome from developers and researchers working in:

  • AI agent systems
  • Distributed systems
  • Machine-to-machine communication
  • Internet-scale protocol design

Open contribution areas:

  • Protocol specification improvements
  • Security and trust models
  • Reference implementations
  • Distributed registry design
  • Agent marketplace concepts

Citation

If you use the Universal Agent Connectivity Protocol (UACP) in your research, projects, or implementations, please cite the following work:


Author

Ankur SIngh Concept proposed: March 2026


License

Copyright 2026 Ankur Singh

Licensed under the Apache License, Version 2.0. You may not use this project except in compliance with the License.

See the LICENSE file for the full license text, or visit: http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software and specifications distributed under this License are distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

About

UACP — Universal Agent Connectivity Protocol for enabling AI agents, APIs, and web services to discover and collaborate through a standardized interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages