π― Orchestrate persistent AI agents with memory, structure, and self-improvement
Install globally, initialize workspaces, maintain agent sessions across days/weeks with full context preservation
Getting Started β’ What is Genie β’ MCP Integration β’ Features β’ Roadmap β’ Contributing
New to Genie? Choose your approach:
Linux / macOS:
# Download and run installer
curl -fsSL https://genie.namastex.ai/start.sh -o /tmp/genie-install.sh && bash /tmp/genie-install.sh
# Or use the shorthand alias
curl -fsSL https://genie.namastex.ai/start -o /tmp/genie-install.sh && bash /tmp/genie-install.shWindows (PowerShell):
# Download and run installer
irm https://genie.namastex.ai/start.ps1 -OutFile "$env:TEMP\genie-install.ps1"; & "$env:TEMP\genie-install.ps1"Manual install (if you have Node.js already):
npm install -g automagik-genie@nextWhat the installer does:
- β Installs Node.js 22 (if needed)
- β Installs pnpm package manager (faster than npm)
- β Installs Genie globally via pnpm
- β
Enables
geniecommand anywhere - β
Runs
genieto initialize your workspace
Automagik Genie is a self-improving AI orchestration framework. It's the command center that turns conversations with AI into structured, trackable work through the Wish β Forge β Review workflow while continuously evolving its own capabilities.
The Power: Genie maintains persistent agent sessions that remember context across iterations, orchestrates task execution via Automagik Forge, and integrates with any AI coding tool through MCP. No slash commands, no complexityβjust natural conversation that gets things done.
The Evolution: As a meta-agent framework, Genie can audit, upgrade, and validate its own prompt stack and workflows. Every improvement is evidence-based (wish β validation β done report) with built-in rollback safety.
It ships a ready-to-run .genie/ workspace with 30+ specialized agents, integrates seamlessly with Automagik Forge for isolated task execution, and exposes a battle-tested CLI + MCP server for any AI coding platform.
- Context resets β every AI conversation starts from scratch, losing project knowledge
- No task tracking β brilliant ideas vanish in chat history, work gets duplicated
- No structure β AI gives you code, you ship it, it breaks in 2 weeks (the vibe coding curse)
- Tool switching β jumping between Claude, Cursor, terminal, GitHub loses momentum
- Persistent Sessions β Agent conversations remember context across iterations (like talking to the same expert over days)
- Structured Workflows β Wish β Forge β Review keeps work organized and reviewable
- Forge Integration β Every task executes in isolated Git worktrees, safe experimentation before merge
- Universal MCP β Works with Claude Code, Cursor, Gemini CLI, or any MCP-compatible tool
- 30+ Specialized Agents β From architecture planning to PR reviews, each agent is an expert in their domain
- π€ Persistent Agent Sessions β Conversations that remember context across hours/days (resume anytime with full history)
- π Wish β Forge β Review Workflow β Structured path from idea to shipped code with safety gates
- ποΈ Forge Integration β Automatic task execution in isolated Git worktrees (experiment safely before merge)
- π‘ Universal MCP Server β Works with Claude Code, Cursor, Gemini CLI, Roo Code, and any MCP-compatible AI tool
- π§ 30+ Specialized Agents β Architecture, implementation, testing, debugging, PR review, and more
- π Session Transcripts β Full conversation history for every agent session (audit trail + learning)
- π― Natural Language Routing β No slash commands needed, just talk naturally
- β‘ Instant Startup β Production-grade process management, Forge ready in 10-12s
- Node.js 18+ (tested with pnpm 10+)
- Git for snapshot creation
- (Optional) pnpm if you plan to run tests locally:
corepack enable
# Navigate to your project
cd your-project
# Start Genie (auto-initializes on first run)
genie
# Or just run the MCP server for AI tool integration
genie mcpServer Management:
genie # Start Genie server (Forge + MCP)
genie status # Show server status and statistics
genie mcp # Start MCP server in stdio mode (for Claude Desktop)Agent Orchestration:
genie run <agent> <prompt> # Run an agent with a prompt
genie resume <sessionId> <msg> # Resume an existing agent session
genie list [type] # List agents, sessions, or workflows
genie view <sessionId> # View session transcript
genie stop <sessionId> # Stop a running sessionWorkspace Management:
genie init [template] # Initialize workspace
genie rollback # Restore previous backupPackage Management:
genie update # Update Genie npm package (shows changelog from GitHub)
genie update --check # Check for updates without installingAfter first run you'll have:
.genie/agents/β 30+ specialized agents (genie, implementor, tests, git, learn, etc.).genie/code/β Code-specific workflows and spells.genie/spells/β Universal spells (shared across all templates).genie/product/β Mission, roadmap, tech stack documentation.genie/state/β Session history, Forge connection state.genie/backups/<timestamp>/β Automatic snapshots before major changes
Genie is optimized for instant startup with production-grade process management.
| Metric | Time | Details |
|---|---|---|
| Total Startup | 10-12s | Forge init + MCP ready |
| Binary Extraction | 0s | β¨ Pre-extracted (no delay!) |
| Forge Spawn | <100ms | Instant process launch |
| Health Check | <50ms | Exponential backoff retry |
Run the performance benchmark yourself:
# Install latest version
npm install -g automagik-genie@next
# Run benchmark (3 runs with warm-up)
GENIE_SHOW_PERF=true npx automagik-genie
# Or run custom benchmark
node scripts/benchmark-startup.js
# Example output:
# π Run 1/3: 11.2s β
# π Run 2/3: 10.8s β
# π Run 3/3: 11.0s β
#
# Average: 11.0s | Median: 11.0s | Fastest: 10.8s1. Zero-Extraction Startup
- β Before: Delete + extract binary every run (5-10s delay)
- β After: Use pre-extracted binaries (instant!)
- π¦ Trade-off: +69MB package size for 40-50% faster startup
2. Production-Grade Process Management
- β
Type-safe
Result<T, E>error handling - β Exponential backoff on health checks (100ms β 200ms β 400ms)
- β Process lifecycle tracking (spawn/exit/error handlers)
- β Graceful shutdown with verification (SIGTERM β wait β SIGKILL)
- β No file descriptor leaks
3. Performance Metrics
- Enable with:
GENIE_SHOW_PERF=true npx automagik-genie - Shows: Port check, health check, Forge spawn, total time
- Helps identify bottlenecks in your environment
Binary Resolution (version-agnostic):
// Automatically detects npm vs pnpm structure
// Finds latest installed version
// No hardcoded paths!
const binary = resolveForgeBinary();Health Check (with retry logic):
// 3 attempts with exponential backoff
// 100ms β 200ms β 400ms delays
// 3s timeout per attempt
await isForgeRunning(baseUrl, retries: 3);Process Spawn (robust error handling):
// Detached process (survives parent exit)
// Error handlers for spawn/exit/crash
// Comprehensive logging to .genie/state/forge.log
startForgeInBackground({ baseUrl, logDir });Genie ships with a FastMCP server so any MCP-compatible AI tool can orchestrate Genie workflows and maintain persistent agent sessions.
- Setup: Install Genie with
curl -fsSL https://genie.namastex.ai/start | bash - Connect: Add MCP config to your AI tool (Claude Code, Cursor, etc.)
- Just talk: "I want to build an auth system with social login"
- Genie orchestrates:
- Creates persistent agent session (remembers context)
- Routes to specialist (genie agent for architecture planning)
- Generates Wish document (structured requirements)
- Creates Forge tasks (isolated worktree execution)
- Manages Review workflow (safe merge process)
- Resume anytime: "Continue the auth system work" β Genie picks up where you left off
No slash commands. No manual agent selection. Just natural conversation with persistent memory.
| Tool | Description | What It Enables |
|---|---|---|
mcp__genie__run |
Start a new agent session | Launch specialist agents (genie, implementor, tests, git, learn) with persistent context |
mcp__genie__resume |
Continue existing session | Pick up conversations hours/days later with full context history |
mcp__genie__list_agents |
List available agents | Discover 30+ specialized agents and their capabilities |
mcp__genie__list_sessions |
View session history | See active sessions, completed work, and conversation archives |
mcp__genie__view |
Read session transcript | Full conversation history for learning and auditing |
mcp__genie__stop |
Halt running session | Gracefully stop long-running agent work |
The Power of Persistent Sessions: Unlike traditional AI chats that forget everything, Genie agents maintain context across iterations. Start architecture planning on Monday, continue implementation on Wednesday, debug on Fridayβeach session remembers the full conversation history. This enables:
- Iterative refinement without repeating context
- Socratic dialogue where agents learn your preferences
- Long-running projects that span days/weeks
- Audit trails of every decision made
Click to expand MCP config
{
"mcpServers": {
"automagik-genie": {
"command": "npx",
"args": ["automagik-genie", "mcp"]
}
}
}After adding config:
- Restart Claude Code
- Verify connection: Look for "automagik-genie" in MCP servers list
- Start using: Just talk naturally, Genie handles the rest
Other MCP Clients (Cursor, Roo, Gemini CLI, Cline)
All MCP clients follow the same pattern:
Generic config:
{
"command": "npx",
"args": ["automagik-genie", "mcp"]
}Consult your AI tool's MCP documentation for exact configuration format.
flowchart LR
subgraph Workspace
Repo[Your Repository]
GenieFolder[.genie/ structure]
end
InitCLI[automagik-genie init] --> GenieFolder
UpdateCLI[automagik-genie update] --> GenieFolder
RollbackCLI[automagik-genie rollback] --> GenieFolder
GenieFolder --> MCPServer[Genie MCP Server]
MCPServer --> Hive[Automagik Hive]
MCPServer --> Spark[Automagik Spark]
MCPServer --> Forge[Automagik Forge]
GenieFolder --> Agents[Genie Agents & Prompts]
Genie is the canonical source of prompts, agents, and project metadata. Other Automagik products (Hive, Spark, Forge, Omni) rely on Genie to keep repository context predictable.
Genie's architecture uses universal agents (shared across all templates) and template-specific agents (code/create). This enables scalability without duplication.
graph TB
%% Genie Agent Tree
%% Code Collective
CODE[Code Collective]:::orchestrator
code_analyze[analyze]:::code_agent
CODE --> code_analyze
code_audit[audit]:::code_agent
CODE --> code_audit
code_challenge[challenge]:::code_agent
CODE --> code_challenge
code_commit[commit]:::code_agent
CODE --> code_commit
code_consensus[consensus]:::code_agent
CODE --> code_consensus
code_debate[debate]:::code_agent
CODE --> code_debate
more_code[...24 more]:::more
CODE --> more_code
%% Git Workflows
code_git --> git_issue[issue]:::workflow
code_git --> git_pr[pr]:::workflow
code_git --> git_report[report]:::workflow
%% Code Workflows
workflow_forge[forge]:::workflow
CODE --> workflow_forge
workflow_session-state-updater[session-state-updater]:::workflow
CODE --> workflow_session-state-updater
workflow_session-state-updater-example[session-state-updater-example]:::workflow
CODE --> workflow_session-state-updater-example
workflow_wish[wish]:::workflow
CODE --> workflow_wish
%% Create Collective
CREATE[Create Collective]:::orchestrator
create_wish[wish]:::create_agent
CREATE --> create_wish
%% Styling
classDef orchestrator fill:#fff3e0,stroke:#f57c00,stroke-width:3px
classDef code_agent fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef create_agent fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef workflow fill:#fff9c4,stroke:#fbc02d,stroke-width:1px
classDef more fill:#f5f5f5,stroke:#9e9e9e,stroke-width:1px,stroke-dasharray: 5 5
See .genie/README.md for detailed agent documentation
Genie includes a comprehensive git hook automation system that maintains documentation, validates changes, and enforces quality standards automatically.
Pre-Commit (Validation + Updates):
- β
User file protection - Blocks
.genie/TODO.mdand.genie/USERCONTEXT.mdfrom commits - β
Cross-reference validation - Catches broken
@file.mdreferences before commit - β Token efficiency gate - Blocks commits if token count increases >5% without justification
- β Agent graph auto-generation - Updates AGENTS.md with token counts and dependency tree
- β Agent registry auto-generation - Scans folders and updates agent/spell lists
- β
Universal headers injection - Adds
Last Updatedtimestamps to all .md files - β Forge task linking - Auto-links Forge task metadata to wish documents
Pre-Push (Quality Enforcement):
- β
Test runner - Blocks push if
pnpm testfails - β CHANGELOG auto-generation - Groups commits by type (feat, fix, refactor) since last tag
Post-Merge (State Updates):
- β STATE.md auto-update - Updates version and commit hash after merge
On-Demand (Evidence & Analytics):
- β QA sync from GitHub issues - Converts bugs into test scenarios (53 scenarios generated)
- β Dependency graph generation - Visual Mermaid diagram of ecosystem structure (136 files, 332 dependencies)
The token efficiency gate ensures AGENTS.md stays lean:
# Commit triggers validation
git commit -m "feat: add comprehensive audit agent"
# β Token count increased by 8.2% (threshold: 5%)
# Current: 95,234 | Baseline: 88,000 | Change: +7,234
#
# If this increase is justified:
# git config commit.token-override "Added audit agent with 18 validation rules"
# Justify and retry
git config commit.token-override "Added audit agent (18 validation rules)"
git commit -m "feat: add comprehensive audit agent"
# β
Token efficiency validated (justified increase)
# β
Agent graph updated in AGENTS.md (Total: 95,234 tokens)
# β
Agent registry updated (Agents: 18 total)
# β
All pre-commit validations passedTwo sections in AGENTS.md are automatically maintained:
Agent Registry:
## Agent Registry (Auto-Generated)
**Last Updated:** 2025-10-18 16:45:59 UTC
**Universal Agents:** 16 total
- analyze, audit, debate, design-review, forge, learn, plan, prompt, qa, review, ...
**Code Agents:** 15 total
- commit, debug, git, implementor, polish, refactor, release, tests, ...
**Universal Spells:** 32 total
- delegation-discipline, orchestration-boundary-protocol, forge-integration, ...
**Code Spells:** 14 total
- evidence-storage, forge-code-blueprints, genie-integration, ...Agent Graph:
## Agent Graph Architecture (Auto-Generated)
**Last Updated:** 2025-10-18 16:45:24 UTC
**Total Tokens:** 23,622 (baseline for efficiency validation)
**Distribution:**
- Skills: 19,381 tokens (82.0%)
- Other: 3,276 tokens (13.9%)
- Core Framework: 965 tokens (4.1%)
**Hierarchy:**
- **AGENTS.md** (965 tokens, +22,657 from 36 refs)
- **.genie/spells/know-yourself.md** (1,359 tokens)
- **.genie/code/spells/evidence-based-thinking.md** (750 tokens)
...Git hooks are installed automatically when you clone the repository. They're located in .git/hooks/:
pre-commit- Validation and auto-updatespre-push- Tests and CHANGELOGpost-merge- STATE.md updates
No manual setup required - hooks work out of the box.
You can run any automation script manually:
# Validate cross-references
node .genie/scripts/validate-cross-references.js
# Update agent graph
node .genie/scripts/update-agent-graph.js
# Update agent registry
node .genie/scripts/update-agent-registry.js
# Sync QA scenarios from GitHub issues
node .genie/scripts/sync-qa-from-issues.js
# Generate dependency graph
node .genie/scripts/build-dependency-graph.js
# All scripts support --dry-run and --help
node .genie/scripts/validate-token-count.js --helpToken efficiency override (one-time use):
git config commit.token-override "Reason for increase"
# Override automatically cleared after successful commitSkip pre-commit hooks (not recommended):
git commit --no-verifypnpm install # Install dependencies
pnpm run build:genie # Compile the TypeScript CLI
pnpm run test:genie # Run CLI + smoke testsAll CLI code lives under .genie/cli/src/. Rebuild (pnpm run build:genie) before committing so .genie/cli/dist/**/* stays in sync for npm consumers.
- β Persistent agent sessions with full context history
- β Forge integration (isolated worktree execution)
- β MCP server with 6 core tools
- β 30+ specialized agents (genie, implementor, tests, git, learn, etc.)
- β Natural language routing (no slash commands)
- β Session transcripts and audit trails
- β Wish β Forge β Review workflow
- π Bilateral GitHub Sync β Two-way sync between Genie sessions and GitHub Issues
- π― Task Templates β Reusable patterns for common workflows (feature dev, bug hunt, refactor)
- π Agent Analytics β Track which agents/workflows work best for your team
- π Jira/Linear Integration β Connect Genie sessions to external project management
- π§ͺ Multi-Agent Collaboration β Multiple agents working together on complex tasks
We love contributions! Before you start:
- Read the CONTRIBUTING guidelines for philosophy and standards
- Open an issue to align on intent
- Follow Conventional Commits (
feat: ...,fix: ..., etc.) and co-author with π§ - Run
pnpm run test:genieand rebuild the dist bundle before submitting
Automagik Genie is released under the MIT License. See LICENSE for details.
π Stop losing context. Start shipping code you understand.
Persistent Sessions + Structured Workflows + Forge Integration = Genie
Star us on GitHub β’
Join our Discord
Made with β€οΈ by Namastex Labs
AI that elevates human potential, not replaces it
