hub Mekong Autonomous Swarms
v2.4.9
POST

/api/v1/swarm/dispatch

speed 120 req/min key Bearer Auth

Deterministic goal dispatch to autonomous multi-agent pipelines. Automatically parses the input prompt, decomposes into sub-agent AST tasks (CEO, CTO, TaxEngine), and provisions a sandboxed SQLite WAL context.

EXECUTION ISOLATION
Ring-3 WASM Sandbox
DEFAULT MCU CONSUMPTION
0.12 MCU / step
AUDIT VERIFIABILITY
SHA-256 Merkle Provenance

tune Request Parameters (Body)

Content-Type: application/json
Parameter Type Required Description
goal string Required Plaintext or structured natural-language task definition dispatched across the swarm.
recipe string Optional Recipe manifest identifier (e.g. saigon-dev/tt78-engine). Defaults to auto-detect.
max_mcu float Optional Compute unit circuit-breaker cap. Dispatches abort if quota exceeds threshold. Default: 2.50 MCU.
concurrency integer Optional Max parallel autonomous agent threads spawned in this DAG. Default: 4, Max: 32.
enclave_isolation boolean Optional Execute inside client-side RAM barrier without outbound network telemetry. Default: false.

code Implementation Snippets

Verified SDKs
# Dispatch an autonomous reconciler node via cURL
curl -X POST https://api.mekong.network/v1/swarm/dispatch \
  -H "Authorization: Bearer mkg_live_7x89q21f00b" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "Reconcile VAT Q1-2025 TT78 XML",
    "recipe": "saigon-dev/tt78-engine",
    "concurrency": 8,
    "max_mcu": 2.50,
    "enclave_isolation": true
  }'
$ mekong goal --recipe tt78-flow --concurrency 8 --enclave true
CLI

smart_toy Live Endpoint Sandbox & Merkle Simulator

Direct execution socket wired to active local node daemon

127.0.0.1:8000 (Connected 12ms)
visibility
JSON (Schema: SwarmDispatchV1)
Auto-sign with local BYOK key
200 OK (84ms)
Size: 428B
{
  "status": "SUCCESS",
  "task_id": "swm_941209_ast",
  "dispatched_agents": [
    "Agent:CEO",
    "Agent:TaxEngine",
    "Agent:CTO"
  ],
  "mcu_reserved": 0.12,
  "merkle_hash": "0x7f4e8b39c2e091fa58129bb35ca982d61a0b395c87910e52b21cf9a21",
  "sqlite_wal_synced": true,
  "timestamp": "2025-02-18T14:22:04.192Z"
}

report_problem Error Codes & Circuit Breakers

Status Code Error Reason Resolution Strategy
402 Payment Required MCU_QUOTA_EXHAUSTED Replenish MCU balance via VietQR instant deposit or increase max_mcu cap.
422 Unprocessable AST_SYNTAX_INVALID The declared recipe manifest could not resolve dependencies into a valid execution DAG.
429 Too Many Requests BURST_LIMIT_EXCEEDED Node rate limit reached (120 req/min). Apply exponential backoff with jitter.