{"slug": "show-hn-legioni-a-bunch-of-ai-agents-always-with-you", "title": "Show HN: Legioni – a bunch of AI agents always with you", "summary": "Legioni, a team of AI coding agents that coordinates work and learns from every task, has been released as an open-source tool. The agents plan, implement, review, and test code, with lessons from each session being promoted to improve future performance. Legioni requires the opencode tool and supports multiple programming languages and frameworks.", "body_md": "A team of AI coding agents that coordinates your work and learns from every task.\n\nRequires [opencode](https://github.com/anomalyco/opencode).\n\n```\n# one-time install (needed for promote, install, upgrade-team)\nnpm install -g legioni\n\ncd your-project\nlegioni init        # detects stack, compiles agents\n```\n\nOr without installing anything:\n\n```\ncd your-project\nnpx legioni init\n```\n\nThen start opencode and type your task:\n\n```\nopencode\n@orchestrator add a truncate(text, max_len, suffix='...') function with tests\n```\n\nThat's it. The orchestrator plans the work, delegates to specialist agents, and loops until tests pass. You watch.\n\n```\norchestrator  →  architect     →  plan.md\n              →  implementer   →  code + tests\n              →  reviewer      →  passes or fails\n              →  test-strategist → edge cases + full suite\n              ←  done: code is written, tested, and reviewed\n```\n\nAfter the session, the agents propose lessons from what they learned:\n\n```\nlegioni promote    # review each lesson, approve or reject\nlegioni install    # recompile agents with the approved lessons\n```\n\nNext task, those lessons are active. The team gets better each time.\n\n| Project | Language | Tests | What happened |\n|---|---|---|---|\n| Apache Commons Compress | Java / Maven | 1890 | All pass, reviewer ran real `mvn test` |\n| Apache Commons Text | Java / Maven | 1890 | All pass, orchestrator fixed corrupted existing code, reviewer verified |\n| truncate function | Python / pytest | 13 | Architect's spec had arithmetic errors, reviewer caught them, implementer fixed |\n| slugify + Unicode | Python / pytest | 50 | Implementer missed Nordic letters, reviewer failed it, implementer fixed on cycle 2. Lesson promoted. Next project, caught on first pass. |\n\n``` bash\n$ legioni init\nRunning project recon ... done\n  → .legioni/project.md\nCompiling team → opencode agents ... done\n  → ~/.config/opencode/agent/architect.md\n  → ~/.config/opencode/agent/implementer.md\n  → ~/.config/opencode/agent/orchestrator.md\n  → ~/.config/opencode/agent/reviewer.md\n  → ~/.config/opencode/agent/test-strategist.md\n  → ~/.config/opencode/agent/db-expert.md\nlegioni init complete.\n```\n\nOn a real project, recon detects your stack:\n\n```\n# .legioni/project.md (auto-generated)\n## Stack\n- Language: Java\n- Framework: Maven\n\n## Commands\n- Build: `mvn compile`\n- Test: `mvn test`\n- Targeted test: `mvn test -Dtest=<TestClass>`\n```\n\nAfter a session, agents stage lesson candidates:\n\n``` bash\n$ legioni promote\nReading staged lessons from .legioni/lessons.staging.*.md ...\n\n────────────────────────────────────────────────────────────\nRole: reviewer   Slug: [nordic-char-limitation-in-nfkd]\n────────────────────────────────────────────────────────────\nSituation: Reviewing a Unicode normalization implementation\nthat used pure NFKD + ASCII encoding.\nDecision: Flagged as failure because ø, Ø, æ, Æ have no\nNFKD decomposition — they get dropped entirely.\nWhy: A manual transliteration table is needed before NFKD.\n────────────────────────────────────────────────────────────\nPromote? [y/n/q] y\n  → Promoted to ~/.legioni/lessons/reviewer/[nordic-...].md\n\n────────────────────────────────────────────────────────────\nRole: orchestrator   Slug: [task-brief-precision]\n────────────────────────────────────────────────────────────\nSituation: The codebase had no Hex class — the complete\nclass had to be created from scratch.\nDecision: Wrote a detailed task brief with acceptance\ncriteria covering null handling and hex alphabet.\n────────────────────────────────────────────────────────────\nPromote? [y/n/q] n\n```\n\n| Command | What it does |\n|---|---|\n`legioni init` |\nSetup. Scaffolds team store, picks provider, detects stack, compiles agents. |\n`legioni install` |\nRecompile agents after promoting lessons or changing config. |\n`legioni update` |\nRe-detect stack and recompile. Use when the project changed. |\n`legioni promote` |\nReview staged lesson candidates interactively. |\n`legioni upgrade-team` |\nDiff defaults against your team store and upgrade changed roles. |\n`legioni config set-provider` |\nChange model provider (interactive menu). |\n`legioni config set-model <role> <model>` |\nOverride the model for one role. |\n`legioni config list` |\nShow current provider and model assignments. |\n\n`legioni init`\n\ncopies role definitions into`~/.legioni/roles/`\n\n. The store is portable across machines.`legioni install`\n\nreads each role, appends promoted lessons, applies model overrides, writes agent files to`~/.config/opencode/agent/`\n\n.`legioni init`\n\nalso detects your stack and writes`.legioni/project.md`\n\n, registered in`opencode.json`\n\n.- During a session, agents write workspace artifacts (plan, review, test results) and stage lesson candidates.\n`legioni promote`\n\nlets you review and promote lessons. They get injected into agent prompts on next compile.`legioni upgrade-team`\n\nsyncs your store with newer defaults from legioni releases.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-legioni-a-bunch-of-ai-agents-always-with-you", "canonical_source": "https://github.com/simoneloru/legioni", "published_at": "2026-06-15 21:16:23+00:00", "updated_at": "2026-06-15 21:49:34.129803+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "machine-learning", "generative-ai"], "entities": ["Legioni", "opencode", "Apache Commons Compress", "Apache Commons Text", "Maven", "pytest", "Java", "Python"], "alternates": {"html": "https://wpnews.pro/news/show-hn-legioni-a-bunch-of-ai-agents-always-with-you", "markdown": "https://wpnews.pro/news/show-hn-legioni-a-bunch-of-ai-agents-always-with-you.md", "text": "https://wpnews.pro/news/show-hn-legioni-a-bunch-of-ai-agents-always-with-you.txt", "jsonld": "https://wpnews.pro/news/show-hn-legioni-a-bunch-of-ai-agents-always-with-you.jsonld"}}