Persona System
The six AI agents — their roles, tools, and execution order.
Each persona is a specialised prompt + tool-call sequence implemented in src/server/personas/. All personas call askPersona(prompt) in src/lib/llm.ts which hits the MixRoute API (gpt-4o-mini).
Execution Order
Five personas run in parallel via Promise.allSettled. The Contrarian runs after all five complete — it receives their verdicts and stress-tests the highest-conviction peer.
Bull ──────┐
Bear ──────┤
Quant ─────┤──▶ Contrarian (sequential, last)
Macro ─────┤
Narrative ─┘If any of the five parallel personas fail, the entire debate fails (no partial results).
Persona Reference
| Persona | Key | Role | Primary MCP Tools |
|---|---|---|---|
| Bull | bull | Upside case — price appreciation, catalysts | scanMarket, analyzeToken |
| Bear | bear | Risk case — headwinds, overvaluation | analyzeToken, monitorSentimentShift |
| Quant | quant | Technical structure, on-chain, positioning | deepAnalysis, analyzeToken |
| Macro-Regime | macro_regime | Macro environment, risk-on/off | marketOverview, monitorSentimentShift |
| Narrative | narrative | Signal vs. hype, news sentiment | webSearch, analyzeToken |
| Contrarian | contrarian | Stress-tests the consensus leader | Peer verdicts + selective re-analysis |
Verdict Shape
Every persona returns a Verdict with these fields:
| Field | Type | Description |
|---|---|---|
persona | string | Persona key (e.g. quant) |
token | string | Token symbol |
stance | long | short | neutral | Directional view |
conviction | number | 0–100, how strongly the agent holds the view |
market_regime_context | string? | The macro regime at analysis time |
position_direction | string | long, short, or none |
position_size_pct | number | Suggested size as a % of portfolio |
entry_ref | number | Reference entry price |
invalidation | number | Level at which the thesis is wrong |
target | number? | Target price (optional) |
reasoning_trail | string | JSON array of tool-call steps with findings and weights |
summary | string | Plain-language verdict summary |
MCP Tools
The personas access market data through src/server/mcp/tools.ts — a wrapper around the Ryo MCP API:
| Tool | Description |
|---|---|
marketOverview() | High-level market snapshot |
scanMarket(theme?, chain?, topN?) | Token scan by theme or chain |
analyzeToken(symbol) | Fundamental + technical analysis for a token |
deepAnalysis(symbol, includePerp?) | Extended analysis including perpetuals market data |
compareTokens(symbolA, symbolB) | Side-by-side token comparison |
monitorSentimentShift(timeWindow?) | Recent sentiment trend |
webSearch(symbol) | Tavily API — recent news and sentiment (5 results, last 30 days) |
A 1 req/s rate limiter (p-queue) is applied across all MCP tool calls per server instance.