Unified Agent Protocol (UAP) — Core SDK
Version 1.0 · Apache-2.0 · Python 3.10+
UAP is the universal interoperability layer for AI agents and tools.
Define an agent once in UAP — then ship it to MCP, A2A, OpenAI Assistants, Anthropic Tool Use, Google Gemini Functions, OpenAPI 3, OpenWebUI, LangChain — without rewriting a single field. Every adapter is bidirectional and declares its LossInfo explicitly. No silent data loss.
What UAP gives you over MCP / A2A alone
| Concern | MCP | A2A | UAP |
|---|---|---|---|
| Tool description schema | ✅ | — | ✅ |
| Agent-to-Agent runtime | — | ✅ | ✅ (via bridges) |
| Cross-vendor bridges | — | — | ✅ (9 formats) |
| Bidirectional round-trip | — | — | ✅ |
| Auth modelling (OAuth2/mTLS/SigV4/…) | partial | partial | ✅ |
| RBAC / Capabilities | — | — | ✅ |
| Compliance (GDPR/HIPAA/residency) | — | — | ✅ |
| Cost / latency hints | — | — | ✅ |
| URN identity | — | — | ✅ |
| Versioned wire format | ✅ | ✅ | ✅ |
Install
pip install unified-agent-protocol # core SDK only
pip install unified-agent-protocol[runtime] # + FastAPI runtime
pip install unified-agent-protocol[all] # + every optional dep
Quick start
from unifiedagentprotocol import (
Tool, Agent, Skill, Parameter, ParameterSchema,
Capabilities, SideEffects, Compliance, DataClassification,
AuthConfig, AuthType, Endpoint, Transport, Envelope,
)
weather = Tool(
id="urn:uap:tool:get-weather",
name="get_weather",
description="Return current weather for a city.",
parameters=[Parameter(name="city", schema=ParameterSchema(type="string"))],
endpoint=Endpoint(transport=Transport.HTTP,
url="https://api.example.com/weather", method="POST"),
auth=AuthConfig(type=AuthType.API_KEY,
secret_ref="vault://kv/data/weather#token"),
capabilities=Capabilities(idempotent=True,
side_effects=SideEffects.READ_ONLY,
deterministic=False,
requires_human_approval=False),
compliance=Compliance(data_classification=DataClassification.PUBLIC,
regulations=["GDPR"], data_residency=["EU"]),
)
agent = Agent(
id="urn:uap:agent:weather-bot",
name="WeatherBot",
description="Provides weather information.",
tools=[weather],
skills=[Skill(id="answer-weather", name="answer-weather",
description="Answer weather questions.")],
endpoints=[Endpoint(transport=Transport.HTTP, url="https://bot.example.com")],
)
print(Envelope.of(agent).to_wire())
Ship it to every ecosystem:
from unifiedagentprotocol.bridges.mcp import to_mcp
from unifiedagentprotocol.bridges.a2a import to_a2a
from unifiedagentprotocol.bridges.openai import to_openai
from unifiedagentprotocol.bridges.anthropic import to_anthropic
from unifiedagentprotocol.bridges.gemini import to_gemini
from unifiedagentprotocol.bridges.openapi import to_openapi
mcp_payload, _ = to_mcp(agent)
a2a_card, _ = to_a2a(agent)
oai_assistant, _ = to_openai(agent)
claude_tool, _ = to_anthropic(weather)
gemini_decl, _ = to_gemini(weather)
openapi_spec, _ = to_openapi(agent)
Every bridge also has an inverse from_<format>(…) returning
(uap_object, LossInfo).
CLI
uap version
uap schema-export --output-dir schemas/uap/1.0
uap bind --input my_tool.json --format mcp --show-loss
uap validate --input my_agent.json
uap lint --input my_agent.json
uap serve --registry-path ./registry --port 8000
The auto-detect bind accepts MCP, A2A, OpenAI, Anthropic, OpenWebUI,
LangChain, OpenAPI 3, Swagger 2 and bare UAP envelopes.
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Runtime (optional) FastAPI adapter, /.well-known/agent │
├──────────────────────────────────────────────────────────────┤
│ Registry (optional) In-memory / Filesystem / pluggable │
├──────────────────────────────────────────────────────────────┤
│ Bridges MCP, A2A, OpenAI, Anthropic, Gemini, │
│ (bidirectional) OpenAPI, Swagger, OpenWebUI, LangChain│
├──────────────────────────────────────────────────────────────┤
│ Core IR (Schema) Tool, Agent, Parameter (JSON-Schema), │
│ Auth, Capabilities, Compliance, Cost, │
│ Endpoint, Trigger, Envelope, LossInfo │
├──────────────────────────────────────────────────────────────┤
│ Wire Spec schemas/uap/1.0/*.schema.json │
└──────────────────────────────────────────────────────────────┘
Layer rules:
core/depends on nothing but Pydantic + stdlib.bridges/<x>/depends only oncore/.runtime/depends oncore/,bridges/,registry_impl/.cli/is the only module allowed to import anywhere.
See docs/adr/0001-architecture-overview.md
and docs/spec/uap-1.0-wire-format.md.
Examples
examples/01_define_tool_and_agent.py— full enterprise-marked agent.examples/02_bridge_to_many_formats.py— same agent → six target formats.
Testing
pytest -q
Bridge round-trip tests live under tests/bridges/ and assert
from_x(to_x(obj)) == obj on the representable subset, with
LossInfo covering the rest.
License
Apache 2.0 — see LICENSE.
Metadata
Release files for unified-agent-protocol 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unified_agent_protocol-1.1.0.tar.gz | 69.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unified_agent_protocol-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 172.2 kB
Release files / unified_agent_protocol-1.1.0.tar.gz
| Download URL | unified_agent_protocol-1.1.0.tar.gz |
|---|---|
| Size | 69.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac4cf62b4f8ada7a36f239df722891756b52008abfc367a461c85ba29c4b5ced
|
|
BLAKE2b-256 checksum How to use checksums |
330736003c29f690948bd7c671e507a79a3a04cde7bdacea0b2eef54878298b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency logRelease files / unified_agent_protocol-1.1.0-py3-none-any.whl
| Download URL | unified_agent_protocol-1.1.0-py3-none-any.whl |
|---|---|
| Size | 102.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54638578ea41bb7e4a786e0c57219149e64e81f3e25c90dfe412f28fc4dd99b1
|
|
BLAKE2b-256 checksum How to use checksums |
33f6477edfd354ec405d7d188f973482db55a26ca28a9134ea5ec079efb8f4ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency log