# A runtime for autonomous organizations.

AgentLane is an open-source Python runtime for systems of agents with distinct responsibilities. Agents exchange work through addressed messages, across harnesses, processes, and machines.

Identity, messaging, state, delegation, and execution.
The model, interface, and infrastructure are application choices.

uv add agentlane
quickstart ↓

## The idea

An organization divides work among participants with different responsibilities. A coordinator assigns tasks. Specialists investigate or implement. Services perform deterministic operations. People review decisions that require their authority.

AgentLane applies that structure to agent systems. Each agent has an identity, an address, an inbox, and state of its own. Some agents hold ongoing responsibilities; others exist for one assignment. They communicate through explicit messages and return results to whoever requested the work.

The goal is an organization whose participants can use different models, harnesses, and infrastructure. A local assistant, a cloud worker, and an external coding agent can contribute to the same system. AgentLane provides the common primitives; the application defines how the organization operates.

Distributed agents and organizations ↗

responsibility

What each participant owns.

addressing

How work reaches a participant.

delegation

How participants divide work and return results.

execution

Which harness and worker perform the task.

oversight

What people can inspect and approve.
engineering.exampleillustrative activity
[email ↔ support][api ↔ operations][slack ↔ director]
org.directorsetting priorities
owns objectives, priorities, and escalations
  • org.engineeringmaintaining the product
    owns product delivery and code quality
    engineer · three copies · one incident
    copy.01available
    copy.02available
    copy.03available
  • org.operationsmonitoring production
    owns availability and incident response
  • org.supportwatching the inbox
    owns customer issues and follow-through
02:13 · scheduled checks → org.operations

Night shift. Monitoring and inboxes remain active.

## Applications of the runtime

The runtime supports local harnesses, distributed services, bots, and organizations of agents. The interface, deployment, model provider, and telemetry destination are independent choices.

### Autonomous organizations

Agents with ongoing responsibilities, temporary specialists, and deterministic services connected through addressed messages. Work can be delegated across runtimes, with results returned to the agent that requested it.

The application defines objectives, tools, permissions, and human review.

Distributed agents ↗

### Local coding harnesses

A terminal or desktop application with a TypeScript interface and a Python agent backend. The process bridge carries prompts, streamed text, tool activity, plans, and approval requests between them.

The application owns the interface, model configuration, and local process.

Process bridge ↗

### Self-hosted cloud agents

Agents and specialist workers running in your own cloud. The runtime handles addressed delivery and worker routing; tracing processors export spans and metrics to your telemetry systems.

Local and distributed runtimes use the same communication model.

Distributed runtime ↗

### Bots and agent applications

An assistant behind a chat interface, a webhook, or an application API. Incoming requests can reach an addressed agent, which can call tools, delegate work, and return results through the application.

Channel integrations and application behavior are defined in your code.

Agent harness ↗

## Quickstart

Two Markdown definitions, bound to a distributed runtime. The coordinator delegates to the analyst as an addressed agent and uses the returned result in its own response.

Python 3.12, with OPENAI_API_KEY set in the environment.

### 1. Install

uv add agentlane

### 2. Define the agents

markdowncoordinator.md
---
name: coordinator
description: Coordinates release reviews.
---

Delegate risk analysis to the analyst.
Use its findings to summarize the review.
markdownanalyst.md
---
name: analyst
description: Reviews release plans for risks.
model: inherit
---

Identify failure cases and missing checks.
Return a short analysis to the coordinator.

### 3. Start the runtime

pythonagent.py
import asyncio
import os

from agentlane_openai import ResponsesClient
from agentlane.harness.agents import DefaultAgent
from agentlane.models import Config
from agentlane.runtime import distributed_runtime

model = ResponsesClient(
    config=Config(
        api_key=os.environ["OPENAI_API_KEY"],
        model="gpt-5.4-mini",
    ),
)

async def main():
    async with distributed_runtime() as runtime:
        lead = DefaultAgent.from_markdown(
            "coordinator.md",
            model=model,
            subagents=["analyst.md"],
            runtime=runtime,
        )
        result = await lead.run(
            "Ask the analyst to review this plan: "
            "deploy on Friday without a rollback test."
        )
        print(result.final_output)

asyncio.run(main())
uv run agent.py

The analyst inherits the coordinator’s model. Specialist execution can move to a separate worker using the same addressing model.

Quickstart documentation ↗

## Harnesses

AgentLane includes a complete agent harness that you can use out of the box to build powerful agents. It brings together model calls, tools, streaming, state, skills, and delegation, and manages the execution loop for you.

The runtime connects these agents and routes work between them. It can also route work to another harness or a deterministic service. Your AgentLane agents can delegate work to those participants and use the results in their own runs.

### Delegate work to Claude Code or another harness

An AgentLane agent can delegate a task to the Claude Agent SDK and use the returned text in its own run. The adapter binds Claude to an AgentLane address; the result comes back through the delivery call.

Each addressed message starts a fresh SDK session. SDK options configure tools and execution limits. Other harnesses can be integrated through the same Task abstraction; additional adapters are planned.

Install the optional Claude integration and authenticate Claude Code before you run this example. See the complete coworker example below for setup steps.

uv add "agentlane[claude-agent-sdk]"
pythonExisting runtime + lead agent
from agentlane_claude_agent_sdk import ClaudeAgent
from agentlane.messaging import AgentId, DeliveryStatus

claude = AgentId.from_values("claude-sdk", "analyst")
ClaudeAgent.bind(runtime, claude)

outcome = await runtime.send_message(
    "Review this plan for missing rollback steps.",
    sender=lead.agent_id,
    recipient=claude,
)
if outcome.status != DeliveryStatus.DELIVERED:
    raise RuntimeError("Claude task failed")

result = await lead.run(
    f"Summarize this review: {outcome.response_payload}"
)
Complete coworker example ↗

### Agent harness

Model loops, tools, streaming, state, skills, handoffs, and specialist delegation. The harness uses the runtime for communication.

Harness architecture ↗

### Tracing

Runtime, model, and application spans share a tracing API. Custom processors export events and metrics to an application’s own systems.

Tracing documentation ↗

## Source, documentation, and examples