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

# Introduction

> Self-hosted Agent Protocol server. Your infrastructure, your rules.

Aegra is an open-source, self-hosted Agent Protocol server that lets you run AI agents on your own infrastructure. It's a drop-in replacement for LangSmith Deployments — same SDK, same APIs, no vendor lock-in. Read [why teams choose Aegra](/why-aegra) over managed platforms, or jump straight to the [migration guide](/migration) if you're switching.

## Before you begin

<Tip>
  **Using an AI coding tool?** Copy the prompt below to add the Aegra **skill** and **MCP server** for better results when building with Aegra.
</Tip>

<Expandable title="Install the Aegra skill and MCP server">
  Install the Aegra skill to get context on project structure, configuration, and best practices:

  ```bash theme={null}
  npx skills add https://docs.aegra.dev
  ```

  Then add the Aegra MCP server for access to documentation search. Follow the setup instructions for your tool:

  <Tabs>
    <Tab title="Claude Code">
      ```bash theme={null}
      claude mcp add --transport http aegra-docs https://docs.aegra.dev/mcp
      ```
    </Tab>

    <Tab title="Cursor">
      Add to your `.cursor/mcp.json`:

      ```json theme={null}
      {
        "mcpServers": {
          "aegra-docs": {
            "url": "https://docs.aegra.dev/mcp"
          }
        }
      }
      ```
    </Tab>

    <Tab title="VS Code">
      Add to your `.vscode/mcp.json`:

      ```json theme={null}
      {
        "servers": {
          "aegra-docs": {
            "type": "http",
            "url": "https://docs.aegra.dev/mcp"
          }
        }
      }
      ```
    </Tab>

    <Tab title="llms.txt">
      Feed `https://docs.aegra.dev/llms.txt` to any LLM for full docs context.
    </Tab>
  </Tabs>
</Expandable>

## What Aegra does

Aegra gives you a production-ready server for running LangGraph agents with full persistence, streaming, and authentication. You bring your own PostgreSQL database and keep complete control over your data.

<CardGroup cols={2}>
  <Card title="Agent Protocol" icon="robot">
    Works with Agent Chat UI, LangGraph Studio, and CopilotKit out of the box.
  </Card>

  <Card title="Self-hosted" icon="server">
    Run on your own infrastructure with your own PostgreSQL database. No external dependencies.
  </Card>

  <Card title="Same SDK" icon="plug">
    Use the LangGraph SDK you already know. Switch from LangSmith Deployments with zero code changes.
  </Card>

  <Card title="Open source" icon="code">
    Apache 2.0 licensed. Inspect, modify, and contribute to the codebase.
  </Card>
</CardGroup>

## How it compares

|                    | LangSmith Deployments                                         | Aegra                                      |
| :----------------- | :------------------------------------------------------------ | :----------------------------------------- |
| **Deploy agents**  | Local dev only (Free), paid cloud (Plus)                      | Free, unlimited                            |
| **Custom auth**    | Not available (Free), available (Plus)                        | Python handlers (JWT/OAuth/Firebase)       |
| **Self-hosted**    | Enterprise only (license key required)                        | Always (Apache 2.0)                        |
| **Own database**   | Managed only (Free/Plus), bring your own (Enterprise)         | Bring your own Postgres                    |
| **Tracing**        | LangSmith only                                                | Any OTLP backend (Langfuse, Phoenix, etc.) |
| **Data residency** | LangChain cloud (Free/Plus), your infrastructure (Enterprise) | Your infrastructure                        |
| **SDK**            | LangGraph SDK                                                 | Same LangGraph SDK                         |

*Based on [LangChain pricing](https://www.langchain.com/pricing) as of February 2026. An enterprise tier with self-hosting is also available at custom pricing. See the full [feature support matrix](/feature-support) for what Aegra supports today.*

## Key features

* **Human-in-the-loop** — Approval gates and user intervention points
* **Streaming** — Real-time responses with network resilience
* **Persistent state** — PostgreSQL checkpoints via LangGraph
* **Configurable auth** — JWT, OAuth, Firebase, or none
* **Observability** — Fan-out tracing via OpenTelemetry to multiple backends
* **Semantic store** — Vector embeddings with pgvector
* **Custom routes** — Add your own FastAPI endpoints alongside the Agent Protocol API

## Next steps

<CardGroup cols={3}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get a running server in under 5 minutes.
  </Card>

  <Card title="Build your first agent" icon="hammer" href="/getting-started">
    Hands-on tutorial from zero to a working agent.
  </Card>

  <Card title="Installation" icon="download" href="/installation">
    All the ways to install and run Aegra.
  </Card>

  <Card title="Why Aegra" icon="scale-balanced" href="/why-aegra">
    Cost comparison and feature highlights.
  </Card>

  <Card title="Migrate from LangSmith" icon="arrow-right-arrow-left" href="/migration">
    Step-by-step guide to switching from LangSmith Deployments.
  </Card>
</CardGroup>
