Agents that work.
Orchestration you control.
Run the coding agents and models you already use, compose them into parallel fan-outs and dependency-aware flows, and keep every run inspectable, resumable, and under your control.
- Python 3.10+
- CLI and SDK
- Apache-2.0
# install once
$ pip install lionagi
# one durable agent turn
$ li agent claude/sonnet \
"Map the risks in this change"
# a planned DAG of specialists
$ li o flow codex/gpt-5.5 \
"Audit auth and propose fixes" --cwd . Start where you work
One system, three useful surfaces.
Use the terminal for direct work, Python for application control, and Studio for live operations.
li Command line
Start one agent, fan out independent workers, or ask an orchestrator to plan a DAG.
Run your first flowBranch Python SDK
Build stateful model interactions with typed output, tools, providers, and explicit graph execution.
Meet the core APIlocal :8765 Lion Studio
See active agents, schedules, execution graphs, artifacts, and run history in one local-first cockpit.
Open StudioScale with intent
Use exactly as much structure as the task needs.
Each lane adds a capability without replacing the one before it.
Choose the right surface- 01
li agentOne focused branchAsk, act, inspect, and resume. The smallest useful unit of agent work.
- 02
li o fanoutIndependent workersSplit one task across parallel workers, then optionally synthesize their results.
- 03
li o flowDependency-aware DAGLet an orchestrator plan specialist work while the engine resolves dependencies.
- 04
li scheduleDurable operationsPromote repeatable work into playbooks, schedules, monitored runs, and Studio workflows.
A Python API that stays Python
Typed results without hiding the loop.
A Branch owns conversation state, tools, and model configuration. operate() adds tool use and structured output; Session coordinates branches when the work becomes a graph.
from pydantic import BaseModel
from lionagi import Branch
class Assessment(BaseModel):
risk: str
reasons: list[str]
branch = Branch(
chat_model="codex/gpt-5.5",
system="You are a careful reviewer.",
)
result = await branch.operate(
instruction="Assess this change.",
response_format=Assessment,
) Trust comes from visibility
Control is a feature, not an afterthought.
Typed, inspectable state
Branches, messages, operations, and graphs are explicit objects—not state hidden inside a chain.
Understand BranchRuns that survive the terminal
Run records, branch snapshots, artifacts, monitoring, and resume are built into the CLI path.
Learn durable runsGoverned tool execution
Permission policies, guard hooks, and isolated git worktrees put boundaries around agent actions.
Configure an agentProviders without lock-in
API models and coding-agent CLIs share one model-service boundary and compose in the same flow.
Browse providersCopy, run, adapt
Start with real work.
Audit a codebase in parallel
Fan out focused reviewers and keep their findings independent.
↗ ResearchSynthesize across workers
Gather multiple perspectives, then consolidate them into one result.
↗ OperationsRun long work in the background
Detach a flow, monitor its durable state, and resume any branch later.
↗Your next run can be durable