Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 May 02:02

This one's big. This one brings all of the new features! (and refactorings (and bug fixes))

This release ships

  • A new declarative graph-based agent system
  • The ability to install configuration bundles from any git repository
  • In-place self-update
  • TypeScript tool support
  • Full HTTP/SSE MCP transports
  • And a long-overdue split of the monolithic Config struct.

⚠️ Breaking Changes

MCP Configurations Now Require a type Field

MCP server entries now declare their transport type explicitly. Existing configs that omit it will fail to load.

Old:

{
  "mcpServers": {
    "my-server": {
      "command": "uvx",
      "args": ["mcp-server-foo"]
    }
  }
}

New:

{
  "mcpServers": {
    "my-server": {
      "type": "stdio",
      "command": "uvx",
      "args": ["mcp-server-foo"]
    }
  }
}

One-liner migration

Adds "type": "stdio" to every existing MCP server in your mcp.json (idempotent; skips entries that already have a type):

F=$(loki --info | grep -i functions_dir | awk '{print $2 "/mcp.json";}') && jq '.mcpServers |= with_entries(.value |= (if has("type") then . else . + {type: "stdio"} end))' "$F" > "$F.tmp" && mv "$F.tmp" "$F"

New Features

Graph-Based Agents

A new declarative, YAML-driven agent system where an agent is defined as a directed graph of typed nodes.

  • Node types: LLM, native agent, script, RAG, approval, user-input, and Map (fan-out / parallel branches)
  • Frontier-based scheduler for parallel super-step execution
  • State management with per-super-step staging area and built-in reducers
  • Graph validation at load time — catches read/write conflicts, dependency cycles, and invalid map chaining before execution
  • Structured output extraction for LLM and agent nodes
  • Structured logging for graph execution
  • Approval nodes support an on_other fallback for free-text alternatives when none of the predefined options match
  • Agent variables with the same env-var flexibility as normal tool calls
  • Branch progress tracker and a RenderMode enum to keep sub-agent stdout from clobbering during parallel execution
  • LLM-node failure propagation up the graph
  • Unified config: a single file defines an agent as either a normal agent or a graph agent
  • Ships with two example graph agents: deep-research and a rebuilt graph-based coder
  • See graph.example.yaml and the Graph Agents Wiki page for the full spec

Remote Asset Installation (.install remote)

Install bundles of agents, roles, macros, tools, and MCP servers from any git repository.

  • Writes assets to disk with interactive category selection
  • MCP config merging when installing remote bundles
  • Interactive secret prompting when a remote MCP config references secrets Loki doesn't have
  • REPL tab completion for .install remote

Self-Update

  • loki .update (from the REPL) and loki --update (from the CLI) update Loki in place

New REPL Commands

  • .install — install bundled assets on demand
  • .edit — open the MCP config file in your editor

TypeScript Tool Support

  • First-class TypeScript custom tools via a refactored ScriptedLanguage trait
  • Demo TypeScript tool and a get_current_weather example
  • The Python demo tool was expanded to showcase all parameter types and variations

MCP Server Transport Types

  • Full HTTP/SSE transport support in MCP configs — Loki now accepts Claude Code-compatible MCP configurations
  • Legacy SSE transport retained
  • Native-TLS support via an upgraded rmcp

Improvements

  • More comprehensive first-run default config so new users are productive immediately
  • Auto-continue support extended to all contexts (not just sessions)
  • Dynamic tab completions now scope sessions per agent instead of dumping global sessions
  • Python tools now parse via tree-sitter queries instead of AST walking; shared parser module across languages
  • Automatic runtime customization via shebangs for scripted tools
  • Replaced the jira-helper agent with the more general atlassian role
  • Documentation migrated from in-repo to the GitHub Wiki

Refactors

  • Removed the monolithic Config struct, splitting it into AppConfig, AppState, and RequestContext
  • LLM graph nodes refactored to use Roles so they behave like inline roles
  • next_node and apply_state_updates consolidated into LlmExecutor
  • Common Python parser logic extracted into a shared module

Bug Fixes

  • LLM node next_single bug and improved outcome handling
  • Inline RAG bug when globbing files by extension without subdirectory globs
  • RagCache not being threaded through to agent / sub-agent instantiation
  • agent__collect freezing on sub-agent escalations
  • Crash when switching to an agent while a session was active
  • MCP servers being re-started on role switch when a session was already active
  • Todo instructions being appended even when function calling was disabled
  • Panic on empty message list during regenerate
  • estimate_token_length now uses the standard word-count method
  • Crate name (loki-ai) vs. binary name (loki) mismatch breaking dynamic completions
  • PollSender lock bug in SSE transport
  • TypeScript function args being passed as objects instead of as direct parameters
  • Various Windows fixes (function calling, binary path shadowing, generalized executable-bit script detection)
  • Merged the required Claude Code system prompt into instructions
  • Argc argument passing in run-tool / run-agent scripts

Testing

Substantial test expansion across the codebase:

  • Integration tests for the parallel frontier-based graph scheduler
  • Integration tests for sub-agent spawning and inter-agent communication
  • Integration tests for cross-feature interactions (RAG + agents, function calling/MCP, etc.)
  • Unit tests for RAG, completions/prompt, macros, vault, and functions/tool usage
  • REPL command + CLI flag tests, request_context tests, input tests
  • Tool-call dispatch/tracking and MCP server lifecycle tests

Build / Chore

  • Rust upgraded to 1.95.0
  • Dependencies updated to latest (reqwest, crossterm, reedline, rand, etc.); unused deps removed
  • Removed the deprecated Claude Haiku 3.5 model
  • Updated models.yaml

AI Use Disclosure

The above release notes were created by Claude Opus 4.7 and reviewed and revised by myself, @Dark-Alex-17.

All code (the graph system, the refactored configuration structure, the new self-update and configuration sharing system, etc.) was
first designed by myself and tested out with simple POCs. AI was used to do the implementation step-by-step with myself
intervening between each step to review, sometimes write more complex code manually (because I don't trust it), and make
changes and catch bugs.

All bugs that emerge as part of this release and any new code added are fully my responsibility
and fully created by myself.

Every line of code written was thoroughly reviewed, tested, and devised by myself prior to any commit.

Models used:

  • Claude (Opus, Sonnet, and Haiku)
  • OpenAI (GPT 5.2, 4o, o4-mini)
  • Ollama (Gemma4, Phi4, Qwen3, llama3.3)
  • Mistral (Codestral and Devstral)
  • Gemini (3.0-pro-preview and 3.1-pro-preview)