{"id":50076149,"url":"https://github.com/ohdearquant/lionagi","last_synced_at":"2026-05-31T04:01:10.073Z","repository":{"id":205436140,"uuid":"705957157","full_name":"ohdearquant/lionagi","owner":"ohdearquant","description":"An intelligence orchestra","archived":false,"fork":false,"pushed_at":"2026-05-27T22:34:55.000Z","size":42615,"stargazers_count":398,"open_issues_count":49,"forks_count":76,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-05-27T23:10:48.978Z","etag":null,"topics":["agents","ai","automation","data","llm","machine-learning","workflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohdearquant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["lion-agi"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2023-10-17T03:10:02.000Z","updated_at":"2026-05-27T07:37:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8e3c6c2-8e0e-433e-bc7c-31f796f3afac","html_url":"https://github.com/ohdearquant/lionagi","commit_stats":null,"previous_names":["lion-agi/lionagi","khive-ai/lionagi","ohdearquant/lionagi"],"tags_count":220,"template":false,"template_full_name":null,"purl":"pkg:github/ohdearquant/lionagi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohdearquant%2Flionagi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohdearquant%2Flionagi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohdearquant%2Flionagi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohdearquant%2Flionagi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohdearquant","download_url":"https://codeload.github.com/ohdearquant/lionagi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohdearquant%2Flionagi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33718446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","ai","automation","data","llm","machine-learning","workflow"],"created_at":"2026-05-22T07:16:07.449Z","updated_at":"2026-05-31T04:01:10.067Z","avatar_url":"https://github.com/ohdearquant.png","language":"Python","funding_links":["https://github.com/sponsors/lion-agi"],"categories":["Python"],"sub_categories":[],"readme":"\n![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa\u0026color=231fc935)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/lionagi?color=blue)\n![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)\n[![codecov](https://codecov.io/github/ohdearquant/lionagi/graph/badge.svg?token=FAE47FY26T)](https://codecov.io/github/ohdearquant/lionagi)\n\n# lionagi\n\nOrchestrate multi-agent AI workflows from the command line or Python.\n\n[Docs](https://ohdearquant.github.io/lionagi/) |\n[Discord](https://discord.gg/JDj9ENhUE8) |\n[PyPI](https://pypi.org/project/lionagi/) |\n[Changelog](CHANGELOG.md)\n\n## Lion Studio\n\n![Lion Studio — run detail with execution DAG, branches, and multi-agent orchestration](assets/studio.png)\n\nLion Studio is the built-in web UI for managing and operating your agent workflows. Projects, schedules, playbooks, shows, and runs — all in one place.\n\n```bash\npip install lionagi\n\n# Option 1: Docker (recommended — one command, no Node.js needed)\nli studio                       # auto-pulls ghcr.io/ohdearquant/lion-studio\n                                # UI → http://localhost:3000  API → http://localhost:8765\n\n# Option 2: From source (for development)\ngit clone https://github.com/ohdearquant/lionagi.git \u0026\u0026 cd lionagi\npip install \".[studio]\"\nli studio --dev                 # starts backend + frontend with hot reload\n```\n\n## What's New in 0.26\n\n- **Lion Studio** — web UI for orchestrating agent workflows: projects, scheduled runs, execution DAGs, branch inspection, and multi-agent monitoring.\n- **Project management (ADR-0026)** — per-repo `.lionagi/config.toml` for project identity. Sessions auto-group by project. `--project NAME` flag on all CLI commands.\n- **Scheduled runs (ADR-0027)** — cron, interval, and GitHub-poll triggers with DAG-based conditional chains (`on_fail`/`on_success`). Studio becomes an active operator, not just a monitor.\n- **Agent infrastructure** — `AgentConfig` presets (`.coding()`, `.research()`) with built-in permission policies, hooks, and tool registration via `create_agent()`.\n- **Sandbox tool** — `SandboxSession` uses git worktrees for isolated editing: `create()` → edit → `diff()` → `commit()` → `merge()` or `discard()`.\n\n## Install\n\n```bash\npip install lionagi\n```\n\n**CLI provider auth** — CLI aliases spawn subprocess tools, not REST API calls:\n\n- `claude`: install [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) → `claude login` (subscription) or `export ANTHROPIC_API_KEY=sk-ant-...` (API key)\n- `codex`: requires ChatGPT Plus/Pro → `npm install -g @openai/codex` → `codex login`\n- `deepseek`: `export DEEPSEEK_API_KEY=sk-...` for DeepSeek models\n- `pi`: install [Pi Code CLI](https://pi.ai) for Pi models\n- Python API (`iModel`, `Branch`): `export OPENAI_API_KEY=sk-...` for gpt-4.1-mini default\n\n## First Flow\n\n```python\nimport asyncio\nfrom lionagi import Branch\n\nasync def main():\n    b = Branch()          # default: gpt-4.1-mini (requires OPENAI_API_KEY)\n    reply = await b.communicate(\"Name 3 features of async Python, one sentence each.\")\n    print(reply)\n\nasyncio.run(main())\n```\n\n```text\n# output:\n1. Coroutines let you write non-blocking I/O without threads.\n2. asyncio.gather runs multiple coroutines concurrently under one event loop.\n3. async generators stream results lazily, pausing between each yield.\n```\n\nFor multi-agent orchestration without Python, see [CLI Quick Start](docs/getting-started/first-flow.md).\n\n## Concepts\n\n| Term | What it is |\n|------|------------|\n| **Branch** | Single conversation thread — message history, tools, model config. Primary API surface. |\n| **Session** | Coordinates multiple Branches; runs DAG workflows across them. |\n| **flow** | `li o flow` — orchestrator plans a DAG, workers execute with dependency edges resolved. |\n| **team** | Persistent inbox messaging between agents via `li team send/receive`. |\n| **operate** | `branch.operate(instruction=…)` — tool use + structured output + optional streaming. |\n| **persist** | Every run saved to `~/.lionagi/runs/{run_id}/`. Resume with `li agent -r \u003cbranch-id\u003e`. |\n| **AgentConfig** | Preset agent configurations (coding, research) with permission policies, hooks, and tool registration. |\n| **Sandbox** | Git worktree isolation for safe experimentation — `SandboxSession.create()` → edit → diff → merge or discard. |\n\n## CLI — `li`\n\n```bash\n# Single agent\nli agent claude/sonnet \"Explain the observer pattern in 3 sentences\"\n\n# Fan-out: N workers in parallel, optional synthesis\nli o fanout claude/sonnet \"Identify code smells in this codebase\" -n 3 --with-synthesis\n\n# DAG flow: orchestrator plans agents with dependency edges\nli o flow claude/sonnet \"Audit the auth module for security issues\" --cwd .\n\n# Team messaging: inbox coordination between agents\nli team create \"review\" \u0026\u0026 li team send \"Start analysis\" -t \u003cid\u003e --to analyst\n\n# Playbook: parametric flow spec at ~/.lionagi/playbooks/audit.playbook.yaml\nli play audit --mode security \"the auth service\"\nli play NAME --help                          # Show playbook parameters and usage\n\n# Skill: print a CC-compatible reference body to stdout (for agent context injection)\nli skill commit\n\n# Resume any run\nli agent -r \u003cbranch-id\u003e \"follow up on your findings\"\n\n# Time-bounded run: injects a [DEADLINE] preamble so the agent paces its own reasoning\nli agent claude/sonnet --timeout 300 \"Audit the auth module and produce a summary\"\n```\n\nFull reference → [docs/cli-reference.md](docs/cli-reference.md) · Installable\ntemplates → [examples/](examples/)\n\n## Python API\n\n**Chat**\n\n```python\nfrom lionagi import Branch\n\nb = Branch(chat_model=\"openai/gpt-5.4\", system=\"You are a concise assistant.\")\nreply = await b.communicate(\"What causes rainbows?\")\n```\n\n**Structured output**\n\n```python\nfrom pydantic import BaseModel\n\nclass Summary(BaseModel):\n    points: list[str]\n    confidence: float\n\nresult = await b.operate(instruction=\"Summarize this text.\", response_format=Summary)\n```\n\n**Tools + ReAct**\n\n```python\nfrom lionagi.tools.types import ReaderTool\n\nbranch = Branch(tools=[ReaderTool])\nresult = await branch.ReAct(\n    instruct={\"instruction\": \"Summarize /path/to/paper.pdf\"},\n)\n```\n\nFull reference → [docs/api/](docs/api/)\n\n## Docs\n\n| | |\n|--|--|\n| [Getting Started](docs/getting-started/first-flow.md) | Install, first flow, API key setup |\n| [Concepts](docs/concepts.md) | Branch, Session, flow, team, operate, persist |\n| [CLI Reference](docs/cli-reference.md) | `li agent`, `li o fanout`, `li o flow`, `li team` — all flags |\n| [Cookbook](docs/cookbook/) | 5 runnable scenarios: codebase audit, research synthesis, multi-model pipeline, team coordination, resumable background run |\n| [API Reference](docs/api/) | `branch.operate`, `branch.ReAct`, `iModel`, `Session` |\n| [Migration 0.22.5 → 0.22.6](docs/migration/0.22.5-to-0.22.6.md) | Breaking changes: `branch.instruct` removed, run paths changed |\n| [Contributing](docs/contributing.md) | Dev setup, PR workflow |\n\n## Optional Extras\n\n```bash\nuv add \"lionagi[reader]\"    # Document reading (PDF, HTML, DOCX)\nuv add \"lionagi[mcp]\"       # MCP server support\nuv add \"lionagi[ollama]\"    # Local models via Ollama\nuv add \"lionagi[rich]\"      # Rich terminal output\nuv add \"lionagi[graph]\"     # Flow visualization\nuv add \"lionagi[postgres]\"  # PostgreSQL persistence\nuv add \"lionagi[all]\"       # Everything\n```\n\n## Claude Code Marketplace\n\nThe lionagi marketplace provides installable Claude Code plugins for the lionagi agent runtime. Each plugin adds a focused set of skills and agents for a specific workflow: structured show runs, memory management, playbook authoring, developer tooling, and multi-agent orchestration.\n\n**Install:**\n\n```bash\nclaude /plugin marketplace add ohdearquant/lionagi\n```\n\n**Prerequisites:** lionagi (`pip install lionagi` or `uv pip install lionagi`) and [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed.\n\nSee [marketplace/README.md](marketplace/README.md) for the full plugin list and per-plugin install instructions.\n\n## Community\n\n- [Discord](https://discord.gg/JDj9ENhUE8) — questions, ideas, help\n- [Issues](https://github.com/ohdearquant/lionagi/issues) — bugs and feature requests\n- [Contributing](docs/contributing.md) — PR workflow\n\n**Citation**\n\n```bibtex\n@software{Li_LionAGI_2023,\n  author = {Haiyang Li},\n  year   = {2023},\n  title  = {LionAGI: Towards Automated General Intelligence},\n  url    = {https://github.com/ohdearquant/lionagi},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohdearquant%2Flionagi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohdearquant%2Flionagi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohdearquant%2Flionagi/lists"}