> ## Documentation Index
> Fetch the complete documentation index at: https://platform.kimi.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Design a Financial Investment Analysis Agent

> Explore the multi-agent architecture, routing rules, and research plugin configuration of the official Financial Investment Analysis Assistant, and learn how to build your own investment research agent.

Completing a standard company research memo typically takes a human analyst 1–3 business days. With the official Financial Investment Analysis Assistant, a single task is estimated to take roughly ten to several dozen minutes to complete data retrieval, analysis, modeling, and review.

The agent is for research and analysis only and does not execute trades; its conclusions still require human review. The times above are estimates and depend on research depth and data volume.

| Path | Who it's for | How to use it |
| - | - | - |
| Use the official agent | You want to run investment research tasks out of the box | Select **Financial Investment Analysis Assistant** (marked as official) in the Console, or reference its agent ID via the API |
| Build your own from this guide | You need to customize market coverage, data sources, or output formats | Follow the design breakdown below to create your own agent |

> [!TIP]
>
> Open the Financial Investment Analysis Assistant's detail page in the Console to copy its agent ID, or call `GET /v1/agents` and find **Financial Investment Analysis Assistant** in the list. Official agents are read-only; see [Agents](https://platform.kimi.ai/docs/hosted-agents/agents.md) for details.

## Scenarios and goals

A typical secondary-market investment research task is to produce review-ready analysis on a company, an industry, or a strategy question, with traceable data and clearly stated boundaries on the conclusions. The official Financial Investment Analysis Assistant covers company research, valuation modeling, macro strategy, quantitative backtesting, and portfolio risk control across A-shares, Hong Kong stocks, and US stocks. Its design focuses on three goals:

* **Structured research workflow**: Break down the task by market, target, research depth, and output format first, then delegate to the appropriate specialized role rather than having a single agent generate the entire answer directly;
* **Traceable data**: Retrieve all data through data source routing, and label every output with its data source and retrieval date; list anything unavailable or unverifiable under "To be verified" with a reason—never fabricate data;
* **Clear analytical boundaries**: Perform research and analysis only, without executing any trades; separate facts, inferences, and uncertain information in the conclusions, and keep a human review step.

## Design approach

The official Financial Investment Analysis Assistant combines a model, a system prompt, multi-agent delegation, and an investment research plugin, using the platform's default built-in toolset. The sections below explain each configuration choice, its purpose, and the trade-offs when building your own.

### Multi-agent architecture: 1 routing coordinator + 13 specialized subagents

Unlike the single-agent PPT Assistant, the Financial Investment Analysis Assistant is a multi-agent team:

* **Coordinator agent (routing)**: The team's single entry point; it does not perform analysis itself. It understands the task, decides who should handle it, assembles the shared context, and delegates the task to the right specialized role.

* **Execution layer: 6 specialized subagents**, each responsible for one type of work:

  | Role | Responsibilities |
  | - | - |
  | Research Analyst | Analyzes companies, industries, events, and narratives: research tearsheets, deep dives, earnings analysis, and industry frameworks |
  | Fundamental Modeler | Normalizes financial statements, forecasts earnings, builds valuation models (DCF, comparable companies, scenario analysis), and audits models |
  | Backtesting Engineer | Runs strategy backtests and event studies, checking costs, attribution, look-ahead bias, and survivorship bias |
  | Portfolio Risk Analyst | Analyzes portfolio exposures, concentration, liquidity, and drawdowns, and conducts stress tests |
  | Market Strategist | Covers top-down macro analysis, sectors, A-share thematic trends, and style rotation |
  | Capital Flow Analyst | Tracks northbound capital flows, top trading seats, margin trading and securities lending (A-shares), and institutional holdings changes such as 13F filings (US stocks) |

* **Review layer: 7 subagents**: 6 analytical perspectives—value, growth, contrarian, macro, quality, and momentum—examine the same evidence from different angles; a 7th subagent synthesizes the six results into a comparison checklist that flags where the six perspectives corroborate one another or conflict. These subagents provide analytical perspectives only: they do not draw final conclusions or issue instructions.

Delegation relationships are declared in the coordinator agent's `multiagent` field: references to the 13 subagents are pinned to exact versions at creation time, and at runtime the coordinator delegates tasks by role name through the `spawn_subagent` tool. See [Multi-Agent Orchestration](https://platform.kimi.ai/docs/hosted-agents/multiagent-orchestration.md) for the underlying mechanism.

### System prompt: two-stage routing, context envelope, and task boundaries

The coordinator agent's system prompt centers on routing rules, three of which apply to any multi-agent team:

1. **Two-stage routing**: When a request is ambiguous or mixes multiple intents, first use the `question-router` skill to classify the task (market, target, workflow, depth) and select exactly one lead skill; the lead skill then selects its supporting workflows. Routing produces metadata only (the selected role and rationale), not deliverables.
2. **Context envelope (`ContextEnvelope`)**: Every delegation carries the same context envelope, covering market, language, currency, accounting standards, data quality policy, output target, and whether human confirmation is required. Subagents receive these parameters with the task and do not need to ask the user again.
3. **Task boundaries**: Never execute trades; do not treat missing data as zero (unless an assumption is explicitly stated); disclose fallback data, stale data, survivorship bias, and restatement risks; present recommendations separately from facts, calculations, and assumptions; number sources, claims, and items with fixed prefixes so citations remain traceable across the entire delegation chain.

### Plugins: an end-to-end investment research workflow

The official agent attaches only the **Public Market Investing** plugin, which provides the complete secondary-market research workflow:

* **Workflow skills**: The plugin includes more than 70 specialized skills covering company research, macro strategy, earnings events, valuation, quantitative screening, and portfolio risk control (11 lead skills are listed in the public view). Selection rules live in the coordinator agent's system prompt (see "System prompt" above).
* **Data source integration**: The plugin's data source skills provide unified access to Wind, iFinD, Hundsun, Caixin Data, Xinhua Finance, D\&B Global Search, global financial databases, and international official organizations. The agent requests data by capability name (such as `market.price.eod` or `fundamental.estimates`) without handling vendor API differences directly.
* **Output and quality checks**: Output and quality-check skills cover research reports, presentations, and data dashboards, and an independent final-check skill reviews the finished deliverable.

When building your own agent, choose a workflow plugin for your target domain. When a data source requires authorization, store credentials in [Vaults](https://platform.kimi.ai/docs/hosted-agents/vaults.md) for runtime injection rather than writing them into the agent configuration. See [Plugins](https://platform.kimi.ai/docs/hosted-agents/plugins.md) for how to reference plugins and how versions are pinned.

### Model and tools

The official agent uses `kimi-k3.1-pro`: the coordinator handles routing decisions, subagents must process long documents, and outputs must meet strict structural requirements, placing high demands on long-context handling and instruction following. The platform's default built-in toolset (`agent_toolset_20261101`) provides file read/write, command execution, file search and content search, web search, and artifact delivery out of the box. External data capabilities are already covered by the plugin's data source routing, so an extra MCP server is usually unnecessary; to connect one, see [Configure MCP Servers](https://platform.kimi.ai/docs/hosted-agents/mcp.md).

## Starter template

A multi-agent team is an advanced configuration. The minimal setup for a custom investment research agent is **a single agent + an investment research plugin**. The plugin comes with a complete workflow skill system, so once attached, the agent can execute research tasks according to those workflows. Below is a minimal runnable configuration:

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/agents" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Investment Research Assistant",
    "model": {"id": "kimi-k3.1-pro"},
    "system": "You are a secondary-market investment research assistant.\n- Retrieve all data through data source routing, and label outputs with the data source and retrieval date.\n- List anything unavailable or unverifiable under \"To be verified\" with a reason; never fabricate data.\n- Perform research and analysis only; do not execute any trades.\n- Separate facts, inferences, and uncertain information.\n- Save deliverables to the output/ directory.",
    "plugins": [
      {"plugin_id": "<Public Market Investing plugin ID>"}
    ],
    "description": "Custom investment research assistant: single agent + investment research workflow plugin"
  }'
```

```bash CLI theme={null}
kha agents create --file - <<'JSON'
{
    "name": "My Investment Research Assistant",
    "model": {"id": "kimi-k3.1-pro"},
    "system": "You are a secondary-market investment research assistant.\n- Retrieve all data through data source routing, and label outputs with the data source and retrieval date.\n- List anything unavailable or unverifiable under \"To be verified\" with a reason; never fabricate data.\n- Perform research and analysis only; do not execute any trades.\n- Separate facts, inferences, and uncertain information.\n- Save deliverables to the output/ directory.",
    "plugins": [
      {"plugin_id": "<Public Market Investing plugin ID>"}
    ],
    "description": "Custom investment research assistant: single agent + investment research workflow plugin"
}
JSON
```

Once created, save the `id` from the response as `AGENT_ID`. Query plugin IDs with `GET /v1/plugins` and look for **Public Market Investing** by display name, or select it directly in the Console agent form. Adjust the following fields to fit your needs:

| Field | How often to adjust | Guidance |
| - | - | - |
| `system` | Frequently | Define market coverage, data conventions, output formats, and compliance requirements |
| `plugins` | Per domain | Swap in another workflow plugin from the same series, or add data plugins |
| `multiagent` | When scaling up | Once task volume grows, split into a routing coordinator plus specialized subagents (see "Going further" below) |
| `model` | Usually keep defaults | Already suited to long-document analysis and structured outputs |
| Toolset | Usually keep defaults | The default built-in toolset is sufficient |

## Resource preparation

* **Execution environment**: Use a general-purpose cloud sandbox by passing `{"type": "cloud"}` for `config` with all other settings at their defaults; investment research has no special dependencies or network requirements (see [Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md)).
* **Source materials (recommended)**: Upload financial reports, analyst research reports, and other materials via `POST /v1/files` to obtain a `file_id`, then mount them in `resources` when creating the session. Files appear as read-only copies under `/mnt/agents/upload/` in the sandbox, improving the accuracy and relevance of the analysis; see [Files](https://platform.kimi.ai/docs/hosted-agents/files.md).
* **Credentials (optional)**: If a data plugin requires authorization, configure credentials in Vaults first and add the vault to `resources` when creating the session (bindings take effect only at creation time) for automatic runtime injection; see [Vaults](https://platform.kimi.ai/docs/hosted-agents/vaults.md).

## Run an investment research task

[Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md) covers the full flow of selecting an agent, creating an environment and session, subscribing to the event stream, sending messages, and retrieving files. This section shows only the parts specific to investment research. Create a session (`AGENT_ID` is the ID of the official agent or your custom agent, and `ENVIRONMENT_ID` is the execution environment ID):

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/sessions" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "'"$AGENT_ID"'",
    "environment_id": "'"$ENVIRONMENT_ID"'",
    "title": "CATL Company Research"
  }'
```

```bash CLI theme={null}
kha sessions create --agent "$AGENT_ID" --environment "$ENVIRONMENT_ID" --title "CATL Company Research"
```

Save the session `id` from the response as `SESSION_ID`, subscribe to the event stream (see [Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md)), and submit the task:

```bash cURL theme={null}
curl -sS -X POST "https://api.moonshot.ai/v1/sessions/$SESSION_ID/events" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "type": "user.message",
        "data": {
          "content": [
            {"type": "text", "text": "Research CATL (300750.SZ, A-share) at standard depth: company fundamentals, industry position, and valuation. Output a company research memo with all data labeled by source and retrieval date, and save it to the output/ directory."}
          ]
        }
      }
    ]
  }'
```

```bash CLI theme={null}
kha sessions send "$SESSION_ID" "Research CATL (300750.SZ, A-share) at standard depth: company fundamentals, industry position, and valuation. Output a company research memo with all data labeled by source and retrieval date, and save it to the output/ directory."
```

Once the session returns to `idle`, retrieve the deliverable through the artifacts API first (for download steps, see "Run your first task" in [Quickstart](https://platform.kimi.ai/docs/hosted-agents/quickstart.md)):

```bash cURL theme={null}
curl -sS "https://api.moonshot.ai/v1/artifacts?session_id=$SESSION_ID" \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "kimi-api-version: 2026-09-01-beta"
```

```bash CLI theme={null}
kha artifacts list --session "$SESSION_ID"
```

If the artifact list is empty or you need intermediate files, browse the session filesystem instead (see [Files](https://platform.kimi.ai/docs/hosted-agents/files.md)).

## Monitoring runs

You can follow the team's work through the event stream. For a multi-agent team, watch these signals:

* **`spawn_subagent` in `agent.tool_use`**: Indicates the coordinator is delegating a task; inspect the selected role, task instructions, and context envelope. If the role choice is off, intervene and correct it at this stage.
* **`session.thread_status` and `agent.thread_message_received`**: Show child threads starting, completing, and reporting back for each specialized subagent. You can track each child thread's progress independently; see [Multi-Agent Orchestration](https://platform.kimi.ai/docs/hosted-agents/multiagent-orchestration.md).
* **`agent.tool_use` / `agent.tool_result`**: Show the data source and definitions used for each data retrieval call.
* **`session.status`**: `running` means the team is working; a return to `idle` means the turn is complete and artifacts are ready to download.
* **`session.error`**: Emitted when the task fails, with the error type and message.

> [!TIP]
>
> Deep investment research tasks take longer, so the event stream connection may drop. On reconnect, pass the `id:` of the last SSE frame received before the disconnect as the `cursor` to resume reading; see [Reconnect after a disconnect](https://platform.kimi.ai/docs/hosted-agents/event-stream.md#reconnect-after-a-disconnect).

## Write clear task prompts

The task prompt directly affects output quality. Follow these four principles.

### 1. Specify the market and target

The market (A-shares / Hong Kong / US) and target (company name or ticker) are the first details routing needs. Providing a ticker avoids ambiguity between companies with similar names.

> Example: "Research CATL (300750.SZ, A-share)" rather than "Take a look at Ningde for me."

### 2. Specify the research depth

The default lead skill is the company research tearsheet (`pm-company-tearsheet`); explicitly ask for "deep research" if you want an in-depth report (`pm-equity-deep-dive`).

* Tearsheet: "Create a company research tearsheet for CATL."
* Deep dive: "Run a deep dive on CATL with a full investment thesis and valuation."

### 3. Define data conventions

If the agent has an investment research plugin attached, specify data sources and conventions in the prompt without preparing the data yourself.

> Example: "Use Wind to pull the last four quarters of financial data. Label all data with its source and retrieval date, and list anything unverifiable under 'To be verified'."

### 4. Specify the output format

Dedicated output skills cover memos, deep-dive reports, presentations, and data dashboards; specify the format in the prompt. If omitted, the agent outputs a text analysis.

> Example: "Output a company research memo and save it to the output/ directory."

## Going further

* **Build a multi-agent team**: Validate the "single agent + investment research plugin" setup first, then split into a team modeled on the official architecture and configure delegation in the `multiagent` field; see [Multi-Agent Orchestration](https://platform.kimi.ai/docs/hosted-agents/multiagent-orchestration.md).
* **Scheduled research**: Use triggers to run tasks such as morning briefs, market monitoring, and periodic portfolio reviews on a schedule; see [Run Agents with Triggers](https://platform.kimi.ai/docs/hosted-agents/triggers.md).
* **Batch research**: Submit multiple targets in the same session and have the coordinator delegate them to different child threads in parallel, writing all outputs to that session's `output/` directory; for session-level isolation, create separate sessions and run them concurrently.
* **Embed in your own system**: Integrate the Kimi Hosted Agents API into your existing systems to create sessions, subscribe to the event stream, retrieve outputs, and feed them into your business dashboards, approval flows, or publishing pipelines.

## Next steps

> [card] [Configure a multi-agent research team](https://platform.kimi.ai/docs/hosted-agents/multiagent-orchestration.md)
>
> Delegation configuration, `spawn_subagent`, and thread events.

> [card] [Use investment research plugins](https://platform.kimi.ai/docs/hosted-agents/plugins.md)
>
> Plugin references, version pinning, and credential injection.

> [card] [Schedule recurring research](https://platform.kimi.ai/docs/hosted-agents/triggers.md)
>
> Run recurring investment research tasks automatically with triggers.
