skillfed

aegra-api

Aegra core API - Self-hosted Agent Protocol server

aegra-api v0.10.0 86.0K downloads/30d#13,890 on PyPI1,134
Permissive license Apache-2.0 Active released

What it is and what it does

Aegra API is a FastAPI-based server that hosts and executes AI agent graphs defined using LangGraph, providing a self-hosted alternative to vendor-locked services. It implements the Agent Protocol standard, making agents compatible with tools like Agent Chat UI and LangGraph Studio. The package handles agent lifecycle management—creating assistants from graph definitions, managing conversation threads, executing runs synchronously or with streaming, and canceling in-flight executions. It includes built-in support for human-in-the-loop approval workflows and scheduled cron job triggers with timezone awareness and multi-instance safety.

The server stores agent state and conversation history in PostgreSQL, offers semantic search via a vector store, and integrates observability through OpenTelemetry with exporters for tracing and metrics. It requires substantial infrastructure—a PostgreSQL database, Redis for caching, and configured LangGraph agent graphs—making it suited for teams deploying agents on their own servers rather than using managed platforms. The dependency stack includes SQLAlchemy for ORM, Pydantic for validation, and Prometheus instrumentation for monitoring.

Use it for:

  • Deploy proprietary AI agents on internal infrastructure without reliance on third-party agent hosting platforms.
  • Build multi-turn conversation systems with thread-based state management and human approval gates.
  • Schedule recurring agent tasks (e.g., daily reports, periodic data processing) with cron-like triggers.
  • Integrate LangGraph workflows into production systems via REST API with streaming response support.
  • Monitor and trace agent execution with OpenTelemetry observability and Prometheus metrics.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Aegra API is a self-hosted Agent Protocol server that runs AI agent graphs on your own infrastructure, compatible with LangGraph SDK and providing streaming, human-in-the-loop workflows, and scheduled cron job execution.

Yes, if you need to self-host LangGraph agents and have PostgreSQL infrastructure available. The package is actively maintained, has no known vulnerabilities, and provides a complete Agent Protocol implementation with production-ready features (streaming, cron jobs, observability). Install friction is low. The substantial dependency footprint and requirement for PostgreSQL setup are expected trade-offs for a self-hosted server, not drawbacks. Not suitable if you prefer managed agent hosting or lack infrastructure to run PostgreSQL.

Install

aegra-api on PyPI

pip

pip install aegra-api

uv

uv add aegra-api

poetry

poetry add aegra-api

Installing aegra-api

Before you install

Low install friction with a pure Python wheel. Active maintenance: released 2 days ago with 1134 repository stars. Requires 22 runtime dependencies including FastAPI, LangGraph, PostgreSQL drivers, and OpenTelemetry observability stack—a substantial but typical footprint for a production agent server.

License in practice

Apache-2.0 permissive license allows commercial use, modification, and redistribution with minimal restrictions, suitable for self-hosted deployments in both open-source and proprietary contexts.

Quickstart

# Install
pip install aegra-api

# Set environment variables
export POSTGRES_USER=aegra
export POSTGRES_PASSWORD=aegra_secret
export POSTGRES_HOST=localhost
export POSTGRES_DB=aegra

# Run migrations and start
alembic upgrade head
uvicorn aegra_api.main:app --port 2026 --reload

Requires PostgreSQL database, Python 3.12+, and LangGraph graph definitions in aegra.json configuration file.

Verify before relying

  • Whether the package works with Python versions beyond 3.12 despite 'supports_current' classifier.
  • Performance characteristics and scalability limits for concurrent agent runs.
  • Specific observability integrations beyond LANGFUSE and PHOENIX mentioned in docs.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 22 — alembic, asgi-correlation-id, asyncpg, croniter, fastapi, greenlet, langgraph-checkpoint-postgres, langgraph-sdk, langgraph, openinference-instrumentation-langchain, opentelemetry-api, opentelemetry-exporter-otlp, opentelemetry-sdk, prometheus-fastapi-instrumentator, psycopg, pydantic-settings, pydantic, redis, sqlalchemy, sse-starlette, structlog, uvicorn
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 85,991/month — #13,890 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aegra_api-0.10.0-py3-none-any.whl

Keywords: agent-protocol, agents, fastapi, langgraph, llm

Development Status :: 4 - BetaFramework :: FastAPIIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.12Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

self-hosted agent protocol serverlanggraph deployment alternativeagent protocol compliant apiai agent execution frameworkopen-source agent hostingstreaming agent responseslanggraph compatible server
agent-protocolself-hostedlanggraph

More Artificial Intelligence packages