The flagship product of Autonomi. Complete installation instructions for all platforms and use cases.
Version: v6.75.3
loki runcommand for direct autonomous execution- Dual-mode: skill mode (inside Claude Code) and standalone mode
- Dynamic model resolution across all providers
- Multi-provider issue fixes and stability improvements
- Semantic code search via ChromaDB vector database
- MCP integration with
loki_code_searchandloki_code_search_statstools - Automatic codebase indexing with
tools/index-codebase.py
- Episodic, semantic, and procedural memory layers
- Progressive disclosure with 3-layer loading
- Token economics tracking for discovery vs read tokens
- Optional vector search with sentence-transformers
- npm (Recommended)
- Homebrew
- Quick Start
- Verify Installation
- Other Methods
- VS Code Extension
- Sandbox Mode
- Multi-Provider Support
- Claude Code (CLI)
- Claude.ai (Web)
- Anthropic API Console
- Ports
- Shell Completions
- Troubleshooting
npm install -g loki-modeInstalls the loki CLI and automatically sets up the skill for Claude Code, Codex CLI, and Gemini CLI via the postinstall script.
Prerequisites: Node.js 18+
What it does:
- Installs the
lokiCLI binary to your PATH - Creates skill symlinks at
~/.claude/skills/loki-mode,~/.codex/skills/loki-mode, and~/.gemini/skills/loki-mode - Each provider auto-discovers skills in its respective directory
Opt out of anonymous install telemetry:
LOKI_TELEMETRY_DISABLED=true npm install -g loki-mode
# Or set DO_NOT_TRACK=1Update: npm update -g loki-mode
Uninstall: npm uninstall -g loki-mode
brew tap asklokesh/tap && brew install loki-modeInstalls the loki CLI. To also install the skill for interactive use with all providers:
loki setup-skillUpdate: brew upgrade loki-mode
Uninstall: brew uninstall loki-mode
# CLI mode (works with any provider)
loki start ./prd.md
loki start ./prd.md --provider codex
loki start ./prd.md --provider gemini
# Interactive mode (inside your coding agent)
claude --dangerously-skip-permissions
# Then say: "Loki Mode with PRD at ./my-prd.md"loki --version # Should print the current version
loki doctor # Check skill symlinks, providers, and system prerequisitesGit clone, Docker, GitHub Action, and VS Code Extension are also available. See alternative-installations.md for details and trade-offs.
The easiest way to use Loki Mode with a visual interface.
From VS Code:
- Open Extensions (
Cmd+Shift+X/Ctrl+Shift+X) - Search for "loki-mode"
- Click Install
From Command Line:
code --install-extension asklokesh.loki-modeFrom Marketplace: Visit marketplace.visualstudio.com/items?itemName=asklokesh.loki-mode
- Activity Bar Icon: Dedicated Loki Mode panel in the sidebar
- Session View: Real-time session status, provider, phase, and duration
- Task View: Tasks grouped by status (In Progress, Pending, Completed)
- Status Bar: Current state and progress at a glance
- Quick Actions: Start/Stop/Pause/Resume from command palette
- Keyboard Shortcut:
Cmd+Shift+L(Mac) /Ctrl+Shift+L(Windows/Linux)
- Open a project folder in VS Code
- Click the Loki Mode icon in the activity bar (or press
Cmd+Shift+L) - Click "Start Session" and select your PRD file
- Choose your AI provider (Claude, Codex, or Gemini)
- Watch progress in the sidebar and status bar
Open VS Code Settings and search for "loki":
| Setting | Default | Description |
|---|---|---|
loki.provider |
claude |
Default AI provider |
loki.apiPort |
57374 |
API server port |
loki.apiHost |
localhost |
API server host |
loki.autoConnect |
true |
Auto-connect on activation |
loki.showStatusBar |
true |
Show status bar item |
loki.pollingInterval |
2000 |
Status polling interval (ms) |
The VS Code extension requires the Loki Mode API server to be running.
Before using the extension, start the server:
# Option A: Using Loki CLI (if installed via npm or Homebrew)
loki start
# Option B: Using the autonomous runner (from source)
./autonomy/run.sh
# Option C: Direct API server start
loki serveThe extension will automatically connect when it detects the server is running at localhost:57374.
Troubleshooting: If you see "API server is not running" errors, make sure you started the server first using one of the commands above.
Run Loki Mode in an isolated Docker container for enhanced security.
- Docker isolation: Complete process isolation from host system
- Seccomp profiles: Restricted system calls
- Resource limits: CPU, memory, and process limits enforced
- Dropped capabilities: Minimal Linux capabilities
- Read-only rootfs: Immutable container filesystem
- Git worktree fallback: Automatic fallback when Docker unavailable
# Run in sandbox mode
./autonomy/sandbox.sh ./my-prd.md
# With provider selection
./autonomy/sandbox.sh --provider codex ./my-prd.mdBy default, prompt injection is disabled for enterprise safety:
# Default: prompt injection disabled
./autonomy/run.sh ./my-prd.md
# Opt-in to enable prompt injection
LOKI_PROMPT_INJECTION_ENABLED=true ./autonomy/run.sh ./my-prd.mdThe HUMAN_INPUT.md file has security controls:
- Symlink protection: Symlinks are rejected
- Size limit: Maximum 1MB file size
- Path validation: Must be within
.loki/directory
- Running untrusted PRD files
- Enterprise environments with strict security requirements
- Automated CI/CD pipelines
- Multi-tenant deployments
Loki Mode v5.0.0 introduces support for multiple AI providers beyond Claude.
| Provider | Status | Notes |
|---|---|---|
claude |
Full Support | Default provider, all features available |
codex |
Degraded Mode | Core functionality only, some features unavailable |
gemini |
Degraded Mode | Core functionality only, some features unavailable |
Set the LOKI_PROVIDER environment variable to select your provider:
# Use Claude (default)
export LOKI_PROVIDER=claude
# Use OpenAI Codex
export LOKI_PROVIDER=codex
# Use Google Gemini
export LOKI_PROVIDER=geminiUse the --provider flag when invoking Loki Mode:
# Use Claude (default)
loki start ./my-prd.md --provider claude
# Use OpenAI Codex
loki start ./my-prd.md --provider codex
# Use Google Gemini
loki start ./my-prd.md --provider geminiPass the provider as an environment variable:
# Use Codex with Docker
docker run -e LOKI_PROVIDER=codex \
-v $(pwd):/workspace -w /workspace \
asklokesh/loki-mode:latest start ./my-prd.md
# Use Gemini with Docker
docker run -e LOKI_PROVIDER=gemini \
-v $(pwd):/workspace -w /workspace \
asklokesh/loki-mode:latest start ./my-prd.mdWhen using codex or gemini providers, Loki Mode operates in degraded mode:
- Core autonomous workflow functions normally
- Some advanced features may be unavailable or behave differently
- Model-specific optimizations (Opus/Sonnet/Haiku routing) are adapted for each provider
- Quality gates and RARV cycle remain fully functional
Recommendation: For the best experience and full feature support, use the default claude provider.
Loki Mode can be installed as a skill in three ways:
Personal installation (available in all projects):
git clone https://github.com/asklokesh/loki-mode.git ~/.claude/skills/loki-modeProject-specific installation:
# Navigate to your project directory first
cd /path/to/your/project
# Clone to local skills directory
git clone https://github.com/asklokesh/loki-mode.git .claude/skills/loki-mode# Navigate to skills directory
cd ~/.claude/skills
# Get latest version number
VERSION=$(curl -s https://api.github.com/repos/asklokesh/loki-mode/releases/latest | grep tag_name | cut -d'"' -f4 | tr -d 'v')
# Download and extract
curl -L -o loki-mode.zip "https://github.com/asklokesh/loki-mode/releases/download/v${VERSION}/loki-mode-claude-code-${VERSION}.zip"
unzip loki-mode.zip && rm loki-mode.zipResult: Creates ~/.claude/skills/loki-mode/SKILL.md
If you only want the essential files without the full repository:
# Create directory structure
mkdir -p ~/.claude/skills/loki-mode/references
# Download core skill file
curl -o ~/.claude/skills/loki-mode/SKILL.md \
https://raw.githubusercontent.com/asklokesh/loki-mode/main/SKILL.md
# Download agent definitions
curl -o ~/.claude/skills/loki-mode/references/agent-types.md \
https://raw.githubusercontent.com/asklokesh/loki-mode/main/references/agent-types.md
# Download deployment guides
curl -o ~/.claude/skills/loki-mode/references/deployment.md \
https://raw.githubusercontent.com/asklokesh/loki-mode/main/references/deployment.md
# Download business operations reference
curl -o ~/.claude/skills/loki-mode/references/business-ops.md \
https://raw.githubusercontent.com/asklokesh/loki-mode/main/references/business-ops.mdNote: This minimal install won't include examples, tests, or the autonomous runner. Use Option A or B for full functionality.
For using Loki Mode on the Claude.ai web interface:
-
Go to Releases
-
Download either:
loki-mode-X.X.X.zip(standard format)loki-mode-X.X.X.skill(skill format)
Both contain the same skill and will work.
- Open Claude.ai
- Go to Settings (gear icon)
- Navigate to Features → Skills
- Click Upload Skill
- Select the downloaded
.zipor.skillfile
File Structure: The Claude.ai package has SKILL.md at the root level as required by the web interface.
For using Loki Mode through the Anthropic API Console (console.anthropic.com):
-
Go to Releases
-
Download
loki-mode-api-X.X.X.zip(note the-api-version)Important: The API version has a different file structure than the web version.
- Go to console.anthropic.com
- Navigate to Skills section
- Click Upload Skill
- Select the downloaded
loki-mode-api-X.X.X.zipfile
File Structure: The API package has SKILL.md inside a loki-mode/ folder as required by the API.
Check that the skill file is in place:
cat ~/.claude/skills/loki-mode/SKILL.md | head -10Expected output: Should show YAML frontmatter starting with:
---
name: loki-mode
description: Multi-Agent Autonomous Startup System
...
---- Start a new conversation
- Type:
Loki Mode - Claude should recognize the skill and ask for a PRD
- Create a new API call with skills enabled
- Include the skill in your request
- The skill should be available for use
After installation, you should have this structure:
loki-mode/
├── SKILL.md # Main skill file (required)
├── README.md # Documentation
├── docs/
│ └── INSTALLATION.md # This file
├── CHANGELOG.md # Version history
├── VERSION # Current version number
├── LICENSE # Business Source License 1.1
├── references/ # Agent and deployment references
│ ├── agents.md
│ ├── deployment.md
│ └── business-ops.md
├── autonomy/ # Autonomous runner (CLI only)
│ ├── run.sh
│ └── README.md
├── templates/ # 22 PRD templates for project scaffolding
│ ├── simple-todo-app.md
│ ├── api-only.md
│ ├── static-landing-page.md
│ └── ... (22 templates total)
├── tests/ # Test suite (CLI only)
│ ├── run-all-tests.sh
│ ├── test-bootstrap.sh
│ └── ...
└── integrations/ # Third-party integrations
└── vibe-kanban.md
Note: Some files/directories (autonomy, tests, templates) are only available with full installation (Options A or B).
Loki Mode uses two network ports for different services:
| Port | Service | Description |
|---|---|---|
| 57374 | Dashboard + API (FastAPI) | Unified server serving both the web dashboard UI (real-time monitoring, task board, Completion Council, memory browser, log streaming) and the REST API (used by VS Code extension, CLI tools, programmatic access). Served by dashboard/server.py. |
- Browser access (dashboard, monitoring): Use port 57374 --
http://localhost:57374 - API calls (REST, programmatic): Use port 57374 --
http://localhost:57374 - VS Code extension: Connects to API on port 57374 automatically (configurable via
loki.apiPortsetting) - The server is started automatically when you run
loki startor./autonomy/run.sh. No manual configuration is needed.
# Dashboard port (default: 57374)
LOKI_DASHBOARD_PORT=57374 loki dashboard start
# API port (default: 57374)
loki serve --port 57374For remote or cross-origin access to the dashboard, configure allowed origins via the LOKI_DASHBOARD_CORS environment variable:
# Allow specific origins
LOKI_DASHBOARD_CORS="http://localhost:3000,https://my-dashboard.example.com" loki dashboard start
# Default: http://localhost:57374,http://127.0.0.1:57374 (localhost-only, secure by default)Enable tab completion for the loki CLI to support subcommands, flags, and file arguments.
Add the source command to your startup file so completions load every time you open a terminal.
Add this line to your ~/.bashrc (Linux) or ~/.bash_profile (macOS):
# npm install: use the npm package path
source "$(npm root -g)/loki-mode/completions/loki.bash"
# git clone: use the skills directory
source ~/.claude/skills/loki-mode/completions/loki.bashIf you only want to enable completions for your current terminal session (for example, for testing), run:
source completions/loki.bashBy default, Bash requires two TAB presses to show the completion menu. To make it instant (similar to Zsh) and cycle through options more easily, add the following lines to your ~/.inputrc file:
# Show menu immediately on first TAB
set show-all-if-ambiguous on
# Case-insensitive completion (optional)
set completion-ignore-case onNote: You will need to restart your terminal for
~/.inputrcchanges to take effect.
Zsh completions require the script to be located in a directory listed in your $fpath.
Add the loki completions directory to your $fpath in ~/.zshrc before initializing completions:
# 1. Add the completions directory to fpath
fpath=(/path/to/loki/completions $fpath)
# 2. Initialize completions
autoload -Uz compinit && compinitAfter installation, restart your shell or source your configuration file, then verify:
loki <TAB> # Should immediately list subcommands
loki start -<TAB> # Should list flags (--provider, --parallel, etc.)loki <TAB> # Should show subcommands with descriptions
loki start --pro<TAB> # Should autocomplete to --providerThe completion scripts support:
-
Subcommands
start,stop,pause,resume,status,dashboard,import,council,memory,provider,config,audit,metrics,watchdog,secrets,help,completions -
Smart Context
loki start --provider <TAB>shows only installed providers (claude,codex,gemini).loki start <TAB>defaults to file completion for PRD templates.
-
Nested Commands Handles specific subcommands for
council,memory,config,audit,metrics,watchdog, andsecrets.
Problem: Claude doesn't recognize "Loki Mode" command.
Solutions:
-
Check installation path:
ls -la ~/.claude/skills/loki-mode/SKILL.md -
Verify YAML frontmatter:
cat ~/.claude/skills/loki-mode/SKILL.md | head -5
Should show
name: loki-mode -
Restart Claude Code:
# Exit and restart claude command
Problem: Cannot create directories or download files.
Solution:
# Ensure skills directory exists
mkdir -p ~/.claude/skills
# Check permissions
ls -la ~/.claude/Problem: curl or wget commands fail.
Solutions:
-
Check internet connection
-
Try alternate download method:
# Use wget instead of curl wget -O ~/.claude/skills/loki-mode/SKILL.md \ https://raw.githubusercontent.com/asklokesh/loki-mode/main/SKILL.md
-
Manual download:
- Visit the URL in a browser
- Save file manually to
~/.claude/skills/loki-mode/
Problem: ./autonomy/run.sh gives "command not found" or permission errors.
Solutions:
-
Make executable:
chmod +x autonomy/run.sh
-
Run from repository root:
# Make sure you're in the loki-mode directory cd ~/.claude/skills/loki-mode ./autonomy/run.sh
-
Check prerequisites:
# Ensure Claude Code is installed claude --version # Ensure Python 3 is available python3 --version
Problem: Skill loads but agent definitions or deployment guides are missing.
Solution:
# Ensure all reference files are present
ls -la ~/.claude/skills/loki-mode/references/
# Should show:
# agents.md
# deployment.md
# business-ops.md
# If missing, download them:
curl -o ~/.claude/skills/loki-mode/references/agent-types.md \
https://raw.githubusercontent.com/asklokesh/loki-mode/main/references/agent-types.mdcd ~/.claude/skills/loki-mode
git pull origin main- Download the latest release
- Extract to the same directory (overwrite existing files)
- Or delete old installation and reinstall
cat ~/.claude/skills/loki-mode/VERSION# Remove the skill directory
rm -rf ~/.claude/skills/loki-mode- Go to Settings → Features → Skills
- Find "loki-mode" in the list
- Click Remove
- Go to Skills section
- Find "loki-mode"
- Click Delete
After installation:
-
Verify Setup: Check your environment is ready
loki doctor
-
Scaffold a Project: Create a project from a template
loki init my-app --template simple-todo-app cd my-app -
Start Building: Launch autonomous development
loki start prd.md
-
Read Documentation: Check out README.md for usage guides
-
Join the Community: Report issues or contribute at GitHub
- Issues/Bugs: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: README.md
Happy Building!