Cognitive Architecture
for AI Agents
Not a prompt wrapper. A biologically-inspired neural processing system where agents think in 24-phase cognitive cycles, dream to consolidate memory, and grow new capabilities autonomously.
brew tap LegionIO/tap brew install legionio legion start Architecture
A biologically-inspired cognitive loop — not a request-response chain.
GAIA
Cognitive CoordinatorOrchestrates the 24-phase cognitive cycle (16 tick + 8 dream), routes messages between cognitive modules, and manages channel abstraction across interfaces.
Synapse
Cognitive RouterThree-layer routing — bones for task execution, nerves for confidence-scored routing with autonomy levels, mind for dream replay and knowledge promotion.
Apollo
Knowledge StoreTwo-tier shared knowledge store — local SQLite+FTS5 and global PostgreSQL+pgvector with semantic retrieval, confidence decay, and cross-agent knowledge sharing.
LLM Pipeline
Governance Engine19-step pipeline for every LLM call — RBAC, PII/PHI classification, RAG context, budget guards, tool dispatch, confidence scoring, and full audit trail.
16-Phase Waking Tick Cycle
8-Phase Dream Cycle
Memory consolidation during idle — agents dream to resolve contradictions, promote knowledge, and form new agendas.
Features
From cognitive processing to infrastructure orchestration — a complete platform, not a thin wrapper.
Cognitive Tick Cycle
16-phase processing loop mimicking biological neural patterns — sensory processing, emotional evaluation, memory retrieval, prediction, social cognition, action selection, reflection, and more.
Dream & Consolidation
8-phase dream cycle for memory consolidation during idle periods. Agents audit memories, resolve contradictions, promote knowledge, and form new agendas autonomously.
73 Extension Gems
234 cognitive modules across 13 domains — executive, memory, affect, inference, social, self, learning, imagination, and more.
19-Step LLM Pipeline
Every LLM call runs through governance — RBAC, PII/PHI classification, RAG injection, budget guards, tool dispatch, confidence scoring, and full audit trail.
60 MCP Tools
Full Model Context Protocol server — any AI agent can run tasks, manage extensions, query infrastructure, and coordinate workers through standardized tooling.
AI Chat CLI
Interactive REPL with 40 built-in tools, slash commands, at-mentions for agent delegation, persistent memory, and multi-provider LLM routing.
Multi-Agent Orchestration
Spawn, delegate, and coordinate across specialized agents. Plan mode for read-only exploration. Swarm workflows for complex multi-step pipelines.
50+ Integrations
GitHub, Slack, AWS, Docker, Kubernetes, Vault, Terraform, Jenkins, GitLab, Jira, PagerDuty, Grafana, Prometheus, Discord, MQTT, and many more.
Compare
Most agent frameworks wrap an LLM in a loop. LegionIO models cognition — perception, reasoning, memory, emotion, and action — as distinct, composable systems.
Ecosystem
73 extension gems and counting. Install only what you need.
13 Cognitive Domains
234 cognitive modules organized by cognitive function
50+ Service Integrations
Connect to your entire infrastructure
Get Started
Ruby >= 3.4 and RabbitMQ to get started. Add Redis and PostgreSQL when you're ready to scale.
Install
$ gem install legionio Configure
$ legionio config scaffold # auto-detects your environment
$ legionio check # verify connections Launch
$ legion # interactive TTY shell
$ legion chat # AI-powered REPL
$ legionio start # start the daemon Requires Ruby >= 3.4 and RabbitMQ. Optional: PostgreSQL, Redis, HashiCorp Vault.
Community
Built for researchers, engineers, Ruby developers, and open source contributors.
AI Researchers
Explore cognitive architectures beyond prompt engineering. Experiment with biologically-inspired processing, memory consolidation, and emergent behavior.
Platform Engineers
Orchestrate infrastructure with 50+ service integrations. Chain tasks, manage schedules, and coordinate distributed workers across your stack.
Ruby Developers
Extend with familiar tools — gems, RSpec, Bundler. Build custom extensions with scaffolding, auto-discovery, and a rich plugin API.
Open Source Contributors
Apache 2.0 core. MIT extensions. No paid tiers, no feature gates. Every contribution shapes the future of cognitive AI.
Open Source
Apache 2.0 core. MIT extensions. No paid tiers. No feature gates.
The full platform, yours to use, extend, and contribute to.
brew tap LegionIO/tap brew install legionio legion start