MCPcopy Index your code
hub / github.com/agi-inc/agent-protocol

github.com/agi-inc/agent-protocol @python-client-v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release python-client-v1.1.0 ↗ · + Follow
504 symbols 1,279 edges 94 files 217 documented · 43%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

agent protocol

📚 Docs

You can find more info in the docs.

🧾 Summary

The AI agent space is young. Most developers are building agents in their own way. This creates a challenge: It's hard to communicate with different agents since the interface is often different every time. Because we struggle with communicating with different agents, it's also hard to compare them easily. Additionally, if we had a single communication interface with agents, it'd also make it easier developing devtools that works with agents out of the box.

We present the Agent Protocol - a single common interface for communicating with agents. Any agent developer can implement this protocol. The Agent Protocol is an API specification - list of endpoints, which the agent should expose with predefined response models. The protocol is tech stack agnostic. Any agent can adopt this protocol no matter what framework they're using (or not using).

We believe, this will help the ecosystem grow faster and simplify the integrations.

We're starting with a minimal core. We want to build upon that iteratively by learning from agent developers about what they actually need.

🚀 The incentives to adopt the protocol

  • Ease with which you can use the benchmarks.
  • Other people can more easily use and integrate your agent
  • Enable building general devtools (for development, deployment and monitoring) that can be built on top of this protocol
  • You don’t need to write boilerplate API and you can focus on developing your agent

🎯 Immediate goals of the protocol

Set a general simple standard that would allow for easy to use benchmarking of agents. One of the primary goals of the protocol is great developer experience, and simple implementation on the end of agent developers. You just start your agent and that’s all you have to do.

🗣️ Request for Comments

If you'd like to propose a change or an improvement to the protocol. Please follow the RFC template.

⚙️ Components

Protocol

The most important part. It specifies which endpoints should the agent expose. The protocol is defined in OpenAPI specification.

How does the protocol work?

Right now the protocol is defined as a REST API (via the OpenAPI spec) with two essential routes for interaction with your agent:

  • POST /ap/v1/agent/tasks for creating a new task for the agent (for example giving the agent an objective that you want to accomplish)
  • POST /ap/v1/agent/tasks/{task_id}/steps for executing one step of the defined task

It has also a few additional routes for listing the tasks, steps and downloading / uploading artifacts.

SDK

This is our implementation of the protocol. It’s a library that you can use to build your agent. You can use it, or you can implement it on your own. It’s up to you.

Using the SDK should simplify the implementation of the protocol to the bare minimum, but at the same time it shouldn't tie your hands. The goal should be to allow agent builders to build their agents and the SDK should solve the rest.

Basically it wraps your agent in a web server that allows for communication with your agent (and in between agents in the future).

Client

This library should be used by the users of the agents. Your agent is deployed somewhere and the users of your agent can use this library to interact with your agent.

Thanks to the standard the users can try multiple agents without the need for any additional adjustments (or very minimal) in their code.

📦 How to use the protocol

If you're an agent developer, you can use the SDK to implement the protocol. You can find more info in the docs or in the SDK folder.

🤗 Adoption

Engaged projects in development of agent protocol

Open-source agents and projects that have adopted Agent Protocol

📃 High-level future roadmap

  • Agent-to-agent communication
  • Connection to the outside world:
  • 3rd party services (= “Agent I/O”)
  • Authentication on behalf of users
  • Protocol Plugins
  • Is there anything missing? Please submit an RFC with a proposed feature!

💬 Public discourse & development

  • PRs and issues are welcome!
  • Join AIEF Discord and their dedicated agent-protocol channel
  • Join Auto-GPT Discord and their dedicated agent-protocol channel
  • Join e2b Discord and their dedicated agent-protocol channel

Extension points exported contracts — how you extend this code

StepResult (Interface)
(no doc) [1 implementers]
packages/sdk/js/src/models.ts
Artifact (Interface)
(no doc)
packages/sdk/js/src/models.ts
Step (Interface)
(no doc)
packages/sdk/js/src/models.ts
StepRequestBody (Interface)
(no doc)
packages/sdk/js/src/models.ts
Task (Interface)
(no doc)
packages/sdk/js/src/models.ts

Core symbols most depended-on inside this repo

call_api
called by 9
packages/client/python/agent_protocol_client/api_client.py
select_header_accept
called by 9
packages/client/python/agent_protocol_client/api_client.py
request
called by 7
packages/client/python/agent_protocol_client/rest.py
get_task
called by 7
packages/sdk/python/agent_protocol/db.py
create_step
called by 6
packages/sdk/python/agent_protocol/db.py
remToPx
called by 6
apps/agentprotocol.ai/src/lib/remToPx.js
sanitize_for_serialization
called by 5
packages/client/python/agent_protocol_client/api_client.py
get_task
called by 5
packages/sdk/python/agent_protocol/db.py

Shape

Method 238
Function 157
Class 90
Interface 9
Route 9
Enum 1

Languages

Python70%
TypeScript30%

Modules by API surface

packages/client/python/agent_protocol_client/api_client.py28 symbols
packages/sdk/js/src/agent.ts27 symbols
packages/sdk/python/agent_protocol/models.py24 symbols
packages/sdk/python/agent_protocol/agent.py24 symbols
packages/client/python/agent_protocol_client/exceptions.py23 symbols
packages/sdk/python/agent_protocol/db.py22 symbols
packages/client/python/agent_protocol_client/api/agent_api.py20 symbols
apps/agentprotocol.ai/src/components/Search.jsx20 symbols
packages/client/python/agent_protocol_client/configuration.py17 symbols
packages/client/python/agent_protocol_client/rest.py15 symbols
apps/agentprotocol.ai/src/components/Code.jsx13 symbols
packages/client/python/agent_protocol_client/test/test_agent_api.py12 symbols

For agents

$ claude mcp add agent-protocol \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page