A centralized registry service for discovering and managing AI agents in the A2A (Agent-to-Agent) ecosystem. This implementation follows the A2A Agent Registry Proposal and provides a complete solution for agent discovery, entitlements, and federation.
- π¨ Modern Web UI: Beautiful, responsive React frontend with Tailwind CSS
- π Agent Discovery: Advanced search with lexical and semantic capabilities
- π Enterprise Security: OAuth 2.0, rate limiting, and comprehensive security headers
- π Federation: Cross-registry peering and synchronization
- π Production Ready: Monitoring, logging, caching, and automated deployment
- π High Performance: Redis caching, connection pooling, and horizontal scaling
- π Well-Documented: Complete API documentation and deployment guides
This repository is now a core-only API service (no React UI). Use the steps below for a minimal local run:
-
Start dependencies and API
docker-compose up -d db redis opensearch registry
-
Apply migrations
alembic upgrade head
-
Publish an agent card by URL (Administrator/CatalogManager token required)
curl -X POST "http://localhost:8000/agents/publish" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "cardUrl": "https://example.com/.well-known/agent-card.json", "public": true }'
-
Query public/entitled/search endpoints
curl "http://localhost:8000/agents/public?top=20&skip=0" curl -H "Authorization: Bearer YOUR_TOKEN" "http://localhost:8000/agents/entitled?top=20&skip=0" curl -X POST -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" \ "http://localhost:8000/agents/search" -d '{"q":"payments","top":20,"skip":0}'
Authentication: Provide an OAuth2 client-credentials JWT issued by your IdP. JWKS verification is configured via settings.
SLOs: p95 < 200 ms for cache-warm reads (local region), 99.9% availability, scale targets 10M agents / 2k RPS reads / 200 RPS writes.
- Python 3.9+
- Node.js 18+
- Docker and Docker Compose
- PostgreSQL 12+
- Redis 6+
- OpenSearch 2.x
-
Clone the repository
git clone https://github.com/A2AReg/a2a-registry.git cd a2a-registry -
Start with Docker (Recommended)
docker-compose up -d
-
Initialize sample data
python scripts/init_db.py
-
Access the registry
- Web UI: http://localhost:3000 (React frontend)
- API: http://localhost:8000 (FastAPI backend)
- API Docs: http://localhost:8000/docs
- Health: http://localhost:8000/health
-
Install backend dependencies
pip install -r requirements.txt
-
Install frontend dependencies
cd frontend npm install --legacy-peer-deps cd ..
-
Configure environment
cp env.example .env # Edit .env with your configuration -
Start services
docker-compose up -d db redis opensearch
-
Run migrations
alembic upgrade head
-
Start the backend
python -m registry.main
-
Start the frontend (in a new terminal)
cd frontend npm run dev
The A2A Agent Registry includes a modern, responsive web interface built with React and Tailwind CSS:
- π Dashboard: Overview of registry statistics and system health
- π€ Agent Management: Browse, search, and manage agents with advanced filtering
- π₯ Client Management: OAuth client registration and entitlement management
- π Federation: Configure peer registries and cross-registry synchronization
- βοΈ Settings: System configuration and user preferences
- π Authentication: Secure OAuth 2.0 login with client credentials
- Responsive Design: Works on desktop, tablet, and mobile devices
- Dark/Light Mode: Automatic theme switching based on system preferences
- Real-time Updates: Live data refresh and notifications
- Advanced Search: Semantic and lexical search with filters
- Interactive Charts: Visual representation of registry statistics
- Production Deployment - Enterprise deployment guide
- Contributing Guide - How to contribute to the project
- Security Policy - Security guidelines and vulnerability reporting
- Code of Conduct - Community guidelines
- API Documentation - Interactive API docs
- Changelog - Release history and changes
# Application
APP_NAME="A2A Agent Registry"
APP_VERSION="1.0.0"
DEBUG=false
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/a2a_registry"
# Redis
REDIS_URL="redis://localhost:6379/0"
# OpenSearch
ELASTICSEARCH_URL="http://localhost:9200"
ELASTICSEARCH_INDEX="a2a_agents"
# Security
SECRET_KEY="your-secret-key-change-in-production"
ALGORITHM="HS256"
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Registry
REGISTRY_BASE_URL="http://localhost:8000"
MAX_AGENTS_PER_CLIENT=1000
ENABLE_FEDERATION=trueThe registry uses OAuth 2.0 Client Credentials flow for authentication:
# Get access token
curl -X POST "http://localhost:8000/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=your_client_id&password=your_client_secret"curl -X POST "http://localhost:8000/agents" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agent_card": {
"id": "my-agent",
"name": "My AI Agent",
"version": "1.0.0",
"description": "A sample AI agent",
"capabilities": {
"a2a_version": "1.0",
"supported_protocols": ["http", "grpc"]
},
"skills": {
"input_schema": {"type": "object"},
"output_schema": {"type": "object"}
},
"auth_schemes": [
{
"type": "apiKey",
"location": "header",
"name": "X-API-Key"
}
],
"provider": "My Company",
"tags": ["ai", "assistant"],
"location": {
"url": "https://my-agent.example.com/.well-known/agent.json",
"type": "agent_card"
}
},
"is_public": true
}'curl -X POST "http://localhost:8000/agents/search" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "AI assistant",
"filters": {
"provider": "My Company",
"tags": ["ai"]
},
"top": 10
}'curl -X GET "http://localhost:8000/agents/entitled" \
-H "Authorization: Bearer YOUR_TOKEN"# Get agents index
curl "http://localhost:8000/.well-known/agents/index.json"
# Get specific agent card
curl "http://localhost:8000/agents/my-agent/card"The Agent Card is the core data structure for agent metadata:
{
"id": "agent-id",
"name": "Agent Name",
"version": "1.0.0",
"description": "Agent description",
"capabilities": {
"a2a_version": "1.0",
"supported_protocols": ["http", "grpc", "websocket"],
"max_concurrent_requests": 100,
"timeout_seconds": 30,
"rate_limit_per_minute": 1000
},
"skills": {
"input_schema": {
"type": "object",
"properties": {
"query": {"type": "string"},
"context": {"type": "object"}
}
},
"output_schema": {
"type": "object",
"properties": {
"response": {"type": "string"},
"confidence": {"type": "number"}
}
}
},
"auth_schemes": [
{
"type": "apiKey",
"location": "header",
"name": "X-API-Key"
},
{
"type": "oauth2",
"flow": "client_credentials",
"token_url": "https://auth.example.com/oauth/token",
"scopes": ["agent:read", "agent:write"]
}
],
"tee_details": {
"enabled": true,
"provider": "Intel SGX",
"attestation": "required",
"version": "2.0"
},
"provider": "Agent Provider",
"tags": ["ai", "assistant", "nlp"],
"contact_url": "https://example.com/contact",
"documentation_url": "https://docs.example.com/agent",
"location": {
"url": "https://agent.example.com/.well-known/agent.json",
"type": "agent_card"
}
}The registry supports federation with other A2A registries:
curl -X POST "http://localhost:8000/peers" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Partner Registry",
"base_url": "https://partner-registry.example.com",
"description": "Partner organization registry",
"auth_token": "peer_auth_token",
"sync_enabled": true,
"sync_interval_minutes": 60
}'# Sync specific peer
curl -X POST "http://localhost:8000/peers/peer-id/sync" \
-H "Authorization: Bearer YOUR_TOKEN"
# Sync all peers
curl -X POST "http://localhost:8000/peers/sync-all" \
-H "Authorization: Bearer YOUR_TOKEN"Run comprehensive quality checks using the provided scripts:
# Python script (recommended)
python quality_check.py --all
# Shell script
./quality_check.sh --all
# Makefile
make quality
# Individual checks
python quality_check.py --lint --test
make lint test
# Development commands
make backend # Run the backend server
make examples # Run all examples
make example NAME=basic_usage # Run specific example
# Publishing commands
make publish # Publish SDK to PyPI
make build-sdk # Build SDK package
make test-sdk # Test SDK package locallySee QUALITY_CHECKS.md for detailed information.
pytest tests/black app/
isort app/# Create migration
alembic revision --autogenerate -m "Description"
# Apply migration
alembic upgrade head- Framework: React 18 with TypeScript
- Build Tool: Vite for fast development and optimized builds
- Styling: Tailwind CSS with custom components
- State Management: React Query for server state management
- Routing: React Router for SPA navigation
- Forms: React Hook Form with validation
- Notifications: React Hot Toast for user feedback
- API Layer: FastAPI-based REST API with OpenAPI documentation
- Service Layer: Business logic for agents, clients, search, and peering
- Data Layer: SQLAlchemy ORM with PostgreSQL backend
- Search Layer: OpenSearch for high-performance search
- Auth Layer: OAuth 2.0 with JWT tokens
- Federation Layer: Peer-to-peer synchronization
- Web Interface: Modern React frontend with responsive design
- agents: Agent metadata and cards
- clients: OAuth 2.0 clients
- client_entitlements: Agent access permissions
- peer_registries: Federation peers
- peer_syncs: Synchronization history
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
Apache 2.0 License - see LICENSE file for details.
We welcome contributions! Please see our Contributing Guide for details.
- π Report bugs using GitHub Issues
- π‘ Suggest features using GitHub Discussions
- π Improve documentation
- π§ Submit pull requests
- π§ͺ Add tests
- π Security improvements
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Security is important to us. Please report security vulnerabilities privately to security@a2areg.dev.
See our Security Policy for more information.
- π¬ Discord: Join our community chat - Get help, share ideas, and connect with other developers
- π GitHub Issues: Report bugs and request features
- π‘ GitHub Discussions: Community discussions
- π€ A2A Community: A2A Discussions
- π Documentation: Full API documentation
- A2A Project for the original proposal
- FastAPI for the excellent web framework
- SQLAlchemy for database ORM
- OpenSearch for search capabilities
- All contributors and the open source community