Open source · Apache-2.0 · building since 2023

Orchestrate fleets of agents. Own every step.

lionagi is a framework for governed multi-agent orchestration: a Python library and the li CLI for building, running, and observing agent systems. API models and coding CLIs, one graph.

Language InterOperable Networked Automated General Intelligence · the name since 2023

lionagi · zsh
$
2K+GitHub stars
3coding CLIs as agents
8+model providers
2023building since
01 · Why lionagi

Orchestration you can inspect, persist, and replay.

01

Own the loop

No hidden prompt chains. Every operation is an explicit, typed step. Inspect it, persist it, replay it.

02

Coding CLIs are agents too

Claude Code, Codex, and Gemini CLI run as first-class agents alongside API models. Same graph, same observability.

03

Durable by default

Every run writes a manifest, branch snapshots, and live streams to disk. li monitor shows what your fleet is doing right now.

04

Real orchestration primitives

Parallel fanout with synthesis, DAG flows with reactive expansion, schedules with chaining. Composable, not magical.

05

Governance built in

Permission policies, guard hooks, path restrictions, sandboxed worktrees. Agents get capabilities, not root.

06

Structured output that holds

Pydantic response formats with fuzzy parsing for imperfect model JSON. Typed results you can build on.

02 · python api

A Branch is a conversation you control.

One surface from a single chat turn to a DAG of operations. Structured output lands as Pydantic models; tool calls, streams, and state live on the branch, so nothing is hidden in a runtime you can't read.

Read the docs
branch.py
from lionagi import Branch, iModel
from pydantic import BaseModel

class Assessment(BaseModel):
    risk: str
    rationale: str

branch = Branch(chat_model=iModel(
    provider="anthropic", model="claude-sonnet-5",
))
result = await branch.operate(
    instruction="Rank this design by failure risk",
    response_format=Assessment,
)
04 · maintainer

Ocean (Haiyang Li)

Creator of LionAGI and former AG2/AutoGen maintainer. I've built the orchestration frameworks, inference infrastructure, MCP tooling, and verification systems that these reviews draw from.

From debugging agent loops to architecting multi-agent orchestration to building MCP servers in Rust: the sessions are based on patterns from systems I have built and shipped.

Work with the maintainer

Architecture reviews, working sessions, and team training on agent systems, from the person who builds this stack every day.

Consulting & booking