RYO ARENA DOCS
Developer Reference

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

PersonaKeyRolePrimary MCP Tools
BullbullUpside case — price appreciation, catalystsscanMarket, analyzeToken
BearbearRisk case — headwinds, overvaluationanalyzeToken, monitorSentimentShift
QuantquantTechnical structure, on-chain, positioningdeepAnalysis, analyzeToken
Macro-Regimemacro_regimeMacro environment, risk-on/offmarketOverview, monitorSentimentShift
NarrativenarrativeSignal vs. hype, news sentimentwebSearch, analyzeToken
ContrariancontrarianStress-tests the consensus leaderPeer verdicts + selective re-analysis

Verdict Shape

Every persona returns a Verdict with these fields:

FieldTypeDescription
personastringPersona key (e.g. quant)
tokenstringToken symbol
stancelong | short | neutralDirectional view
convictionnumber0–100, how strongly the agent holds the view
market_regime_contextstring?The macro regime at analysis time
position_directionstringlong, short, or none
position_size_pctnumberSuggested size as a % of portfolio
entry_refnumberReference entry price
invalidationnumberLevel at which the thesis is wrong
targetnumber?Target price (optional)
reasoning_trailstringJSON array of tool-call steps with findings and weights
summarystringPlain-language verdict summary

MCP Tools

The personas access market data through src/server/mcp/tools.ts — a wrapper around the Ryo MCP API:

ToolDescription
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.

On this page