Railway

Deploy Aegra

A self-hosted backend for building and running LangGraph AI agents.

Deploy Aegra

Just deployed

/var/lib/postgresql/data

Deploy and Host Aegra on Railway

Aegra is a self-hosted backend for building and running LangGraph-compatible AI agents. It provides a production-oriented runtime for agent applications with persistent PostgreSQL storage, configurable graphs, and flexible model provider support.

About Hosting Aegra

This Railway template deploys Aegra together with PostgreSQL as its persistent data layer.

Aegra acts as the runtime backend for AI agents and LangGraph-based applications, while PostgreSQL stores persistent application and agent state.

The deployment is designed for developers who want to self-host LangGraph-compatible workloads without manually provisioning the underlying infrastructure.

Common Use Cases

  • Self-hosted AI agent backends
  • LangGraph-compatible agent deployments
  • Stateful AI applications
  • Agent orchestration
  • Backend services for AI assistants
  • Custom LLM applications
  • Internal AI platforms
  • Research and experimentation with agent systems
  • AI-powered APIs
  • Developer platforms for agent-based applications

Dependencies for Aegra Hosting

This template uses:

  • Aegra for the agent runtime and application backend
  • PostgreSQL for persistent application and agent state
  • Railway Private Networking for secure internal communication
  • Railway managed infrastructure for deployment and persistence

Architecture

        Users / Applications
                │
                ▼
              Aegra
                │
                │
                ▼
           PostgreSQL

Aegra handles the agent runtime and application layer, while PostgreSQL provides the persistent data backend.

How Aegra Works

Aegra provides infrastructure for serving LangGraph-compatible agents as self-hosted applications.

Instead of acting as a visual workflow builder, Aegra runs agent graphs defined in application code and configuration.

This makes it suitable for developers who want greater control over:

  • Agent logic
  • LangGraph applications
  • Application dependencies
  • Model providers
  • Authentication
  • Persistent state
  • Deployment infrastructure

Persistent Architecture

The Aegra application itself is designed to remain lightweight, while persistent state is stored in PostgreSQL.

This separation makes the application easier to redeploy and maintain while keeping important runtime data persistent.

ComponentRole
AegraAgent runtime and application backend
PostgreSQLPersistent application and agent state

LangGraph Compatibility

Aegra is designed around LangGraph-compatible applications.

Developers can define graphs in Python and deploy them using Aegra as the serving and runtime layer.

This enables use cases such as:

  • ReAct agents
  • Stateful assistants
  • Multi-step AI workflows
  • Tool-using agents
  • Long-running agent applications
  • Custom LangGraph architectures

LLM Provider Flexibility

Aegra does not force a single LLM provider.

The agents deployed through Aegra can use different model providers depending on the application and graph configuration.

This makes it possible to build applications using providers such as:

  • OpenAI
  • Anthropic
  • Together AI
  • OpenRouter
  • Self-hosted model endpoints
  • Other LangChain-compatible providers

Aegra vs Managed Agent Platforms

FeatureAegraManaged Agent Platform
Self-hosted❌ / Limited
LangGraph compatibility
Infrastructure control
PostgreSQL persistence
Custom agent codeVaries
Model provider flexibilityVaries
Deployment portabilityLimited
Railway hosting

Why Self-Host Aegra?

Self-hosting Aegra gives developers control over the infrastructure running their agent applications.

This can be useful when you need:

  • Control over application deployment
  • Private infrastructure
  • Custom networking
  • Independent model provider selection
  • Persistent agent state
  • Integration with internal systems
  • Reduced dependency on managed agent platforms

Why Deploy Aegra on Railway?

Railway provides a simple platform for running Aegra together with PostgreSQL and the infrastructure required for persistent deployments.

Railway handles much of the underlying deployment work, including:

  • Service orchestration
  • Private networking
  • Persistent storage
  • HTTPS
  • Environment management
  • Application redeployment
  • Infrastructure scaling

This allows developers to focus primarily on building and deploying their agents instead of managing servers.

Who Is This Template For?

This template is suitable for:

  • LangGraph developers
  • AI application developers
  • Backend engineers
  • AI platform teams
  • Researchers building agent systems
  • Developers migrating away from managed agent deployment platforms
  • Teams building internal AI services

Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
5
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
64