Skip to content
Agent Orchestration
MCP

search

Ships with lionagi: lionagi is a governed multi-agent orchestration framework. Build agent workflows in Python with typed, inspectable state, or run them straight from the terminal with the li CLI:…

From plugin
lionagi
41312 skills2 agents1 MCP

Claude Code

> /plugin marketplace add ohdearquant/lionagi
> /plugin install orchestrate@lionagi

Security report

Info

Not enough data

  • Known flaws

    Not published

  • Signed build

    Not published

  • Maintained

    Nov 18, 2026

    Last push

  • Licence

    Apache-2.0

  • Runs as

    Local process

    On your machine

  • Deprecated

    Not published

Signals from public registries, not an audit. Checked Nov 20, 2026.

lionagi README

PyPI - Version PyPI - Downloads Python Version codecov

lionagi

lionagi is a governed multi-agent orchestration framework. Build agent workflows in Python with typed, inspectable state, or run them straight from the terminal with the li CLI: single agents, parallel fan-outs, and DAG flows where an orchestrator plans specialist workers. Built continuously since 2023.

Direction. lionagi's underlying architecture is migrating towards lion1, the runtime kept in the lion1/ directory of this repository until the migration completes, while lionagi stays the package you install and import. The migration is backward compatible: public imports, supported call shapes and return types stay as they are, and new capabilities arrive as additions. Removing a public name or behavior, or changing what a default install can do, needs its own versioned compatibility decision. lionagi v1.0 is planned for around the end of October 2026. The roadmap sets out the seven steps and the compatibility terms, and ADR-0125 records the decision.

Docs | How lionagi Compares | Discord | PyPI | Changelog

Demo

Lion Studio walkthrough (13 min): inspecting runs, checking agent claims against actual output, and launching work with approval gates. Built on lionagi, runs locally.

Quick start

pip install lionagi

# one agent
li agent claude/sonnet "Explain the observer pattern in 3 sentences"

# three workers in parallel, then a synthesis pass
li o fanout claude/sonnet "Identify code smells in this codebase" -n 3 --with-synthesis

# an orchestrator plans a DAG of specialists; workers run as dependencies resolve
li o flow claude/sonnet "Audit the auth module for security issues" --cwd .

CLI model aliases (claude, codex, ...) spawn the provider's own CLI as a subprocess, so an existing claude login subscription works with no API key. API providers take the usual environment keys (OPENAI_API_KEY, ...). Details in Providers.

The same engine from Python, with structured output as a first-class result:

import asyncio
from pydantic import BaseModel
from lionagi import Branch

class Assessment(BaseModel):
    risk: str
    reasons: list[str]

async def main():
    b = Branch(chat_model="codex/gpt-5.5", system="You are a careful reviewer.")
    result = await b.operate(
        instruction="Assess the risk of enabling auto-merge on this repository.",
        response_format=Assessment,
    )
    print(result.risk, result.reasons)

asyncio.run(main())

Why lionagi

  • You own the loop. Branches, sessions, and flows are ordinary Python objects and CLI commands. There is no framework runtime to surrender control to, and no hidden prompt assembly between you and the model.
  • Typed, inspectable state. Every conversation is a collection of typed messages with an explicit ordering. State serializes, persists, and resumes; it is never an opaque blob inside a chain.
  • CLI agents are first-class endpoints. Claude Code, Codex, and other coding CLIs sit in the same orchestration graph as API models, so subscription-based agents and API calls compose in one flow.
  • Durable runs. Every run persists under ~/.lionagi/runs/. Resume any branch with li agent -r, reattach with -c, watch live work with li monitor, and schedule recurring runs with li schedule.
  • Governance built in. Permission policies per tool call, guard hooks that block destructive commands and off-limits paths, and git-worktree sandboxing for speculative edits that never touch your branch until you merge them.

For the architecture-level comparison with LangChain / LangGraph (and a field matrix covering LlamaIndex and AG2), see How lionagi Compares.

Concepts

TermWhat it is
BranchSingle conversation thread — message history, tools, model config. Primary API surface.
SessionCoordinates multiple Branches; runs DAG workflows across them.
flowli o flow — orchestrator plans a DAG, workers execute with dependency edges resolved.
teamPersistent inbox messaging between agents via li team send/receive.
operatebranch.operate(instruction=…) — tool use + structured output + optional streaming.
persistEvery run saved to ~/.lionagi/runs/{run_id}/. Resume with li agent -r <branch-id>.

The li CLI

# Single agent, resumable
li agent claude/sonnet "Explain the observer pattern in 3 sentences"
li agent -r <branch-id> "follow up on your findings"

# Fan-out: N workers in parallel, optional synthesis
li o fanout claude/sonnet "Identify code smells in this codebase" -n 3 --with-synthesis

# DAG flow: orchestrator plans agents with dependency edges
li o flow claude/sonnet "Audit the auth module for security issues" --cwd .

# Playbook: parametric flow spec at ~/.lionagi/playbooks/audit.playbook.yaml
li play audit --mode security "the auth service"

# Team messaging: inbox coordination between agents
li team create "review" && li team send "Start analysis" -t <id> --to analyst

# Observe and operate
li monitor --since 1h              # live and recent sessions, flows, plays
li schedule create ...             # cron / interval / repo-event triggers
li kill <id>                       # stop a running session or invocation

# Time-bounded run: injects a [DEADLINE] preamble so the agent paces itself
li agent claude/sonnet --timeout 300 "Audit the auth module and produce a summary"

Every command and flag: CLI Reference. Installable playbook and skill templates: examples/.

Python API

Chat

from lionagi import Branch

b = Branch(chat_model="openai/gpt-5.4", system="You are a concise assistant.")
reply = await b.communicate("What causes rainbows?")

Structured output

from pydantic import BaseModel

class Summary(BaseModel):
    points: list[str]
    confidence: float

result = await b.operate(instruction="Summarize this text.", response_format=Summary)

Tools + ReAct

from lionhub.tools.types import ReaderTool

branch = Branch(tools=[ReaderTool])
result = await branch.ReAct(
    instruct={"instruction": "Summarize /path/to/paper.pdf"},
)

Full reference → docs/api/

Lion Studio

Lion Studio is the built-in web UI for operating your agent workflows: projects, schedules, playbooks, execution DAGs, and run inspection in one place.

Lion Studio — Mission Control: live agents, completion pulse, and run history

No download or build required. Lion Studio is a client-side web app: li studio starts your local daemon and opens lion-studio.khive.ai paired with it, and the page talks to the daemon at http://127.0.0.1:8765. Your data never leaves your machine; the hosted page is just the UI. Available in 16 languages: English, 中文, Español, Français, हिन्दी, বাংলা, Deutsch, Bahasa Indonesia, Português (Brasil), 한국어, Türkçe, اردو, Tiếng Việt, العربية, Русский, and 日本語 — with full right-to-left support.

li studio             # default: starts the local daemon and opens
                      # https://lion-studio.khive.ai — nothing is built locally
li studio --docker    # self-contained: auto-pulls ghcr.io/ohdearquant/lion-studio
                      # UI + API → http://127.0.0.1:8765 (published on --host)
li studio --no-frontend  # backend API only, no UI
li studio --dev       # from a source checkout: backend + in-repo frontend, hot reload

--web, --docker, --no-frontend, and --dev are mutually exclusive; --web is the default when no flag is given. Pass --no-open to skip auto-opening the hosted UI in your browser; li studio then prints a one-time link to open instead.

Providers

CLI aliases spawn subprocess tools, not REST API calls:

  • claude: install Claude Code CLI → claude login (subscription) or export ANTHROPIC_API_KEY=sk-ant-...
  • codex: requires ChatGPT Plus/Pro → npm install -g @openai/codex → codex login
  • deepseek: export DEEPSEEK_API_KEY=sk-...
  • pi: install Pi Code CLI
  • Python API (iModel, Branch): export OPENAI_API_KEY=sk-... for the default model

API-endpoint providers (OpenAI, Anthropic, Gemini, Ollama, NVIDIA NIM, Perplexity, Groq, OpenRouter): Providers reference.

Docs

Getting StartedInstall, first flow, API key setup
RuVector memoryOptional native retrieval, branch memory and tools
ConceptsBranch, Session, flow, team, operate, persist
How lionagi ComparesArchitecture-level comparison with LangChain / LangGraph
CLI Referenceli agent, li o fanout, li o flow, li team — all flags
Cookbook5 runnable scenarios: codebase audit, research synthesis, multi-model pipeline, team coordination, resumable background run
API Referencebranch.operate, branch.ReAct, iModel, Session
Architecture (DeepWiki)Auto-generated architecture walkthrough
RoadmapMigration towards lion1, compatibility terms, v1.0 target
ContributingDev setup, PR workflow

Optional Extras

uv add "lionagi[mcp]"       # MCP server support
uv add "lionagi[ollama]"    # Local models via Ollama
uv add "lionagi[rich]"      # Rich terminal output
uv add "lionagi[graph]"     # networkx export (drawing also needs matplotlib)
uv add "lionagi[postgres]"  # PostgreSQL persistence
uv add "lionagi[ruvector]"  # Native vector memory and retrieval (RuVector)
uv add "lionagi[all]"       # Everything

Agents that need memory across sessions can use khive, a hosted memory and knowledge graph served over MCP: https://khive.ai/?utm_source=github&utm_campaign=lionagi-readme

Claude Code Marketplace

Installable Claude Code plugins for the lionagi agent runtime — structured show runs, memory management, playbook authoring, developer tooling, and multi-agent orchestration:

claude /plugin marketplace add ohdearquant/lionagi

Full plugin list: marketplace/README.md.

Community

Citation

@software{Li_LionAGI_2023,
  author = {Haiyang Li},
  year   = {2023},
  title  = {LionAGI: Towards Automated General Intelligence},
  url    = {https://github.com/ohdearquant/lionagi},
}
@ohdearquant
Ships withlionagi
41312 skills2 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
413
Star history of ohdearquant/lionagi on GitHub, a chart by star-history.com

More MCP servers from other plugins.

orca-component-fixtures

orca-component-fixture…

MCP

Ships with orca: Orca lets you run a fleet of coding agents (e.g. Claude Code, Codex) with your own subscription. Available on…

orca6d124k
@stablyai@stablyaiInstall MCP
paperclip

paperclip

MCP

Ships with paperclip: Open-source orchestration for teams of AI agents. If OpenClaw is an employee, Paperclip is the company.…

paperclip7d113k
@paperclipai@paperclipaiInstall MCP
ruflo

ruflo

MCP

Ships with claude-flow: 📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves A 14-chapter guide: from…

@ruvnet@ruvnetInstall MCP
t

t

MCP

Ships with oh-my-claudecode: For Codex users: Check out oh-my-codex — the same orchestration experience for OpenAI Codex CLI.…

Questions about search.

Which coding agents can use search?
search works in any agent that reads an MCP config file: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf. Each agent reads it from its own file; this page names the file for each one.
How do I add search to Claude Code?
Run these in order, one at a time. 1. In Claude Code: /plugin marketplace add ohdearquant/lionagi 2. In Claude Code: /plugin install orchestrate@lionagi