v0.4.0
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
Configstruct.
⚠️ 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_otherfallback 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
RenderModeenum 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-researchand a rebuilt graph-basedcoder - See
graph.example.yamland 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) andloki --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
ScriptedLanguagetrait - Demo TypeScript tool and a
get_current_weatherexample - 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-helperagent with the more generalatlassianrole - Documentation migrated from in-repo to the GitHub Wiki
Refactors
- Removed the monolithic
Configstruct, splitting it intoAppConfig,AppState, andRequestContext - LLM graph nodes refactored to use Roles so they behave like inline roles
next_nodeandapply_state_updatesconsolidated intoLlmExecutor- Common Python parser logic extracted into a shared module
Bug Fixes
- LLM node
next_singlebug and improved outcome handling - Inline RAG bug when globbing files by extension without subdirectory globs
RagCachenot being threaded through to agent / sub-agent instantiationagent__collectfreezing 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_lengthnow 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-agentscripts
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_contexttests, 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)