Observed since 20 Oct, 22:33 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Vendor-agnostic agent framework abstraction layer - Terraform for AI Agents
Vendor-agnostic agent framework abstraction layer — Terraform for AI Agents.
Switch between AI agent frameworks (LangGraph, AutoGen, CrewAI, Google ADK, AWS Strands, Microsoft Agent Framework) with minimal configuration changes. AgentLegatus provides a unified API, a Roman military hierarchy for orchestrating multi-agent workflows, and built-in benchmarking to compare providers side by side.
# Install core
pip install -e .
# Install with all optional backends
pip install -e ".[all]"
import asyncio
from agentlegatus.core.event_bus import EventBus
from agentlegatus.core.executor import WorkflowExecutor
from agentlegatus.core.state import InMemoryStateBackend, StateManager
from agentlegatus.core.workflow import (
ExecutionStrategy, WorkflowDefinition, WorkflowStep,
)
from agentlegatus.hierarchy.legatus import Legatus
from agentlegatus.providers.mock import MockProvider
from agentlegatus.tools.registry import ToolRegistry
async def main():
event_bus = EventBus()
state_manager = StateManager(InMemoryStateBackend(), event_bus=event_bus)
provider = MockProvider(config={})
executor = WorkflowExecutor(provider, state_manager, ToolRegistry(), event_bus)
workflow = WorkflowDefinition(
workflow_id="hello",
name="Hello Workflow",
version="1.0.0",
provider="mock",
execution_strategy=ExecutionStrategy.SEQUENTIAL,
steps=[
WorkflowStep(step_id="greet", step_type="agent", config={"agent_id": "greeter"}),
],
)
legatus = Legatus(config={}, event_bus=event_bus)
result = await legatus.execute_workflow(workflow, executor=executor, state_manager=state_manager)
print(f"Status: {result.status.value}, Time: {result.execution_time:.3f}s")
asyncio.run(main())
legatus init --provider mock
legatus apply workflow.yaml
legatus apply workflow.yaml --dry-run
legatus plan workflow.yaml
legatus benchmark workflow.yaml --providers mock,langgraph --iterations 5
legatus switch langgraph
legatus providers
legatus status <workflow-id>
legatus cancel <workflow-id>
CLI (legatus)
└── Legatus (Orchestrator)
├── EventBus ──► Observability (OpenTelemetry, Prometheus)
├── StateManager (in-memory / Redis / Postgres)
└── Centurion (Workflow Controller)
├── Sequential / Parallel / Conditional execution
└── Cohort (Agent Group)
└── Agent (Worker)
├── ToolRegistry
└── MemoryManager
BaseProvider interface with runtime switching and state migration via Portable Execution GraphsEventBus with subscription, history, correlation/trace ID propagationpip install -e ".[langgraph]" # LangGraph provider
pip install -e ".[redis]" # Redis state/memory backend
pip install -e ".[postgres]" # Postgres state backend
pip install -e ".[vector]" # ChromaDB vector memory
pip install -e ".[observability]" # OpenTelemetry + Prometheus + structlog
pip install -e ".[dev]" # black, ruff, mypy, isort
pip install -e ".[test]" # pytest, hypothesis, coverage
AgentLegatus supports YAML/JSON config files with environment variable overrides:
default_provider: mock
providers:
- name: mock
- name: openai
api_key: ${OPENAI_API_KEY}
state:
backend: memory
memory:
backend: memory
observability:
enable_tracing: false
enable_prometheus: false
Load via code or CLI:
from agentlegatus.config.loader import ConfigLoader
config = ConfigLoader.load("agentlegatus.yaml")
See the examples/ directory:
| File | Description |
|---|---|
basic_workflow.py | Sequential workflow execution |
provider_switching.py | Runtime provider switching with state preservation |
benchmark.py | Cross-provider benchmarking |
event_monitoring.py | Event subscription and real-time monitoring |
custom_tools.py | Tool creation and registration |
state_management.py | State operations, snapshots, and restore |
# Install dev + test dependencies
pip install -e ".[dev,test]"
# Run all tests (936 tests, 88% coverage)
pytest
# Run by category
pytest tests/unit/
pytest tests/integration/
pytest tests/property/
# Coverage report
pytest --cov=agentlegatus --cov-report=html
# Linting
ruff check agentlegatus/
black --check agentlegatus/
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 6 Apr 2026 | 24 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:33 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:fef05cbe85c1fd29249c9a8a6a6b466419d69f4844a12b190d04b923b31eabac