Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Algen Agent Runtime — Build governed agents. Own the runtime.

Algen Agent Runtime

Quality Security Python 3.12+ License: Apache-2.0

Algen Agent Runtime is a typed, provider-neutral Python runtime for building governed AI agents. It provides deterministic execution state, model routing, tool controls, human approvals, retrieval, verification, durable stores, streaming events, and OpenTelemetry instrumentation without binding applications to one model vendor or agent framework.

Why Algen Agent Runtime?

  • Provider-neutral execution: route across local and hosted model providers through typed contracts.
  • Governance in the execution path: enforce policies, approvals, budgets, verification, and tenant boundaries around every run.
  • Durable and observable: persist agent and multi-agent workflow checkpoints, events, conversations, approvals, artifacts, and tool-execution records with optional PostgreSQL and Redis adapters.
  • Governed artifact inputs: stage tenant-scoped files with checksums, scan/quarantine state, expiry, metadata-only listing, and bounded retention before attaching them to a run.
  • Application-friendly: use the same runtime as an embedded Python library or through its FastAPI REST/SSE service.
  • Runtime-owned multi-agent DAGs: declare JSON-Schema inputs/outputs, agent, dynamic map-agent, deterministic-handler, predicate, and join nodes with conditions, bounded loops and repairs, clarification limits, and lifecycle events; compose exact-version child workflows without duplicating their topology.
  • Governed communications: send validated, idempotency-aware email through a provider-neutral contract and TLS-first SMTP adapter while keeping attachments behind Runtime artifact references.
  • Extensible by design: add model providers, tools, planners, context builders, verifiers, stores, and external-framework adapters without changing the state machine.
  • Offline-testable: the deterministic mock provider supports tests without credentials, network access, or paid model calls.

The Algen agent lifecycle

Runtime is the open-source execution foundation in a three-product lifecycle:

Product Role Boundary
Algen Agent Runtime Build and execute portable, governed agents and multi-agent DAGs Open-source Python library and service; owns execution contracts and semantics
Algen Agent Studio Low-code build, test, evaluate, publish, and deploy workbench Private product; consumes Runtime without redefining its workflow dialect
Algen Agent Marketplace Discover, distribute, license, and import versioned agents Public/private and free/paid catalog; packages agents but does not execute them

An agent can be built directly with Runtime or visually in Studio. Studio validates and evaluates the same Runtime project, publishes a versioned package to Marketplace, and deploys it with environment-specific credentials. Marketplace consumers import that package into Studio before configuration and deployment. Secrets and live environment values never belong in a marketplace artifact.

Typed workflows can reference staged file IDs rather than embedding bytes. See the artifact lifecycle for upload, checksum, quarantine, retention, and storage boundaries.

Workflows can also call exact, trusted child workflow versions through a WorkflowRegistry; Runtime preserves correlation, lineage, checkpoints, pause/approval propagation, and recovery. See multi-agent workflows and the importable examples/pattern_child_workflow. For governed outbound messages, see email.

Status and support

Area Status
Python 3.12 and 3.13
Package maturity Pre-alpha (0.1.0a1)
Core execution Available and covered by deterministic tests
HTTP API Available; secure deployment configuration is operator-owned
Persistence In-memory, PostgreSQL, and Redis adapters
Artifact storage Memory, PostgreSQL, and encrypted S3-compatible object storage
Distributed execution Experimental; see the production-readiness roadmap
Public API compatibility Experimental during 0.x; see the API stability policy
Community support Best effort; see SUPPORT.md

Install

Install the pre-release package from PyPI once published:

python -m pip install --pre algen-agent-runtime

Optional integrations are installed as extras, for example:

python -m pip install --pre 'algen-agent-runtime[postgres,redis,auth]'

Use algen-agent-runtime[object-storage] for the PostgreSQL-metadata/S3-blob artifact adapter.

For development from a checkout:

git clone https://github.com/AlgenAI/algen-agent-runtime.git
cd algen-agent-runtime
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'

Five-minute offline quickstart

Single agent

This example uses the built-in mock provider, so it requires no API key or external service:

import asyncio

from algen_agent_runtime.config.settings import AppSettings
from algen_agent_runtime.orchestration.container import build_container
from algen_agent_runtime.runtime.client import AlgenAgentRuntimeClient
from algen_agent_runtime.types.contracts import RunRequest


async def main() -> None:
    settings = AppSettings.model_validate(
        {
            "providers": {
                "mock": {"type": "mock", "default_model": "deterministic"}
            },
            "agents": [
                {
                    "name": "hello",
                    "version": "1.0.0",
                    "description": "Offline quickstart agent",
                    "system_instructions": "Answer concisely.",
                    "default_model": {
                        "name": "default",
                        "provider": "mock",
                        "model": "deterministic",
                    },
                }
            ],
        }
    )
    container = build_container(settings)
    try:
        result = await AlgenAgentRuntimeClient(container.runtime).run(
            RunRequest(
                agent="hello",
                input="Hello",
                tenant_id="quickstart",
                user_id="local-user",
            )
        )
        print(result.output)
    finally:
        await container.aclose()


asyncio.run(main())

Expected output:

Hello

Multi-agent DAG workflow

Execute a multi-agent DAG with dynamic map-agent fan-out, evidence joining, and synthesis:

import asyncio

from algen_agent_runtime.config.settings import load_settings
from algen_agent_runtime.orchestration.container import build_container
from algen_agent_runtime.runtime.client import AlgenAgentRuntimeClient
from algen_agent_runtime.workflows import MultiAgentWorkflowExecutor
from examples.pattern_multi_agent_fanout.hooks import create_hooks


async def main() -> None:
    settings = load_settings(("examples/pattern_multi_agent_fanout/agent.yaml",))
    container = build_container(settings)
    manifest = settings.workflows["multi-agent-fanout"]
    hooks = create_hooks(container=container, manifest=manifest)
    try:
        executor = MultiAgentWorkflowExecutor(
            AlgenAgentRuntimeClient(container.runtime),
            hooks,
            store=container.workflow_checkpoints,
        )
        state = await executor.run(
            manifest,
            {"question": "Assess a migration to managed queues"},
            tenant_id="quickstart",
            user_id="local-user",
        )
        print(state.values["answer"]["summary"])
    finally:
        container.close()


asyncio.run(main())

Expected output:

Completed bounded parallel research for: Assess a migration to managed queues

For a real local model, follow the Ollama quickstart.

Run the HTTP service

From a source checkout with Ollama running and llama3.2 installed:

ALGEN_AGENT_RUNTIME_CONFIG=examples/quickstart_local_chat/agent.yaml \
  algen-agent-runtime

The default bind is 127.0.0.1:8000. Development-header authentication is intentionally limited to loopback unless the insecure-development override is explicitly enabled.

Start a run:

curl --fail-with-body -X POST http://127.0.0.1:8000/v1/runs \
  -H 'content-type: application/json' \
  -H 'x-tenant-id: demo' \
  -H 'x-user-id: user-1' \
  -H 'x-scopes: runs:write' \
  -d '{"agent":"minimal","input":"Hello"}'

Production deployments should use verified JWT authentication, TLS termination, durable stores, explicit CORS rules, secret references, and infrastructure-level resource controls. See the operations guide.

Architecture

flowchart TD
  subgraph Interface["Interface Layer"]
    Client["Application / Studio / REST / SSE"]
  end

  subgraph Workflows["Multi-Agent Workflow Orchestration"]
    WorkflowExec["MultiAgentWorkflowExecutor"]
    Manifest["WorkflowManifest (DAG)"]
    Hooks["WorkflowHookRegistry"]
    WorkflowExec --- Manifest
    WorkflowExec --- Hooks
  end

  subgraph Core["AgentRuntime Execution State Machine"]
    Runtime["AgentRuntime State Machine"]
    Policies["Policy Middleware"]
    Context["Context Builder"]
    Planner["Planner"]
    Router["Model Router"]
    ToolExec["Tool Executor"]
    Verifier["Verifier Pipeline"]
  end

  subgraph Adapters["Infrastructure & Adapters"]
    Providers["Model Providers (Local / Cloud)"]
    Tools["Tools & Resource Connectors"]
    Stores["Run, Memory & Artifact Stores"]
    Events["Events, Audit & Telemetry"]
  end

  Client -->|Execute workflow DAG| WorkflowExec
  Client -->|Direct agent run| Runtime
  WorkflowExec -->|agent / map_agent nodes| Runtime
  WorkflowExec -->|handler hooks| Hooks
  Runtime --> Policies
  Runtime --> Context
  Runtime --> Planner
  Runtime --> Router --> Providers
  Runtime --> ToolExec --> Tools
  Runtime --> Verifier
  Runtime --> Stores
  Runtime --> Events

The orchestration layer depends on typed contracts rather than provider SDKs. The composition root resolves configured adapters and registries, while applications retain ownership of domain prompts, metrics, tools, policies, and data access.

See the full architecture guide for the state machine, component boundaries, persistence model, and extension points.

Capabilities

Capability Included
Execution Checkpointed state machine, retries, cancellation, timeouts, resumability
Models Capability-aware routing, fallback, local and OpenAI-compatible adapters
Tools Typed schemas, permissions, idempotency, approvals, execution ledger
Retrieval Keyword, vector, and hybrid retrieval with citation verification
Governance Policies, budgets, redaction, network controls, human-in-the-loop decisions
Conversations Durable messages, feedback, follow-ups, SSE, rich response blocks
Analytics Typed analytical DAGs, application-registered nodes, secret-safe query sources, semantic layers, governance and evaluation gates
Multi-agent workflows Validated manifests, dependency scheduling, dynamic fan-out, bounded repair, exact-version child composition, durable clarification and approval pause/resume, explicit crash recovery, typed resources, correlation, and lifecycle events
Communications Validated email contracts, artifact references, idempotency-aware tool execution, and a TLS-first SMTP adapter
Observability Structured logs, OpenTelemetry, optional Traccia integration
Frameworks Optional LangGraph, OpenAI Agents, AutoGen, and CrewAI adapters

Provider and integration dependencies remain optional. See the provider compatibility matrix and framework adapter guide.

Documentation

Topic Guide
Product fit and boundaries Why Algen Agent Runtime
Architecture Architecture
Deployment and configuration Operations
Providers Provider extension and compatibility
Retrieval RAG
Analytical agents Analytical runtime and semantic layer
Multi-agent workflows Workflow manifests and executor
Security Threat model and security policy
Production limitations Production readiness
Compatibility promises API stability
Releases Release process and changelog
Repository operators Public repository settings

Importable examples

The source and wheel distributions include the examples package so portable workflow hook providers remain importable by Algen Agent Studio. Import an example directory—or its agent.yaml or config/agent.yaml—and Studio preserves the Runtime WorkflowManifest exactly. Credential-free examples use deterministic mock providers; service-backed case studies retain explicit prerequisites.

The workflow examples cover first-class approve/modify/reject checkpoints, human clarification, bounded repair, exact-version parent/child dispatch, dynamic fan-out, parallel branches, joins, framework adapters, evaluation gates, and secret-free links to tools, retrieval, memory, services, storage, and telemetry.

Running examples from the CLI

Workflow examples can be executed directly from your terminal using deterministic mock providers without API keys:

# Multi-agent dynamic fan-out, evidence join, and synthesis
python -m examples.pattern_multi_agent_fanout.app "Assess a migration to managed queues"

# Deterministic handler and resource tool pattern
python -m examples.quickstart_tool.app

# Human approval checkpoint and state resumption
python -m examples.pattern_approval_workflow.app

# Governed research with retrieval and cited synthesis
python -m examples.pattern_governed_research.app

Development

make install
make lint
make typecheck
make test

AI coding skills

Repository-scoped skills under .agents/skills help coding agents use the current Runtime contracts instead of inventing parallel abstractions:

  • algen-runtime-contributor — safe, compatible open-source contributions;
  • algen-runtime-extension — providers, tools, stores, retrieval, telemetry, and framework adapters;
  • algen-agent-builder — Studio-importable single-agent and multi-agent projects;
  • algen-agent-connector — governed combinations of APIs, MCP, databases, retrieval, memory, persistence, and telemetry.

Invoke a skill by name when supported by your coding agent, for example:

Use $algen-agent-builder to create a multi-agent support workflow with CRM reads,
approval-gated ticket updates, deterministic tests, and a Studio-importable manifest.

The complete contributor workflow, architecture rules, DCO requirement, and test expectations are in CONTRIBUTING.md. Project decision-making and maintainership are documented in GOVERNANCE.md and MAINTAINERS.md.

Security

Do not report vulnerabilities in public issues. Use GitHub private vulnerability reporting as described in SECURITY.md. Never include live credentials, private prompts, customer data, or production endpoints in reports or test fixtures.

License

Licensed under the Apache License 2.0. Third-party components retain their respective licenses. See NOTICE.

Release files for algen-agent-runtime 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for algen-agent-runtime 0.1.0a1
File Size Uploaded
algen_agent_runtime-0.1.0a1.tar.gz 246.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for algen-agent-runtime 0.1.0a1
File Interpreter ABI Platform
algen_agent_runtime-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 600.3 kB

Release files / algen_agent_runtime-0.1.0a1.tar.gz

Download URL algen_agent_runtime-0.1.0a1.tar.gz
Size 246.5 kB
Tags Source
SHA-256 checksum
How to use checksums
36d1a42a785d666f94d10967c2ecd49b9d1a7cae53e1804463404b9dfe0207eb
BLAKE2b-256 checksum
How to use checksums
2840cc8673307674c3a20af2767ded515bd4f793921174b4eb9da6c7f30e295a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / algen_agent_runtime-0.1.0a1-py3-none-any.whl

Download URL algen_agent_runtime-0.1.0a1-py3-none-any.whl
Size 353.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e63af46b069283c72c59102a5bb6f90b734bf0c00516c2c9618efd124f52af2b
BLAKE2b-256 checksum
How to use checksums
00daa971c686e3c88f5ecd979ccbbad7b026bee3b2ee076a381defce347fc98e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page