Loki Mode stands on the shoulders of giants. This project incorporates research, patterns, and insights from the leading AI labs, academic institutions, and practitioners in the field.
Loki Mode is built for Claude and incorporates Anthropic's cutting-edge research on AI safety and agent development.
| Paper/Resource | Contribution to Loki Mode |
|---|
| Constitutional AI: Harmlessness from AI Feedback | Self-critique against principles, revision workflow |
| Building Effective Agents | Evaluator-optimizer pattern, parallelization, routing |
| Claude Code Best Practices | Explore-Plan-Code workflow, context management |
| Simple Probes Can Catch Sleeper Agents | Defection probes, anomaly detection patterns |
| Alignment Faking in Large Language Models | Monitoring for strategic compliance |
| Visible Extended Thinking | Thinking levels (think, think hard, ultrathink) |
| Computer Use Safety | Safe autonomous operation patterns |
| Sabotage Evaluations | Safety evaluation methodology |
| Effective Harnesses for Long-Running Agents | One-feature-at-a-time pattern, Playwright MCP for E2E |
| Claude Agent SDK Overview | Task tool, subagents, resume parameter, hooks |
DeepMind's research on world models, hierarchical reasoning, and scalable oversight informs Loki Mode's architecture.
OpenAI's Agents SDK and deep research patterns provide foundational patterns for agent orchestration.
AWS Bedrock's multi-agent collaboration patterns inform Loki Mode's routing and dispatch strategies.
Key Pattern Adopted: Routing Mode Optimization - Direct dispatch for simple tasks (lower latency), supervisor orchestration for complex tasks (full coordination).
| Paper | Authors/Source | Contribution |
|---|
| Chain-of-Verification Reduces Hallucination in LLMs | Dhuliawala et al., Meta AI, 2023 | 4-step verification (Draft -> Plan -> Execute -> Verify), factored execution, significant hallucination reduction (23% F1 improvement, ~77% reduction in hallucinated entities) |
| Paper | Authors/Source | Contribution |
|---|
| MemEvolve: Meta-Evolution of Agent Memory Systems | Zhang et al., OPPO AI Agent Team, 2025 | Modular design (Encode/Store/Retrieve/Manage), task-aware strategy selection, 17.06% improvement via meta-evolution |
| A-MEM: Agentic Memory for LLM Agents | Xu et al., NeurIPS 2025 | Zettelkasten-style atomic notes with keywords, tags, and bidirectional links; ChromaDB indexing |
| MemGPT: Towards LLMs as Operating Systems | Packer et al., 2023 | OS-inspired hierarchical memory (Core/Recall/Archival), self-editing memory via tool use, paging policies |
| Zep: Temporal Knowledge Graph Architecture | Zep AI, 2025 | Bi-temporal model (event time + ingestion time), knowledge invalidation, 94.8% DMR accuracy |
| SimpleMem: Efficient Lifelong Memory | aiming-lab, 2026 | Semantic lossless compression, online semantic synthesis, 30x token reduction, 26.4% F1 improvement |
| CAM: Constructivist Agentic Memory | Rui et al., NeurIPS 2025 | Piaget-inspired hierarchical schemata, overlapping clustering, prune-and-grow retrieval |
| SAGE: Self-evolving Agents with Reflective Memory | 2024 | Ebbinghaus forgetting curve, usage-based decay, three-agent collaboration for memory refinement |
| Contextual Retrieval | Anthropic, 2024 | Contextual BM25 + embeddings + reranking, 67% retrieval failure reduction |
| Memory in the Age of AI Agents (Survey) | Liu et al., 2025 | Forms-Functions-Dynamics taxonomy, comprehensive memory architecture survey |
Battle-tested insights from practitioners deploying agents in production.
Special thanks to thought leaders whose patterns and insights shaped Loki Mode:
| Contributor | Contribution |
|---|
| Boris Cherny (Creator of Claude Code) | Self-verification loop (2-3x quality improvement), extended thinking mode, "Less prompting, more systems" philosophy |
| Ivan Steshov | Centralized constitution, agent lineage tracking, structured artifacts as contracts |
| Addy Osmani | Git checkpoint system, specification-first approach, visual aids (Mermaid diagrams) |
| Simon Willison | Sub-agents for context isolation, skills system, context curation patterns |
Key patterns incorporated from practitioner experience:
| Pattern | Source | Implementation |
|---|
| Human-in-the-Loop (HITL) | HN Production Discussions | Confidence-based escalation thresholds |
| Narrow Scope (3-5 steps) | Multiple Practitioners | Task scope constraints |
| Deterministic Validation | Production Teams | Rule-based outer loops (not LLM-judged) |
| Context Curation | Simon Willison | Manual selection, focused context |
| Blind Review + Devil's Advocate | CONSENSAGENT | Anti-sycophancy protocol |
| Hierarchical Reasoning | DeepMind Gemini | Orchestrator + specialized executors |
| Constitutional Self-Critique | Anthropic | Principles-based revision |
| Debate Verification | DeepMind | Critical change verification |
| One Feature at a Time | Anthropic Harness | Single feature per iteration, full verification |
| E2E Browser Testing | Anthropic Harness | Playwright MCP for visual verification |
| Chain-of-Verification | arXiv 2309.11495 | CoVe protocol in quality-gates.md |
| Factored Verification | arXiv 2309.11495 | Independent verification execution |
| Modular Memory Design | arXiv 2512.18746 | Encode/Store/Retrieve/Manage mapping in memory-system.md |
| Task-Aware Memory Strategy | arXiv 2512.18746 | Retrieval weight adjustment by task type |
| Pattern | Source | Implementation |
|---|
| Git Worktree Isolation | Claude Code Docs | skills/parallel-workflows.md, run.sh --parallel |
| Parallel Testing Stream | Claude Code Docs | Testing worktree tracks main, continuous validation |
| Inter-Stream Signals | Custom | .loki/signals/ for feature/test/docs coordination |
| Auto-Merge Workflow | Custom | Completed features merge back automatically |
| Pattern | Source | Implementation |
|---|
| Agent Cards | A2A Protocol | .loki/state/agents/ capability discovery |
| Structured Handoffs | A2A Protocol | JSON message format for agent-to-agent communication |
| Sub-Agent Spawning | awesome-agentic-patterns | Task tool with focused prompts |
| Dual LLM Pattern | awesome-agentic-patterns | Opus for planning, Haiku for execution |
| CI Feedback Loop | awesome-agentic-patterns | Test results injected into retry prompts |
| Minimal Orchestration | moridinamael | Simple continuation over complex frameworks |
The following open-source projects have pioneered patterns that influence or complement Loki Mode. Analyzed January 2026.
| Project | Stars | Key Patterns | Contribution to Loki Mode |
|---|
| Superpowers (obra) | 35K+ | Two-Stage Review, TDD Iron Law, Rationalization Tables | ADOPTED: Two-stage review (spec compliance THEN code quality) |
| agents (wshobson) | 26K+ | 72 plugins, 108 agents, 129 skills, Four-Tier Model Strategy | Plugin marketplace architecture inspiration |
| claude-flow (ruvnet) | 12K+ | Swarm topologies (hierarchical/mesh/ring/star), Consensus algorithms (Raft, Byzantine, CRDT) | Terminal-based orchestration patterns |
| oh-my-claudecode (Yeachan-Heo) | N/A | 32 agents, 35 skills, Tiered architecture (LOW/MEDIUM/HIGH), Delegation-first | ADOPTED: Tiered agent escalation protocols |
| Pattern | Source | Implementation in Loki Mode |
|---|
| Two-Stage Review | Superpowers | Spec compliance review BEFORE code quality review |
| Rationalization Tables | Superpowers | Explicit counters to common agent excuses/rationalizations |
| Progressive Disclosure Memory | claude-mem | 3-layer context: index -> timeline -> full details |
| Tiered Agent Escalation | oh-my-claudecode | LOW -> MEDIUM -> HIGH with explicit escalation triggers |
| File-Based Planning | planning-with-files | Persistent markdown files (task_plan.md, findings.md, progress.md) |
| PreToolUse Attention | planning-with-files | Re-read goals before actions to combat context drift |
| Fresh Subagent Per Task | Superpowers | Clean context for each major task, prevents cross-contamination |
| Pattern | Source | Status | Notes |
|---|
| Token Economics Tracking | claude-mem | Evaluating | discovery_tokens vs read_tokens for compression analysis |
| Delegation Enforcer Middleware | oh-my-claudecode | Evaluating | Auto-inject model parameters based on task tier |
| Swarm Topologies | claude-flow | Not adopted | Adds complexity beyond hierarchical orchestration |
| Consensus Algorithms | claude-flow | Not adopted | Byzantine/Raft overkill for single-user autonomous operation |
| Shortcut Commands | claude-code-guide | Evaluating | QNEW/QCODE/QCHECK for rapid task switching |
The Cross-Project Learning feature (v5.9.0) incorporates research from the following sources:
| Resource | Contribution |
|---|
| A-MEM | Zettelkasten atomic note pattern - each learning is self-contained with keywords and tags |
| MemGPT | Tiered memory architecture (hot/warm/cold) for efficient retrieval |
| Zep | Temporal validity tracking (valid_from, valid_until, superseded_by) |
| SimpleMem | MD5 hash-based deduplication at write time |
| SAGE | Usage tracking with access counts and decay |
| Anthropic Contextual Retrieval | Contextual prefixes for improved retrieval |
| Agent Memory Paper List | Comprehensive survey of memory architectures |
| Pattern | Source | Implementation |
|---|
| JSONL Append-Only Storage | SimpleMem | ~/.loki/learnings/*.jsonl for efficient writes |
| MD5 Hash Deduplication | SimpleMem | Prevent duplicate entries at write time |
| Keyword/Tag Extraction | A-MEM | Auto-generated tags for filtering (planned v5.10) |
| Usage Tracking | SAGE | Access counts and timestamps (planned v5.10) |
| Temporal Validity | Zep | Track when learnings become outdated (planned v5.11) |
| Cross-Learning Links | A-MEM | Bidirectional knowledge graph (planned v6.0) |
| Memory Consolidation | MemGPT | Periodic deduplication and abstraction (planned v6.0) |
Based on research synthesis, the following improvements are planned:
Phase 1 (v5.10.x): Deduplication improvements, usage tracking, keyword extraction
Phase 2 (v5.11.x): BM25 search, contextual prefixes, temporal validity
Phase 3 (v6.0.x): Zettelkasten-style links, memory tiering
Phase 4 (v7.0.x): Hierarchical abstraction, consolidation pipeline
This acknowledgements file documents the research and resources that influenced Loki Mode's design. All referenced works retain their original licenses and copyrights.
Loki Mode itself is released under the MIT License.
Last updated: v5.9.0