aegra

Your agents,your infrastructure.

aegra is an open source Agent Protocol server. Run LangGraph agents on your own Postgres, with the same SDK, and no vendor lock-in.

Running in production at

  • Mercanis
  • tmarket
  • Diag n'Grow

What you get

Everything a managed platform does,on infrastructure you own.

Your database, your data

Threads, runs, and checkpoints live in a Postgres you control. Query them, back them up, keep them in your region.

Custom auth in Python

Plug in JWT, OAuth, or Firebase with one decorator. Every thread is scoped to its owner.

Agent Protocol API

The endpoints the LangGraph SDK already speaks. Point your client at aegra and keep your code.

Streaming runs

Token, value, and event streams over SSE, with resume after disconnect.

Workers that survive restarts

A Redis queue with leases, heartbeats, and crash recovery. Scale out by adding instances.

Tracing to any OTLP backend

Langfuse, Phoenix, or your own collector. Every run is a trace, every node a span.

Works with the tools you already use

  • LangGraph SDKPython and JS
  • Agent Chat UIdrop-in
  • LangGraph Studioconnect to any deployment
  • CopilotKitAG-UI compatible

Same SDK

Keep your client code.Point it at your server.

The LangGraph SDK talks to aegra the way it talks to a managed deployment. Change the URL and the client side stays as it is.

Build your first agent
agent.py1 line changed
from langgraph_sdk import get_client
-client = get_client(url=MANAGED_DEPLOYMENT_URL)
+client = get_client(url="https://agents.yourcompany.com")
thread = await client.threads.create()
run = client.runs.stream(thread["thread_id"], "agent", input=state)

Compare

Managed platform pricing,or your own infrastructure.

FeatureLangSmith Deploymentsaegra
Deploy agentsLocal dev only (Free), paid cloud (Plus)Free, unlimited
Custom authNot available (Free), available (Plus)Python handlers: JWT, OAuth, Firebase
Self-hostedEnterprise only, license key requiredAlways, Apache 2.0
Own databaseManaged only (Free/Plus), BYO (Enterprise)Bring your own Postgres
TracingLangSmith built in, others via callbacks in your codeAny OTLP backend as a server setting: Langfuse, Phoenix, more
Data residencyLangChain cloud (Free/Plus), yours (Enterprise)Your infrastructure
SDKLangGraph SDKSame LangGraph SDK

Based on LangChain pricing as of February 2026.

Join the community

Real messages from people running aegra.

Join us on Discord

Philipp Eschenbach

VP Engineering & AI, Mercanis

Aegra was exactly what we needed to break free from being locked into LangChain and the rest. We genuinely love what you've built, and we're not just watching from the sidelines, we're contributing.

GM

Gaston Michelotti

Discord

Here building customer support agents! Already in prod and with awesome results.

Soufiene Slimi

Discord

Aegra really nails that gap. A self-hosted, open source LangGraph Platform alternative with zero vendor lock-in, your own Postgres, and the same LangGraph SDK is exactly what I was hoping someone would build.

Geoffrey

Diag n'Grow

We use Aegra for our agents at Diag n'Grow: a data collection chatbot that replaces a fixed questionnaire, and a software audit agent.

Open source from day one

The whole server is on GitHub. Read it, run it, fork it. There is no enterprise tier hiding the good parts, and no license key. If you can run Postgres, you can run aegra.

View on GitHub
1,262
GitHub stars
47
contributors
Apache 2.0
license

Your agents,your infrastructure.