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.What Gets Created
publicAccess.enabled: true.
Prerequisites
Create the database credentials secret
username and database (letters, digits and _) and password (any characters):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.Create the optional secrets
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.Choose your agent image
Installation
The only required value is the name of the database credentials secret from Prerequisites:--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
CLI
Terraform
Pulumi
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 graphstress_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:
aegra.image to the pushed image, for example ORG_NAME.registry.cpln.io/my-agent:1:
/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
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: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. Enablepostgres.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. Setaegra.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
The deployment is stuck and cpln logs returns nothing
The deployment is stuck and cpln logs returns nothing
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 restarts a few times on first install
Aegra restarts a few times on first install
Streams or /runs/wait calls are cut off on the public URL
Streams or /runs/wait calls are cut off on the public URL
aegra.requestTimeoutSeconds (default 600, maximum 3600). Raise it for longer calls. Calls from inside the GVC over cpln.local are not subject to it.A run ends in error with couldn't get a connection after 30.00 sec
A run ends in error with couldn't get a connection after 30.00 sec
Assistant 'stress_test' not found
Assistant 'stress_test' not found
aegra.json.A secret was rotated but Aegra still uses the old value
A secret was rotated but Aegra still uses the old value
cpln workload force-redeployment RELEASE_NAME-aegra --gvc GVC_NAME.The chart refuses to render
The chart refuses to render
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. KeeppublicAccessoff without one: anyone with the URL could run your agents and read every thread. - Langfuse in another GVC: set that Langfuse release’s
internalAccesstosame-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 upgradeafter 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.