A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Multi-agent MCP orchestrator for Solana DeFi - routes tasks to specialized Claude agents, synthesizes results, acts au
A multi-agent MCP orchestrator for Solana DeFi. Send a task — Synapse routes it to the right combination of specialized Claude agents, runs them in sequence, and returns a synthesized action plan.
Live orchestration board for Synapse: incoming task queue, selected task detail, active route through router, DeFi, market, and executor agents, ranked action plan, context accumulation, token timing, guardrails, and system status.
How Synapse routing works: classify the task, choose only the needed specialists, collect tool-backed outputs, merge context, enforce confidence gates, and return one ranked action plan instead of disconnected agent replies.
Most DeFi analysis requires at least two distinct skill sets: reading raw on-chain state (pool TVL, bin arrays, prices) and interpreting what that state means in market context (trend, funding sentiment, cross-exchange divergence). These are different jobs that benefit from different prompts, different tools, and different reasoning styles.
Synapse splits them:
A Claude-powered router decides which agents a given task actually needs — no hardcoded rules, no over-dispatching.
The router is itself a Claude call. Given your task, it selects the minimum set of agents needed:
"Get current SOL/USDC pool state"
→ defi-agent only
"Is the market trending bullish?"
→ market-agent only
"Analyze top pools and recommend actions"
→ defi-agent → market-agent → executor
This avoids burning tokens on agents that aren't relevant to the task.
A live status dashboard runs at http://localhost:3000 while the orchestrator is active. It shows the last cycle's agent invocations, tool call counts, timings, and executor output. Auto-refreshes every 10 seconds.
git clone https://github.com/DeltaLogicLabs/synapse
cd synapse
bun install
cp .env.example .env # add your API keys
bun run dev
Dashboard: http://localhost:3000
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY | — | Required |
HELIUS_API_KEY | — | Required |
SOLANA_RPC_URL | — | Helius mainnet RPC |
CYCLE_INTERVAL_MS | 600000 | How often to run (default 10 min) |
MAX_AGENT_TOKENS | 8192 | Max tokens per agent |
CONFIDENCE_THRESHOLD | 0.65 | Minimum router confidence |
DASHBOARD_ENABLED | true | Enable HTTP dashboard |
DASHBOARD_PORT | 3000 | Dashboard port |
agents/your-agent.ts extending BaseAgentdefinition, getTools(), executeTool()agents/base.ts → AGENT_REGISTRY and createAgent()core/router.tsThe router will automatically start considering your new agent for task dispatch.
tool_choice: "any"The router uses tool_choice: { type: "any" } on its Claude call, which forces the model to call dispatch_agents rather than returning a plain text response. Without this, ambiguous tasks ("what's happening in DeFi today?") may elicit a prose answer instead of a routing decision, causing the fallback to over-dispatch all three agents and waste tokens.
tool_choice: { type: "any" }
// router MUST call dispatch_agents — no text-only escape hatch
Each agent in the sequence receives the prior agents' outputs as context, not just the original prompt. The executor's input is:
sharedContext ← ContextStore.toPromptContext()
+ defi-agent output ← raw on-chain numbers
+ market-agent output ← trend/funding interpretation
+ original task prompt
This lets the executor synthesize without needing its own tool calls to fetch on-chain state — it only needs rank_actions to emit its verdict.
ContextStore.toPromptContext() truncates at 4,000 characters. In long-running sessions, recentDecisions accumulates 50 entries — even at 100 chars each that's 5,000 chars of prior decisions injected into every agent's input. The guard prevents token bleed from old decisions crowding out the actual task.
Token usage is accumulated across all turns in each agent's multi-turn loop and returned in AgentResult.tokenUsage. The orchestrator sums this at cycle end:
const cycleInputTokens = cycle.results.reduce((sum, r) => sum + (r.tokenUsage?.inputTokens ?? 0), 0);
This lets operators track actual API spend per cycle without external billing aggregation.
AGENT_TIMEOUT_MS (default 60s) bounds each agent's execution. The check runs at the top of the while (true) agent loop — before each API call — so a hung previous turn doesn't trap the orchestrator waiting for a response that will arrive after the cycle window closes.
If the router's own confidence field falls below CONFIDENCE_THRESHOLD, the executor is dropped from the dispatch list. This prevents action plans from being generated when the task scope is ambiguous — the executor's rank_actions output is only reliable when defi-agent and market-agent have been given a well-scoped task.
stop_reason === "tool_use" loops per agenttool_choice: "any" — forced dispatch decisionMIT
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live
npx CLI installing 100+ agents, commands, hooks, and integrations in one command
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
Pocket Flow: Codebase to Tutorial