Skip to content

Open source LangGraph Platform alternative - Self-hosted AI agent backend with FastAPI and PostgreSQL. Zero vendor lock-in, full control over your agent infrastructure.

License

Notifications You must be signed in to change notification settings

NextLevel-Dev/aegra

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

345 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aegra banner

Aegra

Self-hosted LangGraph Platform alternative. Your infrastructure, your rules.

GitHub stars License Issues Discord Sponsor


Aegra is a drop-in replacement for LangGraph Platform. Use the same LangGraph SDK, same APIs, but run it on your own infrastructure with PostgreSQL persistence.

Works with: Agent Chat UI | LangGraph Studio | AG-UI / CopilotKit

🚀 Quick Start

Prerequisites: Docker, Python 3.11+

git clone https://github.com/ibbybuilds/aegra.git
cd aegra
cp .env.example .env
# Add your OPENAI_API_KEY to .env

docker compose up

Open http://localhost:8000/docs to explore the API.

Your existing LangGraph code works without changes:

from langgraph_sdk import get_client

client = get_client(url="http://localhost:8000")

assistant = await client.assistants.create(graph_id="agent")
thread = await client.threads.create()

async for chunk in client.runs.stream(
    thread_id=thread["thread_id"],
    assistant_id=assistant["assistant_id"],
    input={"messages": [{"type": "human", "content": "Hello!"}]},
):
    print(chunk)

🔥 Why Aegra?

Feature LangGraph Platform Aegra
Cost $$$+ per month Free (self-hosted)
Data Control Third-party hosted Your infrastructure
Vendor Lock-in High dependency Zero lock-in
Authentication Limited options Custom (JWT/OAuth/Firebase)
Database Managed, no BYO Bring your own Postgres
Tracing LangSmith only Your choice (Langfuse, etc.)
SDK Compatibility LangGraph SDK Same LangGraph SDK

✨ Features

📚 Documentation

Topic Description
Developer Guide Local setup, migrations, development workflow
Custom Routes Add your own FastAPI endpoints
Semantic Store Vector embeddings with pgvector
Dependencies Shared modules for graph imports
Langfuse Integration Observability and tracing
Production Setup Docker deployment for production

⚠️ Upgrading from an older version? See the PostgreSQL 18 Migration Guide.

💬 Community & Support

🏗️ Built With

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md and check out good first issues.

💖 Support the Project

The best contribution is code, PRs, and bug reports - that's what makes open source thrive.

For those who want to support Aegra financially, whether you're using it in production or just believe in what we're building, you can become a sponsor. Sponsorships help keep development active and the project healthy.

📄 License

Apache 2.0 - see LICENSE.


⭐ Star us if Aegra helps you escape vendor lock-in ⭐

Star History Chart

About

Open source LangGraph Platform alternative - Self-hosted AI agent backend with FastAPI and PostgreSQL. Zero vendor lock-in, full control over your agent infrastructure.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Other 0.5%