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

# RUN YOUR AGENT

> Run an agent that you trained on Oumi inside an agent harness, as the main model or as a subagent

An agent that you train on Oumi can run outside Oumi. You [deploy](https://docs.oumi.ai/guides/deployment/deploy-a-model.md) the fine-tuned model, and an [agent harness](https://docs.oumi.ai/reference/agent-harnesses.md) on your machine runs the agent loop and the tools. Your agent can run in the harness in two ways: as the main model of the session, or as a subagent that your usual model calls through one tool.

In both ways, you do not write a harness of your own. The harness supplies the terminal interface and the session history, and your small fine-tuned model does the tool calling at a fraction of the cost and latency of a frontier model.

***

## CHOOSE HOW YOUR AGENT RUNS

| | As the main model | As a subagent |
| - | - | - |
| How your agent starts | You select it as the session's model | Your usual model calls one tool, for example `ask_stock_agent` |
| What your fine-tuned model sees | The harness's requests, limited to your tools and system prompt | Only the requests that your subagent sends: your tools, your system prompt, and its own history |
| Who runs your agent's tool loop | The harness | Your subagent code, inside a harness extension |
| Use it when | The session does only the work that your agent was trained for | Your agent does one specialized job inside broader work, such as coding or research |

***

## HARNESSES

| Harness | As the main model | As a subagent |
| - | - | - |
| [pi](https://pi.dev) | [Guide](https://docs.oumi.ai/guides/agents/run-your-agent/pi/main-model.md) | [Guide](https://docs.oumi.ai/guides/agents/run-your-agent/pi/subagent.md) |
| [Hermes Agent](https://hermes-agent.nousresearch.com/docs/) | [Guide](https://docs.oumi.ai/guides/agents/run-your-agent/hermes/main-model.md) | [Guide](https://docs.oumi.ai/guides/agents/run-your-agent/hermes/subagent.md) |

***

## WHAT'S NEXT

> **[As the main model in pi](https://docs.oumi.ai/guides/agents/run-your-agent/pi/main-model.md)**
>
> Select your fine-tuned model in pi and give it only your tools.

> **[As a subagent in pi](https://docs.oumi.ai/guides/agents/run-your-agent/pi/subagent.md)**
>
> Keep your usual model in pi and give it your agent as a tool.

> **[As the main model in Hermes](https://docs.oumi.ai/guides/agents/run-your-agent/hermes/main-model.md)**
>
> Use your fine-tuned model as the model of a Hermes profile.

> **[As a subagent in Hermes](https://docs.oumi.ai/guides/agents/run-your-agent/hermes/subagent.md)**
>
> Keep your usual model in Hermes and give it your agent as a tool.


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