@ouvinte/a2a-bridge
v1.0.15
Published
A2A Bridge - Connect OpenClaw to the Agent2Agent protocol with CLI tools
Maintainers
Readme
A2A Bridge
Connect OpenClaw to the Agent2Agent (A2A) protocol with per-agent bridge management
A2A Bridge is a Linux-first CLI package that runs one or more A2A bridge agents on a single server, each with its own config, server file, PM2 process, and port.
Installation
Via npm (global)
npm install -g @ouvinte/a2a-bridgeVia Git Clone
git clone https://github.com/OuvinteInc/a2a-bridge-setup.git
cd a2a-bridge-setup
npm install
npm link # Creates global 'a2a-bridge' commandDebian/Ubuntu Package (Coming Soon)
wget https://github.com/OuvinteInc/a2a-bridge-setup/releases/latest/download/a2a-bridge.deb
dpkg -i a2a-bridge.debQuick Start
1. Setup an Agent Bridge
# Interactive setup wizard
sudo a2a-bridge setup \
--agent-id agent-1 \
--agent-name "Agent One"
# Or with flags
sudo a2a-bridge setup \
--agent-id agent-1 \
--agent-name "Agent One" \
--server-path ~/.a2a-bridges/agent-1/server.js \
--domain agent.example.com \
--email [email protected] \
--port 4120Notes:
- If
--server-pathis missing and~/.a2a-bridges/<agentId>/server.jsdoes not exist, setup seeds a bootstrap server file. installstill works as a deprecated alias ofsetup.
2. Start the Server
# Start agent bridge with PM2
a2a-bridge start --agent-id agent-1
# Or run in foreground for debugging
a2a-bridge start --agent-id agent-1 --foreground3. Check Status
a2a-bridge status --agent-id agent-1CLI Commands
| Command | Description |
|---------|-------------|
| setup | Run setup wizard for an agent |
| install | Deprecated alias for setup |
| start | Start an agent bridge |
| stop | Stop an agent bridge |
| restart | Restart an agent bridge |
| status | Check an agent bridge status |
| logs | View agent bridge logs |
| config | Manage per-agent configuration |
| agent-card | View/edit agent card |
| test | Test connectivity |
| service | Manage PM2 persistence/reload |
| uninstall | Remove from system |
Most commands support:
--agent-id <agentId>Configuration
View Config
a2a-bridge config --agent-id agent-1 --listSet Values
a2a-bridge config --agent-id agent-1 --set domain=agent.example.com
a2a-bridge config --agent-id agent-1 --set port=8080
# Optional: phone for notifications
a2a-bridge config --agent-id agent-1 --set userPhone=+1234567890Config File Location
~/.a2a-bridges/<agentId>/config.jsonLogging
View Logs
# Last 50 lines
a2a-bridge logs --agent-id agent-1
# Follow real-time
a2a-bridge logs --agent-id agent-1 --follow
# Last 100 lines
a2a-bridge logs --agent-id agent-1 -n 100Log Location
/var/log/a2a-bridge/<agentId>/a2a-bridge-<agentId>.logTesting
Local Test
a2a-bridge test --agent-id agent-1 --localRemote Test
a2a-bridge test --agent-id agent-1 --remoteManual Test with curl
# Check agent card
curl https://agent.example.com/.well-known/agent.json
# Health check
curl https://agent.example.com/healthPM2 Integration
The setup automatically manages each agent with PM2:
# Persist PM2 process list for auto-start
a2a-bridge service --agent-id agent-1 enable
# Remove process from PM2 startup list
a2a-bridge service --agent-id agent-1 disable
# Restart process after config changes
a2a-bridge service --agent-id agent-1 reload
# Inspect PM2 processes directly
pm2 lsAgent Card
Your agent's capabilities are advertised at:
https://yourdomain.com/.well-known/agent.jsonView Current Card
a2a-bridge agent-card --agent-id agent-1 --showEdit Skills
a2a-bridge agent-card --agent-id agent-1 --editArchitecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Other Agent │──────▶│ Nginx (443) │──────▶│ A2A Bridge │
│ │◀──────│ SSL/Reverse │◀──────│ (Port 4120) │
└─────────────────┘ │ Proxy │ └─────────────────┘
└─────────────────┘ │
▼
┌──────────────┐
│ OpenClaw │
└──────────────┘Uninstallation
# Keep config and logs
a2a-bridge uninstall --agent-id agent-1
# Remove everything
a2a-bridge uninstall --agent-id agent-1 --purgeEnvironment Variables
| Variable | Description |
|----------|-------------|
| A2A_BRIDGE_AGENT_ID | Agent identifier override |
| A2A_BRIDGE_CONFIG | Config directory override |
| CONFIG_PATH | Config file path override |
| PORT | Port override for runtime |
| NODE_ENV | Environment (production/development) |
| DEBUG | Enable debug logging |
Requirements
- Node.js 18+
- Linux
pm2,sqlite3,nginx(installed by setup when possible)- Domain name pointed to server
License
MIT © Ouvinte Inc
