# Pantheon developer docs

> Build a stateful agent with streaming and application tools.

## Pantheon today

Pantheon runs stateful agents behind a REST API. Your application owns its UI and business data.

Pantheon stores session events, streams live output, and pauses runs for application tools.

> **Base URL**
>
> `https://pantheon-todo.alethiconsulting.com/pantheon-api`

## Building blocks

| Object     | What you use it for                                             |
| ---------- | --------------------------------------------------------------- |
| Agent      | Set instructions, model, tool requirements, and sandbox policy. |
| Tool       | Describe an application tool with input and output schemas.     |
| Deployment | Publish one agent version with its tool definitions.            |
| Session    | Keep conversation state and a pinned deployment.                |
| Run        | Process one turn. A session allows one active run.              |
| Event      | Report durable state or ephemeral live output.                  |

## Start

[Create an API key](https://pantheon-todo.alethiconsulting.com/docs/get-a-key). Then set the two required variables.

```bash title="Terminal"
export PANTHEON_BASE_URL="https://pantheon-todo.alethiconsulting.com/pantheon-api"
export PANTHEON_API_KEY="PANTHEON_API_KEY"
```

Follow [Your first agent in 10 minutes](https://pantheon-todo.alethiconsulting.com/docs/quickstart).

## Using an AI coding agent

Give your agent the docs link: `https://pantheon-todo.alethiconsulting.com/docs/`.

Include [llms-full.txt](https://pantheon-todo.alethiconsulting.com/docs/llms-full.txt) for all page content. Use [llms.txt](https://pantheon-todo.alethiconsulting.com/docs/llms.txt) for the page index.

Install the [SDK](https://pantheon-todo.alethiconsulting.com/docs/chat-components#install). Copy a starter file from the [chat components page](https://pantheon-todo.alethiconsulting.com/docs/chat-components#react).

Follow [Build on Pantheon](https://pantheon-todo.alethiconsulting.com/docs/onboarding) to publish your agent and connect your application.

## Choose a guide

| Goal                                | Guide                                                                                  |
| ----------------------------------- | -------------------------------------------------------------------------------------- |
| Build the complete first flow       | [Quickstart](https://pantheon-todo.alethiconsulting.com/docs/quickstart)               |
| Create and revoke an API key        | [Get an API key](https://pantheon-todo.alethiconsulting.com/docs/get-a-key)            |
| Diagnose an agent with Bami         | [Bami](https://pantheon-todo.alethiconsulting.com/docs/bami)                           |
| Run Pantheon on your infrastructure | [Self-host](https://pantheon-todo.alethiconsulting.com/docs/self-host)                 |
| Add a ready-made chat surface       | [Chat components](https://pantheon-todo.alethiconsulting.com/docs/chat-components)     |
| Execute tools in your application   | [Application tools](https://pantheon-todo.alethiconsulting.com/docs/application-tools) |
| Manage state and concurrency        | [Sessions and runs](https://pantheon-todo.alethiconsulting.com/docs/sessions-and-runs) |
| Render and reconnect streams        | [Events](https://pantheon-todo.alethiconsulting.com/docs/events)                       |
| Recover from failures               | [Errors](https://pantheon-todo.alethiconsulting.com/docs/errors)                       |
| Check current limitations           | [Known issues](https://pantheon-todo.alethiconsulting.com/docs/known-issues)           |
| Inspect routes and schemas          | [API reference](https://pantheon-todo.alethiconsulting.com/docs/api-reference)         |

## Pitfalls

> **Warning**
>
> - **MCP tools do not run:** Use application tools. Stored MCP server settings are not dispatched by the runtime.
> - **A session rejects a second run:** Finish, resume, or cancel the active run before sending another.
> - **New contract examples are thin:** Use the [API reference](https://pantheon-todo.alethiconsulting.com/docs/api-reference) with the task guides.
