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

# Development

> Run the platform, web console, and docs locally.

<Info>
  **Prerequisites (recommended)**:

  * Docker + Docker Compose
  * Python 3.9+ for the SDK and gym packages
  * Python 3.14+ for the platform API
  * Node.js 24.x with pnpm for the web apps and docs
</Info>

This page is for contributors and self-hosters running Agent Sentinel locally.

## Platform API local dev

Agent Sentinel's platform lives in `apps/platform/` and runs with Docker Compose.

1. Create `apps/platform/.env` (minimum required keys):

```bash theme={null}
PROJECT_NAME="Agent Sentinel"
ENVIRONMENT="local"
FRONTEND_HOST="http://localhost:5173"
BACKEND_CORS_ORIGINS="http://localhost:5173"

SECRET_KEY="dev-secret-key-change-me"

POSTGRES_USER="postgres"
POSTGRES_PASSWORD="postgres"
POSTGRES_DB="agent_sentinel"
POSTGRES_PORT="5432"

FIRST_SUPERUSER="admin@example.com"
FIRST_SUPERUSER_PASSWORD="changeme-now"
```

2. Start the stack:

```bash theme={null}
cd apps/platform
docker compose up -d
```

* API: `http://localhost:8000`
* OpenAPI/Swagger UI: `http://localhost:8000/docs`

## Web console

The operator console lives in `apps/console-sentinel/`.

```bash theme={null}
cd apps/console-sentinel
pnpm install
pnpm dev
```

## Public web app

The public web app lives in `apps/web/`.

```bash theme={null}
cd apps/web
pnpm install
pnpm dev
```

## Docs (Mintlify)

<Steps>
  <Step title="Install the Mintlify CLI">
    ```bash theme={null}
    npm i -g mint
    ```
  </Step>

  <Step title="Preview locally">
    Navigate to `docs/` and start the preview server:

    ```bash theme={null}
    cd docs
    mint dev
    ```

    A local preview of your documentation will be available at `http://localhost:3000`.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="API returns 422 / auth errors">
    * Ensure `apps/platform/.env` is set (especially `SECRET_KEY`, `FIRST_SUPERUSER`, `FIRST_SUPERUSER_PASSWORD`).
    * Use `POST /api/v1/login/access-token` to get a JWT, then call protected endpoints with `Authorization: Bearer <jwt>`.
  </Accordion>

  <Accordion title="Docs preview doesn't start">
    Try updating the CLI and restarting:

    ```bash theme={null}
    npm i -g mint
    cd docs
    mint dev
    ```
  </Accordion>
</AccordionGroup>
