Stellar Agent Mesh

March 31, 2026 · View on GitHub

Autonomous testing harness for Stellar Agent Mesh. Runs 4 AI agents transacting real Stellar testnet payments across 16 economic scenarios.

This is an independent test client — it communicates with the gateway exclusively via HTTP. Zero cross-imports, separate package. Any agent framework could replace it.

Agents

AgentPortServicesPersonality
Atlas4001Web search, News aggregationConcise data analyst
Sage4002Code review, Bug analysisSenior engineer
Pixel4003Image description, Style transferCreative encyclopedist
Quant4004Market data, Risk scoringQuantitative analyst

Each agent runs real service endpoints powered by Nemotron 120B (free on OpenRouter). When another agent pays for a service, the LLM generates a real response.

16 Transaction Patterns

#PatternFrequencyTests
1Normal paymentEvery 5 minStandard x402 buy with ±10% price jitter
2$10K rejectionEvery 12hSpending policy enforcement (must reject)
3Path paymentEvery 8hCross-asset routing via Stellar DEX
4Chain (A→B→C)Every 6hMulti-hop sequential payment
5Concurrent burstEvery 4h3 simultaneous purchases
6MPP sessionEvery 3hFull MPP lifecycle (session→pay→verify→receipt)
7Federation paymentEvery 4hPay using name*mesh.agent address
8MisbehaviorEvery 8hBad data → reputation penalty → recovery arc
9Empty walletDaily 3AMUnfunded agent → graceful failure
10Multi-assetEvery 6h3 buyers at micro/small/medium amounts
11Self-paymentEvery 10hAgent tries to buy own service (edge case)
12Wrong addressEvery 12hPayment to stranger + federation miss
13🔥 Stress testDaily 2AM50 transactions in 60 seconds
14🛡️ Malformed proofEvery 8hFake tx hash → must reject
15💀 Wallet drainDaily 4AMDrain mid-chain → graceful partial failure
16📊 Rep pricingEvery 6hCompare fresh vs established agent pricing

Setup

# 1. Start the gateway first (separate repo)
# See: https://github.com/ghost-clio/stellar-agent-mesh

# 2. Install harness
npm install

# 3. Configure
cp .env.example .env
# Add your OpenRouter API key (free tier)

# 4. Run continuous harness
npx tsc && node dist/index.js

# Or run a single test cycle
npx tsc && node dist/run-once.js

Persistent Logging

Every transaction is appended to transactions.jsonl (JSONL format, survives restarts):

{"ts":"2026-03-31T21:10:00Z","buyer":"Quant","seller":"Atlas","service":"atlas-news","amount":1.33,"success":true,"latencyMs":29974,"txHash":"9b7cc4ce...","type":"payment","protocol":"x402"}

Watchdog

Keep the harness alive across sleep/wake cycles:

nohup bash watchdog.sh &

Checks every 60 seconds, auto-restarts gateway and harness if either dies.

License

Apache-2.0