Skip to main content

Overview

Aegra is an open-source agent server that implements the LangGraph Agent Server API: assistants, threads, background runs, streaming, the store and crons for the LangGraph agents in your image. This template runs your agent image on a bundled PostgreSQL with pgvector, which holds threads, runs, checkpoints and the store, and a bundled single-node Redis for the job queue and run event streams. It works with the LangGraph SDK and with frontends such as Agent Chat UI.
This template does not create a GVC. It deploys into an existing GVC that you already have, and that GVC should have exactly one location, because the bundled database and Redis run in one location.

What Gets Created

The template creates no credentials. The API is reachable only from inside the GVC until you set publicAccess.enabled: true.

Prerequisites

1

Create the database credentials secret

The bundled PostgreSQL initializes with this dictionary secret and Aegra connects with it. It holds exactly three keys: username and database (letters, digits and _) and password (any characters):
Set postgres.config.credentialsSecretName to this name (or postgresHA.config.credentialsSecretName when you use the HA database). Secret names are org-wide, so give each release its own secret.
2

Create the optional secrets

Each is a dictionary secret created the same way. Agent secrets hold any keys your agent reads, such as OPENAI_API_KEY. Langfuse tracing needs the keys publicKey and secretKey. A Redis password needs the key password, URL-safe (letters, digits, -, _, .). See Agent secrets, Langfuse tracing and Redis.
3

Choose your agent image

The default image runs Aegra’s example agents. To serve your own graphs, build an image as described in Bring Your Own Agent.
Every secret your release names must exist before you install. If one does not, the deployment waits silently: cpln logs returns nothing, and the only place the missing secret is named is status.versions[].message in cpln workload get-deployments RELEASE_NAME-aegra --gvc GVC_NAME -o yaml. Create the secret and the deployment recovers on its own after several minutes, or run cpln workload force-redeployment RELEASE_NAME-aegra --gvc GVC_NAME to skip the wait.
Optional database backups need a bucket and a Control Plane cloud account; see Backing Up.

Installation

The only required value is the name of the database credentials secret from Prerequisites:
To install with the highly available database, add --set postgres.enabled=false --set postgresHA.enabled=true --set postgresHA.config.credentialsSecretName=DB_CREDENTIALS_SECRET_NAME. To install with the CLI, UI, Terraform or Pulumi, follow the instructions for your preferred method:

UI

Browse, install, and manage templates visually

CLI

Manage templates from your terminal

Terraform

Declare templates in your Terraform configurations

Pulumi

Declare templates in your Pulumi programs

Configuration

Aegra

Agent secrets

Access

Langfuse tracing

Database

Redis

Bring Your Own Agent

The default image is a community build of Aegra 0.11.0 with Aegra’s example agents: the graph stress_test runs with no model key, and agent needs OPENAI_API_KEY in the agent secrets. To serve your own graphs, build an image from it with your code and an aegra.json:
Build and push the image to your org’s private registry, then set aegra.image to the pushed image, for example ORG_NAME.registry.cpln.io/my-agent:1:
Only your graphs are served; the example agents of the default image are not registered. Each graph is listed in /assistants/search with a generated id, and its graph_id is the name you listed in aegra.json. Run it by passing that name as "assistant_id": "my_agent".

Connecting

Point the LangGraph SDK (langgraph_sdk.get_client(url=...)) at the URL and use the graph name as the assistant id. To check the server, forward the port and read its version:

Chat With an Agent in a Browser

Aegra has no UI of its own. To chat with an agent, open the hosted Agent Chat UI with your public URL and a graph name:
The browser calls Aegra directly, so this needs publicAccess.enabled: true. Anyone with the public URL can call your agents unless your image adds an auth handler.

Operations

Backing Up

All state lives in PostgreSQL, so backing up the database backs up every thread, run, checkpoint and store entry. Enable postgres.backup.enabled (or postgresHA.backup.enabled with the HA database) and fill in the provider block. The bucket, cloud account and IAM policy are set up as described in the postgres or postgres-highly-available template, and a MinIO provider needs a dictionary secret with the keys accessKey and secretKey. Restore steps are in those templates’ pages.

Scaling and Availability

Aegra replicas share PostgreSQL and Redis, so they are interchangeable. Set aegra.replicas up to 10 to spread background runs across them. A run on a replica that stops or hangs is picked up again by a live replica and retried from its last checkpoint; Aegra does not drain runs on shutdown. For near-zero-downtime upgrades and failover, set aegra.replicas: 2 and enable postgresHA. Redis stays a single node, because Aegra takes one Redis URL and cannot follow Sentinel; runs are recovered from PostgreSQL if Redis restarts.

Troubleshooting

A secret named in the values does not exist. Read status.versions[].message with cpln workload get-deployments RELEASE_NAME-aegra --gvc GVC_NAME -o yaml, create the secret, then run cpln workload force-redeployment RELEASE_NAME-aegra --gvc GVC_NAME.
Aegra exits when PostgreSQL or Redis is not up yet and the platform restarts it. It settles once both are ready; no action is needed.
The public endpoint cuts requests after aegra.requestTimeoutSeconds (default 600, maximum 3600). Raise it for longer calls. Calls from inside the GVC over cpln.local are not subject to it.
The database was unreachable for more than 30 seconds, for example during a PostgreSQL failover. Aegra keeps restarting until the database answers, and the API returns 500 or 503 meanwhile. Submit the run again.
Your own image serves only your graphs; the example agents of the default image are not registered. Call your graph by the name listed in aegra.json.
Rotating a secret does not restart Aegra. Run cpln workload force-redeployment RELEASE_NAME-aegra --gvc GVC_NAME.
The template rejects redis.mode other than dev, extraEnv or agentSecrets.keys names that it sets itself (such as DATABASE_URL, REDIS_URL, RUN_MIGRATIONS_ON_STARTUP, LANGFUSE_* and CPLN_*), duplicate or invalid env names, agentSecrets.keys without agentSecrets.secretName, aegra.replicas above 10, aegra.requestTimeoutSeconds above 3600, and enabling both or neither database. The error names the offending value.

Important Notes

  • Aegra has no authentication unless your image configures an auth handler in aegra.json. Keep publicAccess off without one: anyone with the URL could run your agents and read every thread.
  • Langfuse in another GVC: set that Langfuse release’s internalAccess to same-org, or Aegra cannot reach it.
  • After rotating any secret the release uses, run cpln workload force-redeployment RELEASE_NAME-aegra --gvc GVC_NAME.
  • Firewall changes (publicAccess, internalAccess) take from 30 seconds to several minutes to take effect.
  • The first helm upgrade after an install can restart the bundled database and Redis, which briefly interrupts the API.
  • Use a single-location GVC: the bundled database and Redis run in one location.
  • Uninstalling deletes the database volume, and with it every thread, run and checkpoint.

External References

Aegra documentation

Concepts, configuration and API

Aegra deployment guide

Deploying Aegra

Aegra authentication

Adding an auth handler

Aegra on GitHub

Source and issues

Agent Chat UI

Browser chat frontend for LangGraph servers