Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

maml/asc

Repository files navigation

ASC — Agentic Services Coordinator

The coordination layer for AI agent services. Register agents, route work, enforce SLAs, settle payments.

asc.so | API: api.asc.so

What is ASC?

ASC is infrastructure for the agent services economy. Providers register AI agents with capabilities and pricing. Consumers discover agents and coordinate work through a unified API. ASC handles the hard parts: routing, retries, circuit breaking, quality gates, tracing, billing, and settlement.

Think Stripe for agent services — but instead of payment processing, it's work coordination.

Packages

Package npm Description
@asc-so/client npm TypeScript SDK — AscProvider and AscConsumer clients
@asc-so/mcp-server npm MCP server — 44 tools for Claude and other MCP clients

Architecture

┌─────────────┐ ┌─────────────┐
│ Consumers │ │ Providers │
│ (buy work) │ │ (sell agents)│
└──────┬───────┘ └──────┬───────┘
 │ │
 ▼ ▼
┌──────────────────────────────────┐
│ ASC Platform │
│ │
│ Registry ─── Coordination ────── Pipeline │
│ │ │ │ │
│ Auth ──── Observability ──── Billing │
│ │ │ │ │
│ Crypto ─── Settlement ──── Realtime (WS) │
└──────────────────────────────────┘
 │
 ▼
 PostgreSQL

Core modules:

  • Registry — Providers, consumers, agents CRUD with marketplace discovery
  • Coordination — Task routing with retries, circuit breaker, timeout management
  • Pipeline — Declarative multi-agent chaining (step 1 output → step 2 input)
  • Billing — Per-invocation/token/second/monthly pricing, usage tracking, invoicing
  • Observability — Distributed tracing, SLA rules, quality gates
  • Settlement — Multi-network payouts (Lightning via Phoenixd, Stripe Connect, noop for dev)
  • Auth — Dual auth: API keys (Bearer asc_...) or secp256k1 signatures
  • Crypto — secp256k1 keypairs, BIP-32 HD derivation, nonce-based replay protection
  • Realtime — WebSocket event broadcasting

Quick Start

Use the MCP server (no code)

# Add to Claude Code
claude mcp add asc -- npx @asc-so/mcp-server
# Then ask Claude:
# "Run asc_onboard with environment=sandbox and role=both"
# "Show me available agents"
# "Submit a task to agent_echo with input { text: 'hello' }"

Use the SDK

npm install @asc-so/client
import { registerConsumer, AscConsumer } from "@asc-so/client";
const { consumer, apiKey } = await registerConsumer("https://api.asc.so", {
 name: "My App",
 description: "Coordinates AI agents",
 contactEmail: "dev@myapp.com",
});
const client = new AscConsumer({ baseUrl: "https://api.asc.so", apiKey, consumerId: consumer.id });
const { task } = await client.submit({ agentId: "agent_echo", input: { text: "hello" } });
const result = await client.waitForCompletion(task.id);
console.log(result.output);

Run Locally

Prerequisites

  • Node.js 20+
  • PostgreSQL 16+ (port 5433, database asc, user asc)

Setup

git clone https://github.com/maml/asc.git
cd asc
npm install
cp .env.example .env # Edit DB credentials if needed
npm run dev # Starts on http://localhost:3100

Migrations run automatically on startup.

Run tests

npm test # All backend tests
npm run test:unit # Unit tests only
npm run test:repo # Repository tests (needs Postgres)
npm run test:api # API integration tests
npm run test:client # SDK unit tests
npm run test:mcp # MCP server tests

Run the demo

npm run dev # Start ASC backend
npm run agents # Start simulated agents (echo, slow, flaky)
npm run demo:docs # Run the 4-agent document processing pipeline

Self-Host with Docker

docker compose up

Starts PostgreSQL, the ASC backend, and the dashboard. Backend available at http://localhost:3100.

See docker-compose.yml for full configuration.

Deploy

ASC is designed for managed deployment:

  • BackendRender (see render.yaml)
  • DatabaseNeon (serverless Postgres)
  • FrontendVercel (Next.js dashboard at web/)

Set DATABASE_URL and optional settlement keys (PHOENIXD_PASSWORD, STRIPE_SECRET_KEY) as environment variables.

API Endpoints

Group Endpoints Description
Registry POST/GET/PATCH/DELETE /api/providers, /api/consumers, /api/agents Marketplace CRUD
Coordination POST /api/coordinations, GET /api/tasks/:id Task submission and tracking
Pipeline POST /api/pipelines, POST /api/pipelines/:id/execute Multi-agent workflows
Billing GET /api/billing-events, /api/billing/usage, /api/billing/mtd Usage and invoicing
Observability GET /api/traces, POST /api/sla-rules, POST /api/quality-gates Monitoring
Settlement PUT /api/providers/:id/settlement-config, GET /api/settlements Payouts
Crypto POST/GET/DELETE /api/keys Key management
Realtime WS /ws/events Live event stream
Health GET /health, GET /api/system/status Service health

npm Scripts

Script Description
npm run dev Start backend with hot reload
npm start Start compiled backend
npm test Run all backend tests
npm run test:unit Unit tests only
npm run test:repo Repository tests
npm run test:api API integration tests
npm run test:client SDK unit tests
npm run test:mcp MCP server tests
npm run build:client Build SDK
npm run build:mcp Build MCP server
npm run agents Start simulated agents
npm run demo:docs Run document processing demo
npm run seed:sandbox Seed sandbox with demo data

License

FSL-1.1-MIT — Functional Source License. You can use, modify, and self-host ASC freely. The only restriction: you can't offer ASC as a competing hosted service. Converts to MIT on 2028年03月04日.

About

The infrastructure layer for the agent services economy

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /