Get up and running with Agent Exchange in minutes!
- Go 1.22+ - Install Go
- Docker & Docker Compose - Install Docker
- Make (optional but recommended)
# Clone the repository
git clone <repo-url>
cd agent-exchange
# Build and start everything
make quickstart
# Check service health
make healthThat's it! All services are now running.
# 1. Build all services
make build
# 2. Build Docker images
make docker-build
# 3. Start services
make docker-up
# 4. View logs
make docker-logs# 1. Start MongoDB
make mongo-up
# 2. Initialize database
mongosh mongodb://root:root@localhost:27017 < hack/mongo-init.js
# 3. Run a service locally
make dev-work-publisher
# or
make dev-settlementOnce running, services are available at:
| Service | URL | Status |
|---|---|---|
| Gateway | http://localhost:8080 | ✅ Ready |
| Work Publisher | http://localhost:8081 | ✅ Ready |
| Bid Gateway | http://localhost:8082 | ✅ Ready |
| Bid Evaluator | http://localhost:8083 | ✅ Ready |
| Contract Engine | http://localhost:8084 | ✅ Ready |
| Provider Registry | http://localhost:8085 | ✅ Ready |
| Trust Broker | http://localhost:8086 | ✅ Ready |
| Identity | http://localhost:8087 | ✅ Ready |
| Settlement | http://localhost:8088 | ✅ Ready |
| Telemetry | http://localhost:8089 | |
| Credentials Provider (AP2) | http://localhost:8090 | ✅ NEW |
| Component | URL | Description |
|---|---|---|
| NiceGUI UI (Recommended) | http://localhost:8502 | Real-time demo dashboard |
| Budget Legal Agent | http://localhost:8100 | $5 + $2/page |
| Standard Legal Agent | http://localhost:8101 | $15 + $0.50/page |
| Premium Legal Agent | http://localhost:8102 | $30 + $0.20/page |
| Orchestrator | http://localhost:8103 | Consumer agent |
| LegalPay | http://localhost:8200 | Payment processor |
| ContractPay | http://localhost:8201 | Payment processor |
| CompliancePay | http://localhost:8202 | Payment processor |
MongoDB: mongodb://root:root@localhost:27017
curl -X POST http://localhost:8081/v1/work \
-H "Content-Type: application/json" \
-d '{
"category": "general",
"description": "Test work request",
"budget": {
"max_price": 100.0,
"bid_strategy": "balanced"
},
"success_criteria": [
{
"metric": "accuracy",
"threshold": 0.95,
"comparison": ">=",
"bonus": 10.0
}
]
}'Response:
{
"work_id": "work_abc123",
"status": "open",
"bid_window_ends_at": "2025-12-23T12:30:00Z",
"providers_notified": 5,
"created_at": "2025-12-23T12:00:00Z"
}curl http://localhost:8088/v1/balance?tenant_id=tenant_test001Response:
{
"tenant_id": "tenant_test001",
"balance": "1000.00",
"currency": "USD"
}curl -X POST http://localhost:8088/v1/deposits \
-H "Content-Type: application/json" \
-d '{
"tenant_id": "tenant_test001",
"amount": "500.00"
}'curl "http://localhost:8088/v1/usage?tenant_id=tenant_test001&limit=10"# Check all services
make health
# Or individually
curl http://localhost:8081/health # work-publisher
curl http://localhost:8088/health # settlement# Build specific service
make build-aex-work-publisher
# Test specific service
make test-aex-settlement
# View logs for specific service
make docker-logs-aex-work-publisher
# Rebuild Docker image
make docker-build-aex-settlement
# Stop all services
make docker-down
# Clean and restart
make docker-clean && make quickstart
# Format code
make fmt
# Run linters
make lint
# Tidy dependencies
make tidy# 1. Start dependencies (MongoDB)
make mongo-up
# 2. Run service locally
cd src/aex-work-publisher
ENVIRONMENT=development \
STORE_TYPE=memory \
PORT=8081 \
go run ./src
# 3. Make changes and test
# 4. Build and test
go build -o bin/aex-work-publisher ./src
./bin/aex-work-publisher
# 5. Run tests
go test ./... -v// Example: Create client in internal/clients/
package clients
import (
"context"
"time"
"github.com/parlakisik/agent-exchange/internal/httpclient"
)
type MyServiceClient struct {
baseURL string
client *httpclient.Client
}
func NewMyServiceClient(baseURL string) *MyServiceClient {
return &MyServiceClient{
baseURL: baseURL,
client: httpclient.NewClient("my-service", 10*time.Second),
}
}
func (c *MyServiceClient) GetData(ctx context.Context, id string) (*Data, error) {
var result Data
err := httpclient.NewRequest("GET", c.baseURL).
Path("/v1/data/" + id).
Context(ctx).
ExecuteJSON(c.client, &result)
return &result, err
}# Check if ports are already in use
lsof -i :8080-8089
# Check Docker logs
make docker-logs
# Restart with fresh state
make docker-clean && make quickstart# Check MongoDB is running
docker ps | grep mongo
# Test connection
mongosh mongodb://root:root@localhost:27017
# Restart MongoDB
docker restart aex-mongo# Clean and rebuild
make clean
make tidy
make build# Check service logs
make docker-logs-aex-work-publisher
# Restart specific service
docker-compose -f hack/docker-compose.yml restart aex-work-publisher
# Check service health
curl http://localhost:8081/health -vCopy .env.example to .env and customize:
cp .env.example .env
# Edit .env with your valuesKey variables:
MONGO_URI- MongoDB connection stringENVIRONMENT- development | productionWORK_PUBLISHER_STORE_TYPE- mongo | firestore | memoryPLATFORM_FEE_RATE- Settlement platform fee (default: 0.15)
The demo showcases the complete AEX + A2A + AP2 integration with legal agents and payment processors.
cd demo
docker-compose up -d
open http://localhost:8502cd demo
# Clean start
docker-compose down -v
# Start AEX only (no agents)
docker-compose up -d mongo aex-identity aex-provider-registry aex-trust-broker \
aex-bid-gateway aex-bid-evaluator aex-contract-engine aex-work-publisher \
aex-settlement aex-credentials-provider aex-telemetry aex-gateway
# Start UI
docker-compose up -d --no-deps demo-ui-nicegui
open http://localhost:8502
# Add agents one by one (agents auto-appear in UI)
docker-compose up -d legal-agent-a
docker-compose up -d legal-agent-b
docker-compose up -d legal-agent-c
docker-compose up -d payment-legalpay payment-contractpay payment-compliancepay
docker-compose up -d orchestrator- Submit Work - Enter contract text in UI
- Watch Bids - See legal agents compete
- Award Contract - Best bid wins based on strategy
- A2A Execution - Direct agent-to-agent communication
- AP2 Payment - Payment agents bid for transaction
- Settlement - Platform fee + provider payout
- Run the Demo - See instructions above or
demo/README.md - Run Integration Tests -
make test - Explore the Code - Start with
src/aex-work-publisher - Check the Roadmap - See
src/development-roadmap.mdfor gaps and next steps - Read Phase A Specs - See
phase-a/readme.mdfor architecture details - AP2 Integration - See
AP2_INTEGRATION.mdfor payment protocol details - Presentation Materials - See
PRESENTATION.mdandPRESENTATION_SLIDES.md
┌─────────────────┐
│ aex-gateway │ (8080) - API Gateway
└────────┬────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
┌───▼──────────┐ ┌────────▼────────┐ ┌─────────▼────────┐
│work-publisher│ │ bid-gateway │ │provider-registry │
│ (8081) │ │ (8082) │ │ (8085) │
└───┬──────────┘ └────────┬────────┘ └──────────────────┘
│ │
│ ┌────────▼────────┐
└──────────────►│ bid-evaluator │
│ (8083) │
└────────┬────────┘
│
┌────────▼────────┐
│contract-engine │
│ (8084) │
└────────┬────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
┌───▼──────────┐ ┌────────▼────────┐ ┌─────────▼────────┐
│ trust-broker │ │ settlement │ │credentials-prov. │
│ (8086) │ │(8088) + AP2 │ │(8090) - AP2 NEW │
└──────────────┘ └─────────────────┘ └──────────────────┘
┌─────────────┐ ┌─────────────────────────────────────┐
│ Consumer │ │ AEX Marketplace │
│ Orchestrator│◄───────►│ (Discovery, Bidding, Settlement) │
│ (8103) │ └─────────────────────────────────────┘
└──────┬──────┘ │
│ A2A │ AP2
│ JSON-RPC │
▼ ▼
┌─────────────────────┐ ┌─────────────────────────────┐
│ Legal Agents │ │ Payment Agents (AP2) │
│ Budget (8100) │ │ LegalPay (8200) │
│ Standard (8101) │ │ ContractPay (8201) │
│ Premium (8102) │ │ CompliancePay (8202) │
└─────────────────────┘ └─────────────────────────────┘
- Issues: Report bugs in GitHub Issues
- Documentation: See
docs/folder andphase-a/specs/ - Roadmap: Check
src/development-roadmap.mdfor current status and gaps