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

> ## Agent Instructions
> These are the DualMind developer and admin docs. The API base URL is https://api.dualmindlab.tech and the local API runs on http://localhost:5079.
> Never send POST, PUT, PATCH or DELETE requests to the production API while developing; use a local API and a development Supabase project.
> Environment variables are documented by name only. Never ask for or print secret values.
> Admin routes under /api/admin require a Supabase access token for a user whose public.users.role is admin. The PUT routes for users, models, providers and threads write every field, so send the full record; PUT /api/admin/keys/{keyId} writes only the fields you send (sending api_key replaces the key).

# Use these docs with AI

> Connect your coding agent to the DualMind developer docs through MCP, llms.txt, skill.md and Markdown exports, and start from ready-made prompts.

Every page on this site is also published in formats that coding agents read well. Point your agent at them instead of pasting pages into a chat.

<CardGroup cols={2}>
  <Card title="MCP server" icon="plug-zap" href="#connect-the-mcp-server">
    Search these docs from your editor or agent: `dev-doc.dualmindlab.tech/mcp`.
  </Card>

  <Card title="llms.txt" icon="list" href="https://dev-doc.dualmindlab.tech/llms.txt">
    An index of every page with a one-line description. `llms-full.txt` has the full text.
  </Card>

  <Card title="skill.md" icon="wand-sparkles" href="https://dev-doc.dualmindlab.tech/skill.md">
    A capability summary of what you can build with DualMind, generated from these docs.
  </Card>

  <Card title="Markdown of any page" icon="file-text" href="/ai-tools.md">
    Add `.md` to any URL, or use **Copy page** in the page menu.
  </Card>
</CardGroup>

## Connect the MCP server

Mintlify hosts a search MCP server for this site at `https://dev-doc.dualmindlab.tech/mcp`, with a discovery document at `/.well-known/mcp`. It's public and needs no key.

<Tabs>
  <Tab title="Claude Code" icon="terminal">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    claude mcp add --transport http dualmind-dev https://dev-doc.dualmindlab.tech/mcp
    ```
  </Tab>

  <Tab title="Cursor" icon="mouse-pointer-2">
    Use **Connect to Cursor** in the page menu, or add it yourself:

    ```json .cursor/mcp.json theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    {
      "mcpServers": {
        "dualmind-dev": { "url": "https://dev-doc.dualmindlab.tech/mcp" }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code" icon="code">
    Use **Connect to VS Code** in the page menu, or add it yourself:

    ```json .vscode/mcp.json theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    {
      "servers": {
        "dualmind-dev": { "type": "http", "url": "https://dev-doc.dualmindlab.tech/mcp" }
      }
    }
    ```
  </Tab>
</Tabs>

<Tip>
  Working on the arena as a player-facing product? The public docs have their own server at `https://docs.dualmindlab.tech/mcp`.
</Tip>

## Ground rules your agent should follow

The Markdown version of every page ends with these instructions, so agents that read it pick them up automatically:

<Steps>
  <Step title="Production is read-only while developing">
    Use `http://localhost:5079` and a development Supabase project. Only `GET`s to public endpoints on `https://api.dualmindlab.tech`.
  </Step>

  <Step title="Names, never values">
    Environment variables and secrets are referred to by name. Agents must not ask for, print or commit their values.
  </Step>

  <Step title="Admin writes send the full record">
    Admin `PUT` routes write every field. Read first, then send everything back.
  </Step>

  <Step title="Pull requests only">
    No direct pushes to `main`, no deploys from a branch.
  </Step>
</Steps>

## Prompts to start from

Copy one into your agent, or open it straight in Cursor.

<Prompt description="**Add an admin endpoint** end to end: controller, DTO, test, spec and docs." icon="shield-plus" actions={["copy", "cursor"]}>
  You are working in the DualMind repositories. Use the DualMind developer docs MCP server ([https://dev-doc.dualmindlab.tech/mcp](https://dev-doc.dualmindlab.tech/mcp)) to look up conventions before you write code.

  Add a new admin endpoint to DualMind\_Back:

  * Put it in the right controller under `src/DualMind.API/Controllers/Admin` with `[Authorize(Policy = "AdminOnly")]`.
  * Use the `ApiResponse<T>` envelope and snake\_case `[JsonProperty]` names that match the database columns.
  * Use typed route constraints (`{id:guid}`) and escape user input in PostgREST filters with `Uri.EscapeDataString`.
  * Add xUnit tests in `tests/DualMind.API.Tests`.
  * Add the route to `api-reference/openapi-admin.json` in arena-internal-docs and regenerate the stub pages.
    Never call the production API with write methods, and never print secret values. Open a pull request; do not push to main.
</Prompt>

<Prompt description="**Debug a failing battle** from a correlation ID or a `[System Note]` answer." icon="bug" actions={["copy", "cursor"]}>
  Help me debug a DualMind battle that failed or fell back to the basic model. Use the DualMind developer docs MCP server ([https://dev-doc.dualmindlab.tech/mcp](https://dev-doc.dualmindlab.tech/mcp)), especially the Provider integration, Request lifecycle and Troubleshooting pages.

  1. Ask me for the X-Correlation-Id, the model names and the exact error text or \[System Note].
  2. Work out whether the failure is in model selection, AI Gateway configuration, the provider key pool (cooldowns), the provider itself, or the fallback model.
  3. Suggest the smallest next check, using read-only commands only.
     Do not ask for or print any secret values.
</Prompt>

<Prompt description="**Document a change** on this site in the house style." icon="file-pen-line" actions={["copy", "cursor"]}>
  Update the DualMind developer docs (Mintlify, repo arena-internal-docs) for the change I describe.

  * Match the existing style: sentence-case headings, second person, short sentences, Mintlify components (Steps, Tabs, CodeGroup, Accordion, Card) over raw HTML.
  * Code examples in cURL, JavaScript and Python.
  * The site is public: no secrets, environment values, project URLs, account IDs or security write-ups. Use variable names.
  * Run npx mint\@4.2.989 validate and npx mint\@4.2.989 broken-links before opening a pull request.
</Prompt>

## What each format is for

| Format | URL | Best for |
| :- | :- | :- |
| MCP search | `/mcp` | Agents that search while they work |
| `llms.txt` | `/llms.txt` | Finding the right page quickly |
| `llms-full.txt` | `/llms-full.txt` | Loading the whole site into a long context |
| `skill.md` | `/skill.md` | A summary of capabilities, inputs and constraints |
| Markdown export | `/<page>.md` | One page, clean, with the ground rules appended |
| OpenAPI | `/api-reference/openapi.json`, `/api-reference/openapi-admin.json` | Generating clients and checking request shapes |


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