Skip to content

Our vision is to provide communication capabilities for intelligent agents, allowing them to connect with each other to form a collaborative network of intelligent agents.

License

Notifications You must be signed in to change notification settings

chgaowei/AgentConnect

Repository files navigation

AgentConnect

What is AgentConnect

AgentConnect is an open-source implementation of the Agent Network Protocol (ANP).

The Agent Network Protocol (ANP) aims to become the HTTP of the Agentic Internet era.

Our vision is to define how agents connect with each other and build an open, secure, and efficient collaboration network for billions of agents.

Agentic Web

While current internet infrastructure is well-established, there's still a lack of optimal communication and connection solutions for the specific needs of agent networks. We are committed to addressing three major challenges faced by agent networks:

  • 🌐 Interconnectivity: Enable communication between all agents, break down data silos, and allow AI to access complete contextual information.
  • 🖥️ Native Interfaces: AI shouldn't have to mimic human internet interactions; it should interact with the digital world through its most proficient methods (APIs or communication protocols).
  • 🤝 Efficient Collaboration: Leverage AI for self-organizing and self-negotiating agents to build a more cost-effective and efficient collaboration network than the existing internet.

AgentConnect Architecture

The technical architecture of AgentConnect is illustrated below:

Project Architecture

Corresponding to the three-layer architecture of the Agent Network Protocol, AgentConnect primarily includes:

  1. 🔒 Authentication and End-to-End Encryption Modules Implements W3C DID-based authentication and end-to-end encrypted communication, including DID document generation, verification, retrieval, and end-to-end encryption based on DID and ECDHE (Elliptic Curve Diffie-Hellman Ephemeral). Currently supports HTTP-based DID authentication.

  2. 🌍 Meta-Protocol Module Built on LLM (Large Language Models) and meta-protocols, this module handles application protocol negotiation, protocol code implementation, protocol debugging, and protocol processing.

  3. 📡 Application Layer Protocol Integration Framework Manages protocol specifications and code for communication with other agents, including protocol loading, unloading, configuration, and processing. This framework enables agents to easily load and run required protocols on demand, accelerating protocol negotiation.

Beyond these features, AgentConnect will focus on performance and multi-platform support:

  • Performance: As a fundamental codebase, we aim to provide optimal performance and plan to rewrite core components in Rust.
  • Multi-Platform: Currently supports Mac, Linux, and Windows, with future support for mobile platforms and browsers.

Documentation

Here are some of our blogs:

Milestones

Both protocol and implementation development follow this progression:

  • Build authentication and end-to-end encrypted communication protocol and implementation. This foundational core is essentially complete.
  • Meta-protocol design and implementation. Protocol design and code development are basically complete.
  • Application layer protocol design and development. Currently in progress.

To establish ANP as an industry standard, we plan to form an ANP Standardization Committee at an appropriate time, working towards recognition by international standardization organizations like W3C.

Installation

pip install agent-connect

Running

After installing the agent-connect library, you can run our demos to experience its capabilities.

Clone the repository:

git clone https://github.com/chgaowei/AgentConnect.git

Decentralized Authentication Based on did:wba and HTTP

did:wba is a Web-based Decentralized Identifier. More information: did:wba, a Web-based Decentralized Identifier.

Our latest version supports decentralized authentication based on did:wba and HTTP. We provide a did:wba server for testing. Server API documentation: did:wba Server Test API Documentation.

Example code path: examples/did_wba_examples. Including:

  • basic.py: A basic example of DID WBA authentication. Creates a DID document and private key, uploads the DID document to the server, and tests DID authentication.
  • full.py: Builds on basic.py, adding token verification and DID document validation.
  • client.py: A client example for testing if your server supports DID WBA authentication, using pre-created DID documents and private keys.

Run these files directly to experience DID WBA authentication:

python basic.py
python full.py
python client.py

You can also experience DID WBA authentication through our demo page: DID WBA Authentication Page. This page demonstrates the process of creating a DID identity on one platform (pi-unlimited.com) and then verifying the identity on another platform (agent-network-protocol.com).

Meta-Protocol Negotiation Example

We support meta-protocol negotiation where Alice and Bob first negotiate a protocol, generate processing code, and then communicate using the protocol code.

Run the demo code in examples/negotiation_mode directory. Start Bob's node first, then Alice's node.

  1. Start Bob's node
python negotiation_bob.py
  1. Start Alice's node
python negotiation_alice.py

The logs will show successful connection, protocol negotiation, code generation, and data communication between Alice and Bob.

Note: Meta-protocol negotiation requires Azure OpenAI API configuration (currently only supports Azure OpenAI). Configure these environment variables in the ".env" file in the project root: AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT, AZURE_OPENAI_MODEL_NAME

Contact Us

Author: Gaowei Chang
Email: [email protected]

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

This project is open-sourced under the MIT License. See the LICENSE file for details.

About

Our vision is to provide communication capabilities for intelligent agents, allowing them to connect with each other to form a collaborative network of intelligent agents.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages