Skip to main content

Open-source, secure, decentralized agent registration and discovery infrastructure for AI Agent world

Project description

AgentMesh

AgentMesh is an open-source registry and discovery service for AI agents. It provides a standard AgentCard model, REST API, SDK, CLI, optional token auth, and pluggable storage backends.

What is implemented

  • Agent registration, update, deletion, listing
  • Agent discovery (skill/protocol/tags/query) and search
  • Protocol invocation gateway (http, custom, a2a, mcp, grpc, websocket)
  • Heartbeat + health checks
  • System and per-agent statistics
  • Token endpoints (/auth/token, /auth/refresh, /auth/verify)
  • Optional API key protection for write/admin routes
  • Production safety mode (--production) to require strong auth config
  • Signature utilities (/security/keypair, /security/sign, /security/verify)
  • Storage backends: memory (default), Redis, PostgreSQL
  • Python SDK: async AgentMeshClient + sync SyncAgentMeshClient
  • CLI: serve, config, agents commands

Install

pip install -e .

Optional protocol extras (for grpc/websocket invocation bridges):

pip install -e ".[grpc,websocket]"

Quick start

1) Run server

# in-memory (default)
python -m agentmesh serve --storage memory --port 8000

# Redis
python -m agentmesh serve --storage redis --redis-url redis://localhost:6379 --port 8000

# PostgreSQL
python -m agentmesh serve --storage postgres --postgres-url postgresql://localhost:5432/agentmesh --port 8000

# production safety checks enabled
python -m agentmesh serve --storage postgres --postgres-url postgresql://localhost:5432/agentmesh \
  --api-key YOUR_API_KEY --auth-secret YOUR_STRONG_SECRET --production --port 8000

2) Register and discover with SDK

import asyncio
from agentmesh import AgentMeshClient

async def main():
    client = AgentMeshClient(base_url="http://localhost:8000")

    await client.register_agent({
        "id": "weather-bot-001",
        "name": "WeatherBot",
        "version": "1.0.0",
        "description": "Weather forecasting service",
        "skills": [
            {"name": "get_weather", "description": "Get current weather"}
        ],
        "endpoint": "http://localhost:8001/weather",
        "protocol": "http",
        "tags": ["weather", "api"],
        "health_status": "healthy"
    })

    result = await client.discover_agents(skill="get_weather")
    print(result["data"]["agents"])

    invoke_result = await client.invoke_agent(
        "weather-bot-001",
        payload={"city": "Tokyo"},
        path="/weather"
    )
    print(invoke_result["data"]["result"]["response"])

    await client.close()

asyncio.run(main())

3) Web Dashboard (EvoMap UI)

AgentMesh now includes a high-fidelity web console inspired by evomap.ai.

# Register some demo agents first
python seed_registry.py

# Start backend
python -m agentmesh serve --debug

# Start frontend (in a new terminal)
cd web
npm install
npm run dev

Visit http://localhost:3000 to view analytics, search agents (โŒ˜K), and test Manifests in the Sandbox.

4) Use CLI

# configure endpoint
agentmesh config set endpoint http://localhost:8000

# register
agentmesh agents register \
  --id cli-agent-001 \
  --name CLIAgent \
  --description "CLI agent" \
  --skill execute_command \
  --tag cli

# list/search/get/update/delete
agentmesh agents list
agentmesh agents search --skill execute_command
agentmesh agents get cli-agent-001
agentmesh agents invoke cli-agent-001 --payload '{"task":"ping"}'
agentmesh agents update cli-agent-001 --description "Updated description"
agentmesh agents delete cli-agent-001

๐Ÿ”’ Production Readiness

The server includes a --production mode that enforces security best practices:

agentmesh serve --production \
  --api-key your-production-key \
  --auth-secret your-strong-jwt-secret \
  --storage postgres \
  --postgres-url postgresql://user:pass@db:5432/agentmesh

What production mode enforces:

  • X-API-Key is mandatory for all write operations.
  • auth-secret must be provided and cannot be the default value.
  • Rate limiting is enabled on sensitive endpoints.
  • Prometheus /metrics are exposed for observability.

API docs

  • Swagger: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Detailed reference: docs/protocol/api_reference.md.

Response format

Successful responses:

{
  "success": true,
  "data": {},
  "message": "Operation successful",
  "timestamp": "2026-02-23T18:00:00Z"
}

Error responses:

{
  "success": false,
  "error": {
    "code": "400",
    "message": "Validation failed",
    "details": {}
  },
  "timestamp": "2026-02-23T18:00:00Z"
}

Run tests

python -m unittest discover -s tests -v

Project layout

src/agentmesh/
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ __main__.py
โ”œโ”€โ”€ cli.py
โ”œโ”€โ”€ client.py
โ”œโ”€โ”€ api/
โ”‚   โ”œโ”€โ”€ routes.py
โ”‚   โ””โ”€โ”€ server.py
โ”œโ”€โ”€ auth/
โ”‚   โ””โ”€โ”€ token_manager.py
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ agent_card.py
โ”‚   โ”œโ”€โ”€ registry.py
โ”‚   โ””โ”€โ”€ security.py
โ”œโ”€โ”€ storage/
โ”‚   โ”œโ”€โ”€ base.py
โ”‚   โ”œโ”€โ”€ memory.py
โ”‚   โ”œโ”€โ”€ redis.py
โ”‚   โ””โ”€โ”€ postgres.py
โ”œโ”€โ”€ protocols/
โ”‚   โ”œโ”€โ”€ base.py
โ”‚   โ”œโ”€โ”€ gateway.py
โ”‚   โ”œโ”€โ”€ http_custom.py
โ”‚   โ”œโ”€โ”€ a2a.py
โ”‚   โ”œโ”€โ”€ mcp.py
โ”‚   โ”œโ”€โ”€ grpc.py
โ”‚   โ””โ”€โ”€ websocket.py
โ””โ”€โ”€ utils/
    โ””โ”€โ”€ responses.py

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentmesh_python-1.1.0.tar.gz (126.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentmesh_python-1.1.0-py3-none-any.whl (103.1 kB view details)

Uploaded Python 3

File details

Details for the file agentmesh_python-1.1.0.tar.gz.

File metadata

  • Download URL: agentmesh_python-1.1.0.tar.gz
  • Upload date:
  • Size: 126.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for agentmesh_python-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5d50050ae90f3e81ebf0d61a05ff87e44ab4edc56614fe9dc9adc554bde5e0db
MD5 b590886705fafc63bb62b0800ca4f9cc
BLAKE2b-256 081f888eef0cee47a20e47da1326560e82751d502235202b005ff64b853de460

See more details on using hashes here.

File details

Details for the file agentmesh_python-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentmesh_python-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40f3c09686c77d0aa3669f8d8e1b2d4ead549cb9a2809f365c1d9359f43473c1
MD5 32dea1255effa723161962de2014f7d5
BLAKE2b-256 f0acfead5d8ab7742ea9cc04edb00546735f46ef559cd283cbf82a77e774b3e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page