# Run Locally (/agent-platform/run-local)



Today we're going to run an agent platform made of:

* AgentOS on FastAPI
* Postgres + pgvector

## Prerequisites [#prerequisites]

* [Docker Desktop](https://docs.docker.com/desktop/) installed and running
* An [OpenAI API key](https://platform.openai.com/api-keys) for models and embeddings

## Run your agent platform [#run-your-agent-platform]

<Steps>
  <Step title="Clone the template">
    ```bash
    git clone https://github.com/agno-agi/agentos-railway.git agent-platform
    cd agent-platform
    ```

    <Tip>
      To make this codebase yours, run `rm -rf .git` and push to your own git repo.
    </Tip>
  </Step>

  <Step title="Configure your environment">
    ```bash
    cp example.env .env
    ```

    Open `.env` and set `OPENAI_API_KEY`. Everything else has sensible defaults.
  </Step>

  <Step title="Start the platform">
    ```bash
    docker compose up -d --build
    ```

    This runs two containers: a FastAPI app on port 8000 and a Postgres database on port 5432. The first build takes a few minutes.
  </Step>

  <Step title="Verify it's running">
    Open [http://localhost:8000/docs](http://localhost:8000/docs).

    You'll see the OpenAPI spec: every agent action exposed as a REST endpoint.

    <Frame caption="AgentOS API">
      <ImageZoom src="/videos/first-agent-api.gif" alt="AgentOS API" width="800" height="524" />
    </Frame>
  </Step>
</Steps>

You now have an agent platform made of AgentOS on FastAPI and Postgres. The AgentOS server exposes 80+ endpoints for runs, sessions, memory, knowledge, and evals.

AgentOS also comes with a UI at [os.agno.com](https://os.agno.com).

## Connect the AgentOS UI [#connect-the-agentos-ui]

1. Open [os.agno.com](https://os.agno.com) and sign in.
2. Click **Connect OS**, enter `http://localhost:8000` as the URL, and name it **Local AgentOS**.
3. Click **Connect**.

The template registers three agents and a coordinating team:

| Component             | What it does                                                             |
| --------------------- | ------------------------------------------------------------------------ |
| **Platform Builder**  | Builds agents, teams, and workflows through Studio tools.                |
| **Platform Manager**  | Inspects runtime state, eval history, deployment checks, and schedules.  |
| **Platform Engineer** | Reads the repository to answer questions about source and configuration. |
| **Agno team**         | Coordinates the specialists and has web tools for current information.   |

Try these prompts:

> *"Build an agent that tracks AI news and writes a daily brief"* → **Platform Builder**.

> *"How healthy is the platform?"* → **Platform Manager**.

> *"Which agents are registered in this codebase?"* → **Platform Engineer**.

> *"What did Anthropic publish about agents recently?"* → **Agno team**.

Open **Sessions** and **Traces** in the sidebar. Every run is captured with full message history, tool calls, and timing. This is what powers the iteration loop on the next page.

## Summary [#summary]

We now have a locally running agent platform with:

* Our agent runtime (AgentOS) running on port 8000 with request isolation, session management, scheduling, and 80+ endpoints.
* A Postgres database for storing sessions, memory, knowledge, and traces.
* Eight coding-agent skills in `.agents/skills/`: setup, create, extend, improve, create evals, repair eval failures, review, and deploy.

<Tip>
  Hot-reload is on. Edits to Python files in the source (`agents/`, `app/`, `db/`, `evals/`, `workflows/`) are live in \~2s.
</Tip>

## Next [#next]

[Create an agent](/agent-platform/create-agent)
