agentleFS
wundercorpwundercorp/loki/skills/autonomous-ai-agents/loki-agent/SKILL.md

loki-agent

Skill28 starsChanged 2 months agoMITView on GitHub

Use, configure, theme, extend, and orchestrate Loki Agent.

  • Pipes a download into a shell
  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never answer "Loki can't do that" from memory.

    line 43
  2. Very specific:

    Run additional Loki processes as fully independent subprocesses — separate sessions, tools, and environments.

    line 121
  3. Very specific:

    Use -w (worktree mode): when spawning agents that edit code — prevents git conflicts

    line 192

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Loki Agent

Loki Agent is an open-source AI agent framework by WunderCorp, Inc. that runs in your terminal, a native desktop app, messaging platforms, and IDEs. It's in the same category as Claude Code (Anthropic), Codex (OpenAI), and OpenClaw — autonomous coding and task-execution agents that use tool calling to interact with your system. Loki works with any LLM provider (OpenRouter, Anthropic, OpenAI, Google, DeepSeek, xAI, local models, and 20+ others) and runs on Linux, macOS, Windows, and WSL.

What makes Loki different:

  • Self-improving through skills — Loki learns from experience by saving reusable procedures as skills that load into future sessions.
  • Persistent memory across sessions — remembers who you are, your preferences, environment details, and lessons learned. Pluggable memory backends.
  • Multi-platform gateway — the same agent runs on Telegram, Discord, Slack, WhatsApp, iMessage, Signal, Matrix, Teams, Email, and a dozen more platforms with full tool access, not just chat.
  • Many surfaces — the same agent core drives the CLI, the Ink TUI, a native Electron desktop app, a web dashboard, and an ACP server for IDEs (VS Code / Zed / JetBrains).
  • Provider-agnostic — swap models and providers mid-workflow; credential pools rotate across multiple API keys automatically.
  • Profiles — run multiple independent Loki instances with isolated configs, sessions, skills, and memory.
  • Extensible & themeable — plugins, MCP servers, custom tools, webhook triggers, cron scheduling, skins that theme every surface, desktop UI plugins, TUI widgets, and pet mascots.

This skill is a hub. The body covers identity, quick start, spawning/orchestration, and hard invariants. Everything else lives in reference files — load the matching reference (below) before answering; do not answer detail questions from the body alone.

Docs: https://doku.sh/#/i/cbe1e051e4be2bb725-26f1d908878243

Scope & Verification

This skill is a concise operating guide, not the complete source of truth for every Loki feature. If a Loki feature, command, or setting is not mentioned here or in a reference, do not treat that absence as evidence that it does not exist. Check the live repository and official docs before giving a negative answer.

Good verification targets, cheapest first:

  • Every shipped feature, one line each: https://loki.computer/docs/llms.txt. Start here for any "can Loki do X?" or "how do I do X?" — it indexes the entire documentation set with a link to the page that answers. It is generated from the docs tree on every build, so it is never behind the product. Fetch it with web_extract, or curl -s https://loki.computer/docs/llms.txt when web tools are off. The whole documentation set in one file is at /docs/llms-full.txt.
  • CLI commands: loki --help, loki <command> --help, and loki_cli/main.py
  • Source tree: https://github.com/wundercorp/loki

Never answer "Loki can't do that" from memory. Loki ships far more than this skill body describes, and the index exists so a negative answer is always checkable.

Quick Start

# Install (shell installer — sets up uv, Python, the venv, and the launcher)
curl -fsSL https://loki.computer/install.sh | bash

# Interactive chat (default surface; set display.interface: tui to launch the Ink TUI instead)
loki

# Single query
loki chat -q "What is the capital of France?"

# Setup wizard  /  pick model+provider  /  health check
loki setup
loki model
loki doctor

# Other surfaces
loki desktop                 # launch the native desktop app (alias: loki gui)
loki dashboard               # web admin panel + embedded chat
loki proxy                   # OpenAI-compatible local proxy backed by your OAuth provider

Key Paths

~/.loki/config.yaml       Main configuration (settings — never secrets)
~/.loki/.env              API keys and secrets ONLY (under $LOKI_HOME if set)
$LOKI_HOME/skills/        Installed skills
~/.loki/skins/            Custom themes (see references/themes.md)
~/.loki/desktop-plugins/  Desktop app UI plugins (see references/desktop-plugins.md)
~/.loki/tui-widgets/      TUI widget apps (see references/tui-widgets.md)
~/.loki/pets/             Installed pet mascots (see references/petdex.md)
~/.loki/state.db          Canonical session store (SQLite + FTS5)
~/.loki/sessions/         Gateway routing index, request dumps, *.jsonl transcripts
~/.loki/logs/             Gateway and error logs
~/.loki/auth.json         OAuth tokens and credential pools
~/.loki/loki-agent/     Source code (if git-installed)

Profiles use ~/.loki/profiles/<name>/ with the same layout. When a profile is active, resolve the real home from $LOKI_HOME — never hardcode ~/.loki.

Routing Table — load the reference for the task

User wants...Load
Anything not listed below — "can Loki do X?", "how do I set up X?"https://loki.computer/docs/llms.txt
Bots that chat, run routines, or message each other; the Bots tabdocs: /user-guide/bot-mode
CLI commands, subcommands, flags, "how do I run X"references/cli-reference.md
In-session slash commandsreferences/slash-commands.md
Provider setup, API keys, OAuthreferences/providers-and-models.md
config.yaml sections, toolsets, voice/STT/TTSreferences/configuration.md
AGENTS.md / .loki.md / CLAUDE.md project rulesreferences/project-context-files.md
Secret redaction, PII, approval modes, "reset permissions"references/security-privacy.md
Delegation, cron, curator, kanbanreferences/background-systems.md
MCP servers (add, catalog, loki mcp)references/native-mcp.md
Webhook routes and event-driven runsreferences/webhooks.md
A custom theme/skin ("synthwave theme", "change the gold ●")references/themes.md + templates/skin.yaml
A desktop app UI element (pane, widget, ⌘K command, page)references/desktop-plugins.md + templates/plugin.js
A live TUI panel or modal widget (ticker, clock, dashboard)references/tui-widgets.md + templates/clock.mjs
Pet mascots — install, select, scale, diagnosereferences/petdex.md
Windows-specific issues (keybinds, WinError 10106, BOM)references/windows-quirks.md
Debugging: voice, tools missing, gateway, aux modelsreferences/troubleshooting.md
Contributing code: adding tools, slash commands, testsreferences/contributor-guide.md
delegate_task "capped at N" reportsreferences/delegate-task-concurrency-diagnosis.md
"Can app X use my WunderCorp Portal subscription/OAuth?"references/portal-auth-for-third-party-apps.md
Connecting a messaging platform (Telegram, Discord, Slack, WhatsApp, …)docs: /user-guide/messaging

The reference list above is not the feature list — it is the set of topics that need more than their docs page. For everything else Loki ships, fetch llms.txt and it maps the question to the page that answers it.

Two theming rules that hold even without loading the reference: you apply skins yourself (loki config set display.skin <name> — every surface repaints live within ~a second; don't tell the user to run /skin), and to tweak one color, edit the ACTIVE skin (loki skin set <key> <hex>) — never fork default, which drops the palette and resets the background.

Spawning Additional Loki Instances

Run additional Loki processes as fully independent subprocesses — separate sessions, tools, and environments.

When to Use This vs delegate_task

delegate_taskSpawning loki process
IsolationSeparate conversation, shared processFully independent process
DurationMinutes (bounded by parent loop)Hours/days
Tool accessSubset of parent's toolsFull tool access
InteractiveNoYes (PTY mode)
Use caseQuick parallel subtasksLong autonomous missions

One-Shot Mode

terminal(command="loki chat -q 'Research GRPO papers and write summary to ~/research/grpo.md'", timeout=300)

# Background for long tasks:
terminal(command="loki chat -q 'Set up CI/CD for ~/myapp'", background=true)

Interactive PTY Mode (via tmux)

Loki uses prompt_toolkit, which requires a real terminal. Use tmux for interactive spawning:

# Start
terminal(command="tmux new-session -d -s agent1 -x 120 -y 40 'loki'", timeout=10)

# Wait for startup, then send a message
terminal(command="sleep 8 && tmux send-keys -t agent1 'Build a FastAPI auth service' Enter", timeout=15)

# Read output
terminal(command="sleep 20 && tmux capture-pane -t agent1 -p", timeout=5)

# Send follow-up
terminal(command="tmux send-keys -t agent1 'Add rate limiting middleware' Enter", timeout=5)

# Exit
terminal(command="tmux send-keys -t agent1 '/exit' Enter && sleep 2 && tmux kill-session -t agent1", timeout=10)

Multi-Agent Coordination

# Agent A: backend
terminal(command="tmux new-session -d -s backend -x 120 -y 40 'loki -w'", timeout=10)
terminal(command="sleep 8 && tmux send-keys -t backend 'Build REST API for user management' Enter", timeout=15)

# Agent B: frontend
terminal(command="tmux new-session -d -s frontend -x 120 -y 40 'loki -w'", timeout=10)
terminal(command="sleep 8 && tmux send-keys -t frontend 'Build React dashboard for user management' Enter", timeout=15)

# Check progress, relay context between them
terminal(command="tmux capture-pane -t backend -p | tail -30", timeout=5)
terminal(command="tmux send-keys -t frontend 'Here is the API schema from the backend agent: ...' Enter", timeout=5)

Session Resume

# Resume most recent session
terminal(command="tmux new-session -d -s resumed 'loki --continue'", timeout=10)

# Resume specific session
terminal(command="tmux new-session -d -s resumed 'loki --resume 20260225_143052_a1b2c3'", timeout=10)

Tips

  • Prefer delegate_task for quick subtasks — less overhead than spawning a full process
  • Use -w (worktree mode) when spawning agents that edit code — prevents git conflicts
  • Set timeouts for one-shot mode — complex tasks can take 5-10 minutes
  • Use loki chat -q for fire-and-forget — no PTY needed
  • Use tmux for interactive sessions — raw PTY mode has \r vs \n issues with prompt_toolkit
  • For scheduled tasks, use the cronjob tool instead of spawning — handles delivery and retry
  • "delegate_task is capped at N" reports — see references/delegate-task-concurrency-diagnosis.md. Three real cap paths in Loki; if none fired, the model is self-limiting and rationalising it as "the runtime caps."
  • "Can $external_app use my WunderCorp Portal subscription / OAuth?" — see references/portal-auth-for-third-party-apps.md. Walk the user through three layers (plugin-vs-app, what Portal actually exposes, local-broker-proxy option).

Surfaces (quick orientation)

  • Desktop app (loki desktop / loki gui) — native Electron app for macOS/Linux/Windows: streaming chat, session list, Cmd+K palette, drag-and-drop files, native notifications, per-profile remote-gateway login. Extend it with UI plugins — references/desktop-plugins.md.
  • Web dashboard (loki dashboard) — full admin panel: messaging channels, MCP catalog, webhooks, memory, profile builder, plus an embedded loki --tui chat. Secured behind an OAuth/token gate.
  • Ink TUI (loki --tui or display.interface: tui) — terminal UI with docked widget apps — references/tui-widgets.md.
  • OpenAI-compatible proxy (loki proxy) — a local OpenAI API backed by whichever OAuth provider you're signed into. Point Codex CLI, Aider, Cline, or any script at it — no API key.

Hard Invariants (never violate, regardless of what you loaded)

  • Never break prompt caching — don't change past context, toolsets, or the system prompt mid-conversation. The only exception is context compression.
  • Message role alternation — never two assistant or two user messages in a row; only tool results can repeat.
  • Secrets in .env, settings in config.yaml — never tell a user to put a non-credential setting in .env.
  • Profile-safe paths — get_loki_home() in code, $LOKI_HOME when resolving paths in a session.
  • Never hand-edit config.yaml for the user — use loki config set KEY VAL; a stray indent can corrupt the file and break the live gateway.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.