The canonical workflow
Open a traced session with session_context
The first call is always If you pass an existing research-run UUID as
session_context. It attaches the user’s prompt and an optional title to the MCP trace, opens (or reuses) a persistent research run, and emits a session_open event. Every subsequent tool call in the session is grouped under the same run_id so the web UI lists and replays it as one session.session_id, future calls attach to that run instead of creating a new one. This lets the web UI start a session and the agent join it.Research with data tools
The agent calls data-layer tools to gather evidence. Each call is traced with a
tool_call + tool_result event pair and returns a provenance envelope (source, freshness, as_of, coverage). Typical research calls:market_get_ohlcv(symbol, range, interval)— price historymarket_screener(sector, limit)— peer screenfundamentals_get(symbol)— metric cardsinsider_activity(symbol)— SEC Form 4/5 transactionscongress_trades(ticker)— STOCK Act disclosuresanalyst_ratings(symbol)— Wall Street consensustechnical_indicators(symbol)— RSI, MACD, Bollinger, ATRvol_realized(symbol)— annualized realized volatility
search_skills(query) for progressive discovery rather than loading all 60+ tools into context at once.Propose a strategy with propose_strategy
Once the agent has a thesis, it assembles a declarative Returns
StrategySpec and calls propose_strategy. The spec is validated against a closed schema — any free-form or unknown field is rejected. The server stamps id, version, and tenant_id; the agent’s values for those are ignored. The strategy is registered as a draft — nothing deploys.{strategy_id, status: "draft", spec}. The strategy_proposed event is traced.Run the backtest with backtest_run
The agent calls For durable, queued backtests (hosted MCP), use
backtest_run with the validated spec and a backtest range. The backtest engine runs trusted, audited numpy code over point-in-time price history — no agent-authored code ever executes. The result includes stats (CAGR, Sharpe, max drawdown, win rate), the equity curve, trade log, and a risk-gate decision.run_skill("backtest.run", {spec, range}) instead — it creates a durable run, enqueues a worker job, and returns a run_id immediately.Subscribe to run progress with subscribe_run
For durable runs, the agent polls
subscribe_run(run_id, cursor) to follow progress. Each call returns trace events after the supplied cursor. The agent repeats this until the run reaches a terminal state (succeeded, failed, cancelled).Report findings to the human
The agent synthesizes the research and backtest results into a report for the human. This is pure narrative — the agent writes its summary to the chat. The human then decides whether to promote the strategy to paper trading from the web UI.
The agent cannot promote a strategy to paper trading. That is a human-only action, enforced at the code level. The agent can only propose and backtest.
Server instructions
When the agent connects to the Ithaca MCP server, it receives these instructions as part of the server’sinstructions field in the initialize response. The agent is expected to follow them:
Example: NVDA research session
Here is a full NVDA research session showing the agent’s tool calls and expected outputs.1. Open the session
session_open event is traced. The web UI now shows a new research session.
2. Pull price history
3. Screen peers
4. Check fundamentals
5. Check insider activity
6. Check congress trades
7. Propose the strategy
8. Run the backtest
9. Subscribe to progress (durable runs)
10. Report to the human
The agent synthesizes a narrative report. Example:NVDA Momentum Research — Summary Thesis: NVDA shows strong 60-day momentum (1Y return +45%, well above sector median +12%). Revenue growth YoY of +208% and gross margin of 75% support the momentum fundamentally. Evidence:Strategy: 60-day rank-momentum, monthly rebalance, long-only, 100% gross, 5 bps cost. Backtest (1Y): CAGR 38%, Sharpe 1.42, max drawdown -18%, win rate 58%, 12 trades. Risk gate passed. Recommendation: The momentum thesis is supported by fundamentals. Insider selling is a watch item. The backtest is strong but the drawdown is meaningful. I recommend promoting to paper trading to test live behavior — you can do this from the Ithaca web UI.
- Price: NVDA returned +45% over the past year vs. Technology sector median +12%.
- Fundamentals: P/E of 68 is rich, but revenue growth (208%) and margin (75%) are best-in-class.
- Insiders: Net selling over the past 90 days (-480k shares). This is a caution flag but consistent with planned 10b5-1 sales.
- Congress: One notable Pelosi buy 30 days before the last earnings beat.
The run state machine
The control plane owns the run lifecycle. The agent can create and observe runs but cannot drive money-path transitions.| Transition | Who | How |
|---|---|---|
draft → queued | Agent or human | run_skill / POST /api/runs |
queued → running | Worker | automatic (job claimed) |
running → succeeded/failed/timeout | Worker | automatic (job completes) |
→ cancelled | Agent or human | cancel_run / POST /api/runs/{id}/cancel |
→ promoted | Human only | web UI button → POST /api/runs/{id}/promote |
promoted → live | Human only | web UI → activate |
live ⇄ paused | Human only | web UI → pause / resume |
→ retired | Human only | web UI → retire |
Related
MCP Connection
Transport options, the initialize handshake, and tool discovery.
Starter Prompt
The starter_research prompt template and ready-to-paste example prompts.
MCP Tools
Browse the full 60+ tool catalog.
StrategySpec
The declarative strategy schema and how backtests work.