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

# How Itoflow works

> Itoflow's five layers: your request or mandate, an agent harness that plans, codes and checks research, a quant engine, an independent factor risk model, and a person who approves every live trade. What each layer does, why it is there, and how your own code, tools and models plug in.

Itoflow has five layers. Each does one job and hands the next a record it can check: the plan, the code, the figures, the decision and the approval.

```mermaid theme={null}
flowchart LR
  Intent[Your request or mandate] --> Harness[Agent harness]
  Harness --> Engine[Quant engine]
  Engine --> Risk[Factor risk model and risk engine]
  Risk --> Record[Decision record]
  Record --> Approval[A person approves live trades]
  Approval --> Broker[Paper book or broker]
```

| Layer | What it does | Read more |
| - | - | - |
| Your request or mandate | A question in chat, a mandate for a strategy, or a list of holdings or a fund for a monitor. Each edit to a mandate makes a new version, and every report names the version it ran under. | [Strategies](https://docs.itoflow.ai/features/strategies.md), [Monitors](https://docs.itoflow.ai/features/monitors.md) |
| Agent harness | A research agent writes Python and runs it in an isolated sandbox. A research contract fixes the question, data, dates and evidence before work starts. A second agent reviews the plan and the answer. Monitors run on a schedule, and strategies also wake on conditions they set, so the work goes on without a person present. | [The agent harness](https://docs.itoflow.ai/platform/agent-harness.md) |
| Quant engine | Point-in-time market data, signal tests, walk-forward and out-of-sample backtests with overfitting checks, and portfolio construction with costs and turnover. Agents and Itoflow's own scheduled jobs call the same library. | [Quant engine and risk model](https://docs.itoflow.ai/platform/quant-engine.md) |
| Factor risk model and risk engine | A model of stocks and ETFs, built daily and published apart from the agents that read it. The engine computes the risk figures a report starts from; the agent picks what matters, explains it, and may take the analysis further. | [Factor risk model](https://docs.itoflow.ai/platform/quant-engine.md#factor-risk-model) |
| Approval and execution | Each decision keeps its weights, reasoning and confidence. Paper portfolios can trade automatically. Live portfolios wait until a person approves the exact list of trades. Paper trades wait for their market to open, and an accepted order is never reported as filled. | [Design principles](https://docs.itoflow.ai/guides/design-principles.md), [Approve trades](https://docs.itoflow.ai/features/portfolios.md#approve-trades) |

## Why a chat loop is not enough

Coding agents run a task until it's done. Investing differs in four ways, and each one shaped a layer above.

* **Time matters.** Every fact has a date. A backtest that reads data from after its own date gives results you can't trust, so the engine reads data as it stood at the time, the risk model is stored as dated snapshots, and a response says when an input, such as sector labels, reflects today instead.
* **A portfolio is never done.** Prices move, news arrives and holdings drift. Monitors run again on a schedule, and strategies wake on a date or a market event they chose, rather than stop when one answer is written.
* **A portfolio keeps no reasons.** Holdings don't say why they are there. Itoflow stores each decision with its weights, reasoning and confidence, and each chat with its code and files.
* **Mistakes cost money.** Exact rules sit in code the agent can't change: the research contract, the overfitting checks, position limits, cash checks and human approval of live trades. Judgement goes to a second agent that reads the work.

[Why agentic investing is hard](https://itoflow.ai/blog/why-agentic-investing-is-hard) sets out the problem in more depth.

## One engine, three ways in

The app, your AI assistant and your own code all reach the same agents, engine and data, and see the same portfolios, monitors and strategies.

* **Your AI assistant.** Claude, ChatGPT, Codex, Gemini, GitHub Copilot and Cursor connect to the Itoflow MCP server. It has three tools: search, execute and list workspaces. Your assistant finds what it needs with search and acts by writing a short script, rather than loading every tool definition up front. It signs in with OAuth and never sees a token. [Connect your assistant](https://docs.itoflow.ai/mcp/install.md).
* **The Itoflow app.** Research, monitors and strategies in your browser at [app.itoflow.ai](https://app.itoflow.ai).
* **Your code.** An HTTP API for portfolios, strategies, monitors, market data and factor risk. [Make your first request](https://docs.itoflow.ai/quickstart/http.md).

## Your code, your data, your models

Itoflow works with what you already have.

* **Your GitHub repositories.** Agents can check out your research code, run it, change it and open a draft pull request. The GitHub app asks only for code, pull requests and CI results, branch protection still applies, and text from a repository counts as untrusted input. [Connect GitHub](https://docs.itoflow.ai/features/integrations.md#github).
* **Your own MCP servers.** Add any remote MCP server by its URL, and agents can call its tools in research, such as a broker's server that reads your positions. Tokens are stored encrypted, sent only to that server, and never reach the model or the sandbox. [Connect an MCP server](https://docs.itoflow.ai/features/integrations.md#remote-mcp-servers).
* **Files on your machine.** With the worker skill, Itoflow plans an analysis and your local Codex or Claude Code session runs each step on your machine. Itoflow sees the results, not your files or credentials. [Work with your local agent](https://docs.itoflow.ai/mcp/usage.md#work-with-your-local-agent).
* **Your own ChatGPT subscription.** Chat and monitors can run on it. A run gets only a short-lived access token. [Connect your ChatGPT subscription](https://docs.itoflow.ai/features/chat.md#connect-your-own-chatgpt-subscription).

[How we connected customers' MCP servers and GitHub repos to our research agent](https://itoflow.ai/blog/how-we-connected-mcp-servers-and-github) explains the design: why a URL is enough, how dozens of tools stay out of the model's context, and why a write with an unknown outcome is never sent twice.

Your code, data and research stay yours. Itoflow sells no signals and imposes no investment view.

## Next

> [card] [The agent harness](https://docs.itoflow.ai/platform/agent-harness.md)
>
> The research agent, the research contract, independent review, and agents that run 24/7.

> [card] [Quant engine and risk model](https://docs.itoflow.ai/platform/quant-engine.md)
>
> Data, backtests, portfolio construction and the factor risk model, with the evidence behind it.

> [card] [Design principles](https://docs.itoflow.ai/guides/design-principles.md)
>
> The rules behind approvals, access, point-in-time data, retries and security.

> [card] [Use cases](https://docs.itoflow.ai/use-cases/overview.md)
>
> Jobs you can start today, with prompts to paste into your assistant.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.