--- id: aegra-api version: "0.10.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aegra-api — Aegra core API - Self-hosted Agent Protocol server License: permissive · Maintenance: active · Downloads: 86.0K/mo ## 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 above — 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 pip install aegra-api uv add aegra-api 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_current - Install friction: low - Maintenance: active - Downloads: 86.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags self-hosted agent protocol server, langgraph deployment alternative, agent protocol compliant api, ai agent execution framework, open-source agent hosting, streaming agent responses, langgraph compatible server, agent-protocol, self-hosted, langgraph [View on SkillFed](https://skillfed.io/packages/aegra-api) · [View on PyPI](https://pypi.org/project/aegra-api/)