---
title: "Stream the analysis agent on a live question"
method: POST
path: "/agent/analyze/stream"
tags: ["Agents"]
---

# Stream the analysis agent on a live question

`POST /agent/analyze/stream`

## Request

- Base URL: `https://foresea.ink` (the document declares no server; this is the origin it was published from)
- URL: `https://foresea.ink/agent/analyze/stream`
- Auth: none declared

Stream the agent's LLM forecast thesis while preserving the final report shape.

The fixed pipeline streams the underlying forecast generation as `delta` events,
then emits the same structured `AgentReport` as `/agent/analyze` in `done`.
Tool-loop mode remains available through the blocking endpoint because its model
turns are interleaved with tool calls rather than one continuous answer.

## Request body

- AgentAnalyzeRequest: Ask the analysis agent to work a live question end-to-end.
  - `question` string, nullable: Market question. Optional if a market identifier is given.
  - `platform` string, nullable: 'polymarket' or 'kalshi' to fetch a live price.
  - `market_platform` string, nullable: Prediction-market venue supplied by the forecasting UI.
  - `market_ident` string, nullable: Polymarket slug or Kalshi ticker supplied by the forecasting UI.
  - `market_url` string, nullable
  - `slug` string, nullable: Polymarket market slug.
  - `market_id` string, nullable: Polymarket numeric market id.
  - `ticker` string, nullable: Kalshi market ticker.
  - `description` string
  - `resolution_criteria` string
  - `categories` string[]
  - `news_articles` NewsArticle[]
    - `title` string, nullable: Article headline.
    - `summary` string, nullable: Short human-written summary.
    - `summary_llm` string, nullable: LLM-generated summary.
    - `text` string, nullable: Full article body text.
    - `source` string, nullable: Publisher name (e.g. Reuters).
    - `credibility` object, nullable: Credibility score breakdown.
    - `frs` object, nullable: Future-Resolution Statement metadata.
    - `url` string, nullable: Canonical article URL.
    - `authors` unknown
    - `publish_date` string, nullable: ISO 8601 publish timestamp.
    - `keywords` unknown
    - `relevance_score` number, nullable: Cosine similarity to the question (0–1).
    - `search_query` string, nullable: Query used to retrieve this article.
  - `market_probability` number, nullable: Override market price (0..1 or 0..100) when not fetching.
  - `market_bid` number, nullable
  - `market_ask` number, nullable
  - `market_volume` number, nullable
  - `market_liquidity` number, nullable
  - `resolve_time` string, nullable
  - `variant` string
  - `evidence_top_k` integer
  - `skills` AgentSkill[]: Up to 5 custom skills to run.
    - `name` string, required: Short skill name, e.g. 'Base rate check'.
    - `instruction` string, required: What this skill should analyse.
  - `builtin_skills` boolean: Also run the built-in forecasting toolkit (base rate, scenario decomposition, red team, key drivers).
  - `ground_in_record` boolean: Condition the forecast on the model's own live track-record calibration.
  - `tool_loop` boolean: Use a ReAct tool-using loop (model plans + calls tools) instead of the fixed pipeline.
  - `benchmark_tools` boolean: When tool_loop=true, expose Foresea's market-research toolkit. place_trade and manage_notes are reserved for Foresea's scheduled trading agents and are not available over the API.
  - `benchmark_tool_names` string[], nullable: When benchmark_tools=true, restrict the exposed tool set to named Foresea tools -- e.g. a research-only call passes ['web_search', 'orderbook'], a pure-reasoning call passes [] (no tools, so the model must answer on its first turn). Unset exposes every tool available to the caller. Naming place_trade or manage_notes over the API is refused with 403.
  - `max_tool_steps` integer: Max tool calls in the loop.
  - `effort_tier` 'simple' | 'standard' | 'deep', nullable: How much analysis effort this question gets (evidence fetch depth, which built-in skills run, tool-loop step budget). Set explicitly to override; left unset, the server estimates it from the question.
  - `history` object[]: Prior conversation turns for follow-up context.
  - `conversation_steer` string: Optional per-conversation steering instruction.
  - `openrouter_api_key` string, nullable
  - `openrouter_model` string, nullable
  - `model` string, nullable
  - `provider_base_url` string, nullable
  - `ollama_base_url` string, nullable
  - `agent_profile_id` string, nullable: Private copied-agent recipe. Its research model and instructions are server-resolved.
  - `client_run_key` string, nullable: Caller-supplied idempotency key, stored on the durable AgentRun this request creates. If your own request times out waiting for a response, the run may still be progressing server-side -- look it up with GET /agent/runs?client_run_key=... instead of restarting.
  - `max_tokens` integer, nullable: Max output tokens for the agent tool loop and skills.

## Response `200`

Server-sent events with forecast deltas and a final AgentReport payload.

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/foresea/apis/foresea-intelligence-api.md) · [All operations](https://skmtc.dev/foresea/apis/foresea-intelligence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/foresea/apis/foresea-intelligence-api/revisions/b03e49f4385d?raw)
