An event-based runtime and messaging framework for AI agents.
Project description
AgentLane
AgentLane is a runtime-first orchestration layer for building reliable, inspectable, production AI agents and workflows workflows.
It is designed for systems where agent behavior needs to be explicit, structured, testable, and operable — especially in serious domains like healthcare where opaque prompt chains and autonomous demo loops are not enough.
AgentLane helps you turn fragile prompt/tool chains into workflows with clear runtime boundaries: long-lived agents, addressed messaging, structured model interactions, tool execution, handoffs, pub/sub flows, and a path from local development to distributed runtime execution.
Most agent frameworks start with the agent loop.
AgentLane starts one layer lower: with runtime, identity, and addressed messaging.
That makes it useful when you want to build AI workflows that are easier to inspect, test, route, scale, and operate.
AgentLane gives you three layers that can be used together or independently:
agentlane.runtime— delivery, routing, scheduling, pub/sub, and agent identityagentlane.models— prompts, schemas, tools, structured outputs, and model clientsagentlane.harness— agent loops, tool execution, handoffs, and high-level agents
╔════════════════════════════════════════════════════════════════════════════════════╗
║ ║
║ █████╗ ██████╗ ███████╗███╗ ██╗████████╗██╗ █████╗ ███╗ ██╗███████╗ ║
║ ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝██║ ██╔══██╗████╗ ██║██╔════╝ ║
║ ███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ ██║ ███████║██╔██╗ ██║█████╗ ║
║ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ██║ ██╔══██║██║╚██╗██║██╔══╝ ║
║ ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ███████╗██║ ██║██║ ╚████║███████╗ ║
║ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ║
║ ║
║ reliable, inspectable AI agent workflows ║
║ ║
║ runtime • messaging • model primitives • harness ║
║ ║
║ from local agents → distributed agent systems ║
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
Why AgentLane?
Many agent systems start as a prompt, a few tools, and a loop.
That works for demos. But production systems usually need more structure:
- stable agent identity across turns and tasks
- explicit message routing instead of hidden in-process calls
- background specialists that can run independently
- fan-out, fan-in, and pub/sub workflows
- bounded handoffs between agents and tools
- structured model calls that can be tested and reused
- a path from local execution to distributed workers
- runtime behavior that application code can reason about
AgentLane lets you start with simple local agents, then grow into addressed services, background workers, and multi-agent workflows without changing the core communication model.
What AgentLane is
AgentLane is a framework for building AI systems as explicit workflows of addressed agents, model calls, tools, messages, and handoffs.
It is useful when you care about runtime behavior: who receives work, where state lives, how messages are routed, how agents coordinate, and how a local prototype can evolve into a distributed system.
AgentLane is designed for builders who want production AI workflows to be:
- Reliable — agent execution should be structured enough to reason about, test, and debug.
- Inspectable — important behavior should be visible through explicit messages, tools, handoffs, and runtime boundaries.
- Composable — agents, model calls, tools, and services should be reusable building blocks.
- Operable — workflows should have a path from local development to long-running services and distributed workers.
- Bounded — agent autonomy should live inside application-controlled orchestration, not behind an opaque loop.
What AgentLane is not
AgentLane is not a single autonomous agent loop.
It does not try to hide application architecture behind a provider-owned abstraction. The goal is to keep orchestration, routing, and workflow design in application code, where they can be inspected, tested, and evolved.
Serious domains need serious agent infrastructure
In low-stakes demos, it may be enough to let an LLM call tools in a loop until it produces a plausible result.
In serious domains — healthcare, finance, compliance, operations, infrastructure, or any product where users rely on the system — agent behavior needs stronger guarantees.
You often need to know:
- which agent or service handled a task
- what messages were exchanged
- which tools were called
- where state was stored
- how work was delegated
- where a human should review or intervene
- how the workflow can be reproduced, tested, and improved
AgentLane is built around that worldview: production agents should be explicit systems, not invisible loops.
When to use AgentLane
Use AgentLane when you are building AI systems that need one or more of:
- local agents with tools, delegation, handoffs, or resumable runs
- long-lived agents or services with stable identities
- explicit routing between agents, tools, and background workers
- fan-out, fan-in, or pub/sub workflows
- structured model calls with schemas, tools, and provider adapters
- a path from local development to distributed execution
- application-level control instead of provider-owned orchestration
AgentLane is especially useful when the agent workflow is part of the product architecture, not just a wrapper around a model call.
Design principles
- Runtime first — agent behavior should be part of the application runtime, not hidden inside a black-box loop.
- Addressable by default — agents and services should have stable identities that can receive messages directly.
- Composable layers — use the runtime, model primitives, or harness independently when needed.
- Provider-thin — keep orchestration in application code instead of outsourcing it to a model provider.
- Local to distributed — start in one process and preserve the same communication model as the system grows.
- Explicit over magical — prefer inspectable workflows, messages, tools, and handoffs over implicit control flow.
- Human-compatible — design workflows so humans can review, intervene, and understand what happened when needed.
Installation
Install AgentLane with uv:
uv add agentlane
If you are trying the repository directly instead:
uv sync --all-extras
Quick Start
The harness gives you a simple agent interface when you want one, while still letting you drop down into explicit runtime and messaging primitives as your system grows.
After installing the package, define an agent against your model client:
from agentlane.harness import AgentDescriptor
from agentlane.harness.agents import DefaultAgent
class CareNavigationAgent(DefaultAgent):
descriptor = AgentDescriptor(
name="Care Navigation",
model=model,
instructions="You are a concise patient care navigation agent.",
)
agent = CareNavigationAgent()
result = await agent.run("I feel dizzy after starting a new medication. What should I do first?")
This is the simplest entry point.
For workflows that need explicit routing, background specialists, pub/sub, or distributed execution, use the runtime layer directly.
Repository examples
If you are running from a repository checkout, run one runtime example:
uv run python examples/runtime/multi_agent_workflow/main.py
Run one high-level harness example with a real model:
OPENAI_API_KEY=sk-... uv run python examples/harness/default_agent_quickstart/main.py
The runtime example shows explicit message passing.
Choose the layer you need
Runtime
Use the runtime when agent identity, message routing, pub/sub, scheduling, or distributed execution are part of your application design.
Start here:
Models
Use the models layer when you want reusable prompt templates, schemas, structured outputs, tools, or provider clients without adopting the full agent harness.
Start here:
Harness
Use the harness when you want high-level agents, reusable loops, tool execution, handoffs, or agent-as-tool patterns on top of the lower-level primitives.
Start here:
Documentation
Use the documentation index for the full docs tree:
Origins
AgentLane was initially inspired by Microsoft AutoGen, but takes a runtime-first approach focused on addressed messaging, explicit orchestration, and local-to-distributed execution.
Development
Format, lint, and test:
/usr/bin/make format
/usr/bin/make lint
/usr/bin/make tests
Run one test with:
uv run pytest -s -k <test_name>
Contributing
- Keep changes small and focused.
- Add or update tests when behavior changes.
- Update public docs and examples when the developer-facing surface changes.
- Ensure formatting, linting, and tests pass before opening a PR.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentlane-0.8.0.tar.gz.
File metadata
- Download URL: agentlane-0.8.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68d43ceceba3733ef231d923f2d44896949c25338c081600af9cbc1085b66e53
|
|
| MD5 |
c444bd8b8131a1b0c4a6229b1e47af80
|
|
| BLAKE2b-256 |
848f0c08effccf5a168b79f6bad32975f2f9cd4359c0302f88ce89410b362e46
|
Provenance
The following attestation bundles were made for agentlane-0.8.0.tar.gz:
Publisher:
pypi-publish.yml on yasik/agentlane
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentlane-0.8.0.tar.gz -
Subject digest:
68d43ceceba3733ef231d923f2d44896949c25338c081600af9cbc1085b66e53 - Sigstore transparency entry: 1429588020
- Sigstore integration time:
-
Permalink:
yasik/agentlane@7f5f0a6a30713351eff15582a7c2c3d671bab338 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/yasik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7f5f0a6a30713351eff15582a7c2c3d671bab338 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentlane-0.8.0-py3-none-any.whl.
File metadata
- Download URL: agentlane-0.8.0-py3-none-any.whl
- Upload date:
- Size: 237.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c604eac035fc7aaf068fd8527230875865da238ad387c9a5879120d8bfa5c8e
|
|
| MD5 |
9bc196dbf1485971afc56d3ff7f1ad97
|
|
| BLAKE2b-256 |
6769be89821d23f91e800c797918b1be5505f500f5efb04617c0942b399ab799
|
Provenance
The following attestation bundles were made for agentlane-0.8.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on yasik/agentlane
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentlane-0.8.0-py3-none-any.whl -
Subject digest:
5c604eac035fc7aaf068fd8527230875865da238ad387c9a5879120d8bfa5c8e - Sigstore transparency entry: 1429588046
- Sigstore integration time:
-
Permalink:
yasik/agentlane@7f5f0a6a30713351eff15582a7c2c3d671bab338 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/yasik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7f5f0a6a30713351eff15582a7c2c3d671bab338 -
Trigger Event:
release
-
Statement type: