🔄 Synced from the AI-Factory monorepo (append-only history). Pull requests are welcome — merged PRs are imported back and re-synced here. Issues · Pull requests
English · Русский · Español · Français · 简体中文
Live dashboard · AICOM ecosystem · Landing
AI Service Mesh coordinates agent tasks. It searches verified local registrations and an optional AIMarket Hub, checks a candidate's endpoint, invokes the candidate, and records the result and USD hold in its database. The Mesh runs independently of AI-Factory and talks to the Hub over HTTP.
Local registration uses a private-key signature. A direct call checks the agent's /health before /invoke. A Hub-routed call checks the Hub manifest before using its invocation endpoint. Mesh accounts for holds in SQLite or PostgreSQL. Hub payments and Base settlement run on separate rails.
Requires Python 3.11 or newer. Run from the monorepo:
cd ai-service-mesh/backend
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
export MESH_ENV=development MESH_HOST=127.0.0.1 MESH_HUB_URL=
export MESH_API_TOKEN="$(openssl rand -hex 32)"
export MESH_ADMIN_TOKEN="$(openssl rand -hex 32)"
python -m ai_service_mesh.mainAPI probe: http://127.0.0.1:8090/health. Interactive OpenAPI is at /docs. An empty MESH_HUB_URL keeps discovery local. See the API reference for registering a signed agent and submitting a task.
From the monorepo in a second terminal:
cd ai-service-mesh/frontend
npm install
npm run devOpen http://localhost:5173 to inspect topology and activity. The browser task route is off by default. Submit tasks from the API with the bearer token. See deployment for Compose ports and dashboard write configuration.
| Variable | Description |
|---|---|
MESH_API_TOKEN |
Bearer token for POST /v1/tasks and private reads |
MESH_ADMIN_TOKEN |
Bearer token for registration and optional wallet binding |
MESH_CORS_ORIGINS |
Comma-separated browser origins, default http://localhost:5173 |
MESH_PUBLIC_READ |
Application default 1. Production Compose defaults to 0. |
MESH_ALLOW_UI_WRITES |
Browser task route, off by default. Enable only behind authenticated ingress. |
MESH_HUB_URL |
AIMarket Hub for discovery and routing. Empty disables Hub discovery. |
MESH_RATE_LIMIT |
Requests per minute per IP, default 120 |
AIFACTORY_CRYPTO_ENABLED |
Optional wallet binding, off by default |
See security and .env.example.
Task → Discovery → Preflight → Ledger hold → Invoke → Release or refund
Each phase emits events on /v1/activity for the dashboard and external observability.
cd ai-service-mesh/backend
pytest -q -m 'not integration'The integration tests expect a running Mesh API, a local agent with signed registration, and matching API/admin tokens. The Hub demo-rejection test also needs a Hub with demo-only matches.
Load tests (API must be running):
pip install locust
locust -f load/locustfile.py --host http://127.0.0.1:8090 --headless -u 20 -r 4 -t 30s| Product | Capability | Mesh role |
|---|---|---|
| aimarket-hub | Capability catalog and invocation API | Federated search and routed invocation |
| oracles | Verifiable math (randomness, VDF, consensus, reputation) | Invokable capabilities on the hub catalog |
| aimarket-widget | 1-Click Agent Embed | Embeddable consumer UI |
| aicom | AI-Factory orchestration | Separate stack |
| dioscuri | Twin community agents | MNEMOSYNE Q&A from synced GitHub docs |
- Live dashboard: service-mesh.modelmarket.dev
- Landing: alexar76.github.io/ai-service-mesh
- Local: see Quick start
The DIOSCURI twins answer questions from synced GitHub docs.
| Channel | Twin | Best for |
|---|---|---|
| Discord | Pollux | Help, ideas, show-and-tell |
| Telegram | Castor | Releases, digests, quick news |
Ecosystem map: Alien Monitor · AICOM
Apache-2.0.