aegra
Open source alternative to LangGraph Platform (now LangSmith Deployments) - Self-hosted AI agent backend with FastAPI and PostgreSQL. Zero vendor lock-in, full
What is aegra?
Open source alternative to LangGraph Platform (now LangSmith Deployments) - Self-hosted AI agent backend with FastAPI and PostgreSQL. Zero vendor lock-in, full control over your agent infrastructure.
Overview of aegra
What it is
Aegra is an open source alternative to LangSmith Deployments (formerly LangGraph Platform). It is a self-hosted AI agent backend built with FastAPI and PostgreSQL, providing zero vendor lock-in and full control over agent infrastructure. It works as a drop-in replacement for LangSmith Deployments, using the same LangGraph SDK and APIs but running on the user's own infrastructure with PostgreSQL persistence.
Key features
- Agent Protocol compliant – works with Agent Chat UI, LangGraph Studio, and CopilotKit - Worker architecture – Redis job queue with 30 concurrent runs per instance, lease-based crash recovery, and horizontal scaling across multiple instances - Scheduled cron jobs – trigger runs on a schedule with standard 5-field or seconds-level 6-field expressions, IANA timezone support, and multi-instance safe SKIP LOCKED claim - Human-in-the-loop – approval gates and user intervention points - Streaming – real-time SSE streaming with cross-instance pub/sub and automatic reconnection with event replay; supports both legacy run-scoped stream and Agent Protocol v2 thread-scoped streaming - Persistent state – PostgreSQL checkpoints via LangGraph - Configurable auth – JWT, OAuth, Firebase, or none
Use cases
Deploying LangGraph agents on own infrastructure as a self-hosted alternative to LangSmith Deployments. Building agent backends with custom authentication, data residency, and observability. Running scheduled cron jobs for agent tasks. Implementing human-in-the-loop workflows.
Getting started
Prerequisites: Python 3.12+, Docker (for PostgreSQL). bash pip install aegra-cli # Initialize a new project — prompts for location, template, and name aegra init # Follow the printed next steps: cd cp .env.example .env # Add your OPENAI_API_KEY to .env uv sync # Install dependencies uv run aegra dev # Start PostgreSQL + dev server Alternatively, from source: bash git clone https://github.com/aegra/aegra.git cd aegra cp .env.example .env # Add your OPENAI_API_KEY to .env docker compose up Open http://localhost:2026/docs to explore the API.
License and pricing
Licensed under Apache 2.0. The project is open source. An enterprise tier with self-hosting is also available at custom pricing (based on LangChain pricing as of February 2026).
Based on the project's public README and repository metadata.