agent-protocol
AI Agent 通用通信协议,让不同框架的 Agent 能互相通话
加载项目详情…
本应用为开源项目,仅供学习研究,请遵守其开源协议。
AI Agent 通用通信协议,让不同框架的 Agent 能互相通话
加载项目详情…
本应用为开源项目,仅供学习研究,请遵守其开源协议。
Imagine a scenario: you have deployed AutoGPT internally, which returns results in JSON format; another team uses LangChain Agents that return Python dicts; the neighboring department just launched a custom Claude-based assistant with yet another completely different interface. Your monitoring platform, logging system, and debugging tools must each adapt a separate integration code for every different Agent -- this is the real dilemma facing the AI Agent ecosystem today.
Agent Protocol was created to solve this problem. Maintained by AGI, Inc., it is a tech-stack-agnostic common interface specification (Protocol Specification) for AI Agent communication. Any AI Agent developed using any framework can be called by any client compatible with this protocol, as long as it implements the API endpoints specified by the protocol. This is similar to how the HTTP protocol allows all web servers to be accessed by all browsers -- Agent Protocol attempts to establish the same interoperability standard for the AI Agent world.
Figure 1: Agent Protocol Project Cover
2023 was the year of AI Agents. As projects like AutoGPT, GPT-Engineer, and MetaGPT emerged, developers quickly discovered a problem: every Agent project was inventing its own wheel, defining its own API interfaces and communication formats. The founding team of Agent Protocol (from AGI, Inc.) keenly spotted this pain point and decided to push for establishing a minimal consensus specification that would guide the Agent ecosystem from fragmentation toward standardization. The project has received 1,461 GitHub stars (data as of analysis), holds an MIT open-source license, and attracts contributors from diverse backgrounds. The project motivation is crystal clear: make interoperability between Agents a first-class citizen, and enable developer tools to be built once and run everywhere.
The technical core of Agent Protocol is a complete OpenAPI 3.0.1 specification file (schemas/openapi.yml), defining 6 REST API endpoints that cover the complete lifecycle of AI Agent task management:
Task Management Endpoints
POST /ap/v1/agent/tasks -- Create a new task, return Task object (with unique task_id)GET /ap/v1/agent/tasks -- Paginated list of all tasks, supports current_page and page_size parametersGET /ap/v1/agent/tasks/{task_id} -- Get detailed information of a specified task
Step Tracking EndpointsGET /ap/v1/agent/tasks/{task_id}/steps -- Get all execution steps of a task (pagination supported)PATCH /ap/v1/agent/tasks/{task_id}/steps/{step_id} -- Update step status (supports Agents reporting progress step by step)
Artifact Management EndpointsGET /ap/v1/agent/tasks/{task_id}/artifacts -- Get all artifacts produced by a task (e.g., generated files, code)GET /ap/v1/agent/tasks/{task_id}/artifacts/{artifact_id} -- Get details of a specified artifact
Core data models include Task (task), Step (step), Artifact (artifact), and Pagination. This design covers the complete flow of an AI Agent receiving a task, executing multi-step reasoning, and producing results.The project adopts a Monorepo architecture with a clear organizational structure:
js/) and Python (python/) implementations, auto-generated from the specification file via OpenAPI GeneratorSDKs are the key vehicle for protocol implementation. The project auto-generates TypeScript Fetch clients and Python clients from openapi.yml through OpenAPI Generator, meaning when the protocol specification is updated, SDKs can be automatically synchronized -- no need to manually maintain multiple sets of API binding code.
The generation command is concise and clear:
npm run generate:client:js
This mechanism completely decouples the protocol itself from specific language implementations. Any Agent implementer only needs to ensure their API conforms to the specification, and clients in any language can communicate with it.
Figure 2: Python SDK Style Identifier
It is important to clarify that Agent Protocol itself is an API specification file, not a runnable server program. If users want a reference implementation conforming to the protocol, they need to refer to the example code in testing_suite or build their own based on the SDK. The protocol itself requires no GPU and no special hardware -- a regular development machine is sufficient. With no Dockerfile and docker-compose files, the project provides no containerized one-click deployment capability. The documentation site (Next.js app) can theoretically be deployed on platforms like Vercel, but this is documentation deployment, not protocol deployment.
Significance: Agent Protocol is pushing toward the USB-C moment for the AI Agent field -- if all Agents follow the same protocol, toolchain developers only need to write integration code once to support all compatible Agents. This has tremendous leverage value for building Agent monitoring platforms, benchmark frameworks, and debugging toolchains. Limitations: The protocol is still in early stages (v1), with limited endpoint coverage, no streaming response support, no multi-Agent collaboration, and no definition of internal thinking process formats for Agents. Additionally, the governance of protocol evolution itself is a challenge -- balancing backward compatibility with feature expansion requires sustained community investment.