An open-source agent harness built in Go, designed for finetuning small models into capable agents.
nalvin gives any OpenAI-compatible model a rich tool environment — file I/O, Docker containers, Git repos, a knowledge base, MCP integrations, sub-agents — and manages the hard parts of long-running agentic tasks (context overflow, giant tool results, multi-agent orchestration). Every agent run is recorded as a detailed trace in SQLite, producing structured training data that captures tool call sequences, parallel execution patterns, error recovery, and multi-step reasoning.
The goal: run a frontier model (Claude, GPT) and a small local model (Qwen 3.5 4B/9B) on the same tasks, then use the frontier traces to finetune the small model until it matches or exceeds the frontier model's agentic behavior — at a fraction of the cost. See the finetuning plan for the full approach, including a three-model comparison that identifies the exact behavioral gaps to close.
Built on charm.land/fantasy, the Charm CLI model-interaction library.
Most agent harnesses give the model a run_shell tool and hope for the best. nalvin takes a different approach:
- No host shell execution. The agent cannot run arbitrary commands on your machine. All command execution happens inside Docker containers via
docker exec. This is fundamentally safer than harnesses that hand the model a shell on the host. - Programmatic tool calling via a cross-platform shell. Instead of host exec, nalvin provides a POSIX shell environment where every agent tool is a command. The shell is powered by mvdan/sh, a pure-Go POSIX interpreter — it works identically on macOS, Linux, and Windows with no system shell dependency. Tools become composable:
glob --pattern "*.go" | jq -r '.paths[]' | head -20. - Tool search, not tool dumps. Rather than sending dozens of tool definitions to the model on every turn, nalvin keeps most tools hidden and provides a
search_toolscommand backed by FTS5. The model discovers tools by describing what it needs. This keeps prompt size small and scales to large tool catalogs. - Tool output spillover. When a tool returns a huge result (a large file, a long web page), the runtime stores the full output in SQLite and sends the model a compact summary with an
output_id. The model can then page through or grep the stored output on demand, without blowing up context. - Conversation compaction. Long runs are automatically summarized when they approach the context window limit. The runtime summarizes older messages into a structured checkpoint, preserving references to spilled tool outputs, and keeps recent turns intact. Compaction is incremental — each round folds into the previous checkpoint.
- Multiple local workspaces. Each workspace is a directory plus a SQLite database. The database stores agent runs, a knowledge graph (nodes + edges with FTS and embedding columns ready for vector search / reciprocal rank fusion), scheduler state, and tool output history. Switch between workspaces with a flag.
- First-class sub-agents. Inspired by codex-rs, nalvin supports spawning child agents with independent conversation histories and tool selections. The parent communicates through
spawn_agent,send_input,wait_agent, andclose_agent. Children are persisted as linked run records and can use a different provider than the parent. - Custom tools via embedded Go interpreter. Drop a
.gofile in~/.nalvin/custom-tools/and it becomes a tool. Files are compiled at runtime by the embedded Scriggo interpreter. Custom tools can call any other tool viatool.CallTool(), appear insearch_tools, and work in the shell — no rebuild required. - Skills system. A skill is a
SKILL.md(plus optional scripts and references) that activates on demand to teach the agent a specific workflow. Activation injects the skill body into the system prompt, optionally autoreveals tools, and can run scripted commands in a sandboxed container viaskill_exec. Skills come from three layers: bundled (compiled into the binary), workspace (<workspace>/.nalvin/skills/), and user (~/.nalvin/skills/). Theskill://URL scheme lets the agent read a skill's bundled resources through normal file tools.
- Go 1.26+
- Bun (for the web frontend and dev scripts)
- Docker (optional, for container tools)
git clone https://github.com/versionlens/OpenNalvin.git
cd OpenNalvin
go mod tidy
bun installThe project uses a Makefile that passes the required -tags sqlite_fts5 build tag automatically:
make build # Build web frontend + Go binary
make build-api # Go binary only
make build-web # Web frontend only
make test # Run all tests (Go + web)
make test-go # Go tests only
make dev # API + web with hot reload
make cli ARGS="--workspace myproject agent run -p 'hello'"All make targets set GOFLAGS=-tags=sqlite_fts5 so you don't need to specify it manually. If you run go commands directly, remember to pass -tags sqlite_fts5.
Create ~/.nalvin/config.yaml with one or more providers. The default provider is used unless you specify --provider <name>:
providers:
default:
type: openai
api_key: ${OPENAI_API_KEY}
model: gpt-5.4
context_window_tokens: 128000
claude:
type: anthropic
api_key: ${ANTHROPIC_API_KEY}
model: claude-sonnet-4-6
context_window_tokens: 200000Three provider types are supported:
| Type | Description |
|---|---|
openai |
OpenAI API (default if type is omitted and no base_url is set) |
anthropic |
Anthropic API |
openai_compat |
Any OpenAI-compatible API (requires base_url) |
For local servers like LM Studio, Ollama, llama.cpp, or vLLM:
providers:
local:
base_url: http://localhost:1234/v1
model: local-model
context_window_tokens: 32000Use a specific provider for a run:
nalvin --workspace myproject agent run --provider claude -p "Summarize all files in the workspace"Local models vary widely in tool-calling reliability. nalvin includes several features that help smaller models succeed at multi-step tasks:
- Tool discovery via
search_toolskeeps the visible tool set small, reducing prompt size and model confusion. Only a handful of tools are pinned (visible from the start); the rest are discovered on demand. - Todo-based continuation — when the model creates a todo list with
todowritebut stops before completing all items, the runtime automatically nudges it to continue (up to 5 retries). Each nudge names the specific incomplete todo item and instructs the model to act immediately. This compensates for local models that emit premature stop tokens mid-task. - System prompt tuning — the base system prompt includes a numbered workflow (
todowrite→search_tools→ do work → update todos) and a concrete example, both designed to guide smaller models through multi-step tasks.
For model-specific setup guides, see:
The agent can only see files inside its workspace directory (~/.nalvin/workspaces/<name>/). It does not have access to your host filesystem, your current directory, or any path outside the workspace. To work with existing files, copy them into the workspace first.
# Create a workspace
nalvin workspace create myproject
# Copy files into it
nalvin --workspace myproject workspace put ./my-notes.md notes.md
# Run the agent
nalvin --workspace myproject agent run -p "What tools do you have available? Use search_tools to find out."
# Run with verbose output to see tool calls
nalvin --workspace myproject agent run --verbose -p "List the files in the workspace and summarize them"# Start the API server and web frontend
bun run dev
# Or start them separately
bun run dev:api # Go API on :4210
bun run dev:web # Vite dev server on :4211, proxies /api to GoOpen http://localhost:4211 to browse agent runs, inspect tool calls, view spilled outputs, and start new conversations.
There is an experimental Flutter-based client at VersionLens/OpenNalvin_app. It is not production-ready and exists to explore what a cross-platform client for OpenNalvin could look like across iOS, Android, macOS, Linux, and Windows.
A skill is a Markdown file (SKILL.md) plus optional scripts and references that teaches the agent a specific workflow. When a skill is active, its body is injected into the system prompt and any autoreveal_tools it lists become visible to the model without going through search_tools.
Skills are the agent's first stop for figuring out how to approach a task. The intended priority is:
- Active skills — system-activation skills are always on; manual skills can be activated by the user (
--skill <name>), by config (agent.skills.default_active), or by the agent itself mid-run via theskilltool when a relevant one is found. - Skill search —
agent skills list/agent skills searchfor the model to discover a workflow that already encodes how to approach the task (and which tools to reach for). - Tool search — fall back to
search_toolsonly when no skill covers the task and the autorevealed tool set is insufficient.
Skills are loaded from three layers (later wins):
- Bundled — compiled into the binary under
internal/agent/skills/. - Workspace —
<workspace>/.nalvin/skills/<name>/for skills shared with a specific project. - User —
~/.nalvin/skills/<name>/for skills available across all workspaces.
The bundled set covers the common workflows a coding agent needs:
| Skill | Activation | Purpose |
|---|---|---|
execution-discipline |
system | Keep execution literal, concise, and scoped to the user's requested result. |
workspace-and-file-access |
system | Interpret workspace questions correctly and use file tools for local paths. |
research-and-tool-discovery |
system | Discover the right tools early; prefer domain-specific tools over generic workarounds. |
subagent-orchestration |
system (root) | Decide when to spawn child agents; keep orchestration tight and local-first. |
todo-tracking |
system (root) | Maintain a structured todo list for substantial multi-step work. |
memory-management |
system (root) | Use workspace memory for ad-hoc cross-run recall; use knowledge skills for curated topic-scoped stores. |
shell-composition |
manual | Use the shell tool for loops, pipelines, batching, and atomic multi-step workflows. |
python-in-containers |
manual | Use uv instead of pip inside containers; bind dev servers to 0.0.0.0. |
skill-curator |
manual | Inspect, activate, and maintain managed skills safely. |
system-activation skills inject themselves into every applicable run automatically. manual skills wait to be activated. run_scopes: [root] means the skill applies only to top-level runs (not sub-agents).
Each skill has YAML frontmatter under metadata.agent:
---
name: shell-composition
description: Use the shell tool for loops, pipelines, and atomic multi-step workflows.
metadata:
agent:
activation: manual # manual | system | always
run_scopes: [root, child]
autoreveal_tools: [shell, bash]
tool_hints: [shell]
---skill_exec runs scripts declared in a skill's optional manifest.yaml (commands:, setup:, exec: blocks) inside a per-workspace docker container (nalvin-skill-runner-<workspace>-cmd-<sha8>). File-based locking and lease tracking prevent concurrent collisions. Cleanup with agent skills cleanup-containers.
skill:// URL scheme lets file tools (view, ls, glob, grep) resolve paths against active skills' bundled resources:
view --path "skill://shell-composition/SKILL.md"
glob --pattern "skill://python-in-containers/**/*.py"Skill profiles (optional, under metadata.agent.profile) can override the run's provider, fallback chain, and exclusive tool set. Useful for skills that want to run a child sub-agent on a faster/cheaper model.
Manage skills via the CLI:
nalvin --workspace <ws> agent skills list
nalvin --workspace <ws> agent skills search <query>
nalvin --workspace <ws> agent skills show <name>
nalvin agent skills browse [query] # remote installable skills
nalvin agent skills install <git-url-or-path> # install into ~/.nalvin/skills
nalvin agent skills create <name> # scaffold a new managed skill
nalvin agent skills modify <name> # edit files inside a managed skill
nalvin --workspace <ws> agent skills cleanup-containersConfigure in config.yaml:
agent:
skills:
enabled: true
user_dir: ~/.nalvin/skills
workspace_dir: "" # default: <workspace>/.nalvin/skills
default_active:
- shell-composition
- todo-trackingnalvin has a layered tool visibility model:
| State | Meaning |
|---|---|
| pinned | Visible to the model from the first turn |
| hidden | Enabled but invisible until discovered via search_tools or autorevealed by an active skill |
| revealed | Was hidden, now visible after a search_tools match or skill autoreveal |
| disabled | Exists but cannot be used in this run |
search_tools uses an in-memory FTS5 index over tool IDs, descriptions, keywords, and schema properties. Both concise keywords (git, docker) and natural-language queries (fetch a URL, create a knowledge base node) work. Treat search_tools as a fallback — if an active skill already autoreveals the right tools, use those directly.
Default tool visibility:
- Pinned:
search_tools, multi-agent control tools - Hidden (discoverable): file tools (
view,edit,write,grep,glob,ls), Git tools, Docker tools, news tools,web_fetch_get, knowledge base tools - Special:
view_tool_outputandgrep_tool_outputstay hidden until the first tool output spill in a run
Override visibility per-run with flags:
nalvin agent run \
--enable-tool kb_create_node \
--pin-tool web_fetch_get \
--disable-tool news_rss_headlines \
-p "Summarize this URL and save it as a KB node"Or set defaults in config.yaml:
agent:
tools:
default_enabled:
- kb_create_node
default_pinned:
- web_fetch_getThe shell tool gives the model a POSIX shell where every visible agent tool is a command:
# Tools output JSON; use jq to extract fields
view --path main.go | jq -r '.content' | head -20
# Compose tools with Unix utilities
glob --pattern "**/*.go" | jq -r '.paths[]' | while read f; do
grep --pattern "TODO" --path "$f" | jq -r '.matches[]'
done
# Fetch JSON APIs
web_fetch_get --url "https://api.example.com/data" | jq '.body_json.items[:5]'Available Unix utilities: cat, head, tail, wc, sort, uniq, tr, cut, tee, sed, xargs, fgrep, egrep, jq, mkdir, rm, cp, mv, touch, find, seq, date, tree.
Notably absent from PATH: docker, curl, git, python, node, go. These are replaced by the corresponding agent tools, keeping all I/O visible in the run trace.
Unlike most agent harnesses, nalvin does not give the model a shell on the host machine. Arbitrary command execution goes through Docker:
Model wants to run `npm install` →
uses search_tools to find docker tools →
docker_create_container (with workspace mount) →
docker_start_container →
docker_exec_foreground: sh -lc "cd /workspace && npm install"
This means:
- The host filesystem is never directly exposed to model-chosen commands
- Container state is isolated and disposable
- Long-running processes (dev servers, watchers) use
docker_exec_backgroundwith log tailing - Published ports make container services accessible from the host
When a tool result exceeds the provider's token limit (default 4000 tokens):
- The full output is stored in the workspace SQLite database
- The model receives a compact summary with
output_id, byte size, line count, and a preview view_tool_outputandgrep_tool_outputare revealed so the model can page through or search the stored result
This prevents a single large view or web_fetch_get from consuming the entire context window.
When total prompt size exceeds a configurable threshold (default 85% of the context window):
- The runtime selects a split point, keeping recent messages intact
- Older messages are summarized into a structured checkpoint (goal, decisions, completed work, open tasks, files touched, referenced tool outputs)
- The checkpoint is injected into the system prompt and the compacted messages are trimmed
- If the provider still rejects the prompt, aggressive compaction retries with fewer kept messages
Compaction is incremental — each round folds new content into the existing checkpoint. Spilled tool output references survive compaction, so the model can still page through outputs from earlier in the run.
The agent's file tools (view, edit, write, grep, glob, ls) are scoped to the active workspace directory under ~/.nalvin/workspaces/<name>/. The agent cannot read or write files outside this directory. To bring external files in, use nalvin workspace put; to extract files, use nalvin workspace get.
Each workspace is an isolated environment:
~/.nalvin/
├── config.yaml
├── workspace-db/
│ ├── myproject.sqlite # Runs, KB, tool outputs, scheduler
│ └── another.sqlite
├── workspaces/
│ ├── myproject/ # Workspace file tree
│ └── another/
├── git-repos/ # Managed bare Git repos
├── git/ # SSH keys
└── custom-tools/ # Custom .go tool files
The SQLite database per workspace stores:
- Agent runs: full trace with messages, tool calls, timing, token counts
- Knowledge graph: nodes and edges with FTS5 full-text search, plus
embedding BLOBcolumns ready for vector similarity search and reciprocal rank fusion (RRF) - Tool output history: spilled outputs with pagination and grep support
- Scheduler state: for recurring tasks
Parent agents can spawn children for parallel or delegated work:
spawn_agent(name="researcher", message="Find the top 5 Go ORMs by GitHub stars",
enabled_tool_ids=["web_fetch_get", "search_tools"],
pinned_tool_ids=["web_fetch_get"])
→ child runs with independent context, own tool set
→ parent continues working
→ wait_agent("researcher")
→ get_agent_result("researcher")
→ close_agent("researcher")
Children:
- Get their own conversation history (no context pollution)
- Can use a different provider (
agent.subagents.provider_namein config) - Are persisted as linked run records (visible in the web UI)
- Cannot spawn their own children (single level of nesting)
Drop a .go file in ~/.nalvin/custom-tools/:
package main
import (
"tool"
"strings"
)
// tool:name reverse_string
// tool:description Reverse a UTF-8 string.
// tool:keywords reverse,flip,mirror
type Input struct {
Text string `json:"text" description:"The string to reverse."`
}
func main() {
in := tool.GetInput()
text, _ := in["text"].(string)
runes := []rune(text)
for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
runes[i], runes[j] = runes[j], runes[i]
}
tool.SetOutput(map[string]any{"reversed": string(runes)})
}Custom tools can call other tools (tool.CallTool("view", ...)), appear in search_tools, and work as shell commands. The Scriggo interpreter provides a safe subset of the Go stdlib — filesystem and network access is blocked, funneled through tool.CallTool so it stays in the audit trail.
nalvin ships with built-in RSS and Reddit tools for information gathering. All three are enabled but hidden — the agent discovers them via search_tools.
news_rss_headlines fetches headlines from configured RSS feeds, organized by category. The default config includes curated feeds across several categories:
| Category | Feeds |
|---|---|
ai |
OpenAI Blog, DeepMind, Hugging Face, Ars AI, The Verge AI, AI News |
tech |
Ars Technica, The Verge, Hacker News, TechCrunch, Wired, Lobsters |
politics |
Politico, The Hill, BBC World, Al Jazeera, Guardian, NYT World |
analysis |
Foreign Policy, Foreign Affairs, The Diplomat, War on the Rocks, Defense One |
commentary |
Stratechery, Marginal Revolution, Matt Levine, Bellingcat, The Intercept |
news_reddit_top_posts fetches top posts from subreddit groups by category (tech, ai, politics, world, cyber, finance) with configurable time filters (hour/day/week/month/year/all).
news_reddit_post_details fetches a full Reddit post body, linked URL, metadata, and nested comment tree from a permalink.
Add your own feeds and subreddits in config.yaml:
rss:
feeds:
my-category:
- {name: my-blog, url: "https://example.com/feed.xml"}
reddit:
subreddits:
my-group: [subreddit1, subreddit2]nalvin connects to external Model Context Protocol servers, giving the agent access to third-party tool ecosystems. Two transports are supported: streamable_http for remote servers and stdio for local commands.
The default config includes two free MCP servers (no API key required):
- Exa (
mcp__exa__web_search_exa) — web search, pinned by default - DeepWiki — GitHub/docs wiki lookup, discoverable via
search_tools
Add your own MCP servers in config.yaml:
agent:
mcp_servers:
my-server:
transport: streamable_http
url: https://mcp.example.com/mcp
headers:
Authorization: Bearer ${MY_API_KEY}
enabled_by_default: true
local-tool:
transport: stdio
command: uvx
args: [my-mcp-server]
enabled_by_default: trueMCP tool IDs follow the pattern mcp__<server>__<tool>. Each agent run creates a fresh MCP session — sessions are not shared across concurrent runs.
Agent runs can execute inline or through a persistent job queue backed by River (with SQLite). The queue enables:
- Decoupled execution — the CLI or web UI submits a turn; a background worker picks it up
- Configurable concurrency — set
work.agent_workersto control how many agent runs execute in parallel - Job timeout —
work.agent_job_timeout(default 30m) prevents runaway runs - Turn-based architecture — each user message is a "turn" that gets enqueued independently, so multi-turn conversations flow through the same queue
# Run inline (default — blocks until done)
nalvin --workspace myproject agent run -p "Hello"
# Run through the queue (returns immediately, streams events)
nalvin --workspace myproject agent run --queue -p "Hello"
# Measure queue latency and time-to-first-token
nalvin --workspace myproject agent run --queue --timing -p "Hello"The --queue flag submits the run through a River worker. If no external worker is running, the CLI starts a temporary in-process worker automatically. The web UI always uses the queue path.
Configure workers in config.yaml:
work:
agent_workers: 1 # concurrent agent runs
agent_job_timeout: 30m # per-run timeoutWhen the server is running (nalvin serve), the worker pool processes queued runs. The web UI streams run events via SSE in real time.
Every agent run is recorded immutably in SQLite. The agent traces CLI is the curation pipeline that turns raw runs into a Tinker-compatible SFT dataset for finetuning small models on frontier behavior.
The flow has three stages:
- Triage — score raw runs by completion, tool-call activity, reasoning content, and error rate to find the ones worth reviewing.
- Curate — derive an editable copy of a raw run, then label, redact, edit messages, drop bad turns, and approve/reject.
- Export — emit approved curations as JSONL conversations in the Tinker SFT format (system/user/assistant/tool messages, tool calls, optional thinking parts), ready to feed a finetuning run.
# Triage: rank raw runs by review-worthiness
nalvin --workspace <ws> agent traces candidates --min-tool-calls 2 --max-tool-errors 0
# Inspect a single run with the review-oriented view
nalvin --workspace <ws> agent traces show <run-id> --view timeline
nalvin --workspace <ws> agent traces stats <run-id>
# Page through or grep a spilled tool output from a past run
nalvin --workspace <ws> agent traces output <run-id> <output-id> --offset 0 --limit 200
nalvin --workspace <ws> agent traces grep-output <run-id> <output-id> --pattern 'panic:'
# Curate: derive an editable copy, then label / edit / approve
nalvin --workspace <ws> agent traces derive <run-id> --title "git log refactor" --tag refactor
nalvin --workspace <ws> agent traces label <curation-id> --quality good --reward 1.0 --split train
nalvin --workspace <ws> agent traces redact <curation-id> --pattern 'sk-[A-Za-z0-9]{20,}'
nalvin --workspace <ws> agent traces msg replace <curation-id> <msg-ref> --content-file edit.txt
nalvin --workspace <ws> agent traces msg drop <curation-id> <msg-ref>
nalvin --workspace <ws> agent traces edit <curation-id> # opens curation JSON in $EDITOR
nalvin --workspace <ws> agent traces diff <curation-id> # diff vs source run
nalvin --workspace <ws> agent traces approve <curation-id>
# Batch: derive + label + approve in one step
nalvin --workspace <ws> agent traces curate <run-id-1> <run-id-2> \
--quality good --split train --tag tool-discovery --approve
# Export approved curations to a Tinker SFT JSONL
nalvin --workspace <ws> agent traces export \
--format tinker-sft --status approved --split train \
--reasoning include --materialize-tool-outputs \
--out ./datasets/run-2026-04
nalvin --workspace <ws> agent traces verify-export ./datasets/run-2026-04
# Baseline probe suite for comparing pre/post-finetune behavior
nalvin --workspace <ws> agent traces baseline-suite --commands \
--provider local --workspace bench --served-model qwen3.5-4bCurated traces are stored alongside raw runs in the workspace SQLite. Raw runs stay immutable — every edit lives on the curation. traces diff shows what was changed and warns if the source run hash drifts. See docs/tinker-trace-curation-plan.md for the full curation spec.
The CLI loads config in this order (later wins):
- Built-in defaults
- Optional
.envfile ~/.nalvin/config.yamlNALVIN_environment variables- CLI flags
A more complete config example:
providers:
default:
type: anthropic
api_key: ${ANTHROPIC_API_KEY}
model: claude-sonnet-4-6
context_window_tokens: 200000
tool_output_token_limit: 4000
openai:
type: openai
api_key: ${OPENAI_API_KEY}
model: gpt-5.4
context_window_tokens: 128000
fast:
type: openai
api_key: ${OPENAI_API_KEY}
model: gpt-5.4-mini
context_window_tokens: 128000
agent:
subagents:
provider_name: fast
compaction:
enabled: true
trigger_pct: 85
keep_recent_messages: 8
tools:
default_enabled:
- kb_create_node
- kb_update_node
default_pinned:
- web_fetch_get
custom_tools:
dir: ~/.nalvin/custom-tools
enabled: true
timeout_seconds: 30
mcp_servers:
exa:
transport: streamable_http
url: https://mcp.exa.ai/mcp
enabled_by_default: true# Workspace management
nalvin workspace create <name>
nalvin workspace list
nalvin workspace switch <name>
# Agent runs
nalvin --workspace <ws> agent run -p "prompt"
nalvin --workspace <ws> agent run --provider fast -p "prompt"
nalvin --workspace <ws> agent run --resume <run-id> -p "follow-up"
nalvin --workspace <ws> agent run --mode plan -p "plan the refactor"
nalvin --workspace <ws> agent run --verbose --timing -p "prompt"
# Tool inspection
nalvin --workspace <ws> agent tools list
nalvin --workspace <ws> agent tools list --json
nalvin --workspace <ws> agent tools run <tool-id> --flag value
# Skills
nalvin --workspace <ws> agent skills list
nalvin --workspace <ws> agent skills show <name>
nalvin agent skills browse [query]
nalvin agent skills install <source>
nalvin --workspace <ws> agent run --skill shell-composition -p "..."
# Trace curation (finetuning dataset pipeline)
nalvin --workspace <ws> agent traces list
nalvin --workspace <ws> agent traces candidates --min-tool-calls 2
nalvin --workspace <ws> agent traces show <run-id> --view timeline
nalvin --workspace <ws> agent traces derive <run-id>
nalvin --workspace <ws> agent traces label <curation-id> --quality good --split train
nalvin --workspace <ws> agent traces approve <curation-id>
nalvin --workspace <ws> agent traces export --format tinker-sft --out ./datasets/v1
# Provider management
nalvin provider list
nalvin provider add lmstudio --base-url http://localhost:1234/v1 --model local-model
# Interactive REPL
nalvin --workspace <ws> agent repl
# Knowledge base
nalvin --workspace <ws> kb nodes list --json
nalvin --workspace <ws> kb edges list --json
# Server
nalvin serveUse the Makefile (preferred — automatically sets -tags sqlite_fts5):
make dev # API + web with hot reload
make dev-api # Go API only (via Air)
make dev-web # Vite dev server only
make test-go # Go tests
make test-web # Web tests
make typecheck-web
make build-web # Build frontend for embedding
make build-api # Build Go binary (embeds web/dist)Or via bun (tags are also set in package.json scripts):
bun run dev # API + web with hot reload
bun run dev:api # Go API only (via Air)
bun run dev:web # Vite dev server only
bun run test:go # Go tests
bun run test:web # Web tests
bun run typecheck:web
bun run build:web # Build frontend for embedding
bun run build:api # Build Go binary (embeds web/dist)- Agent tools
- Agent custom tools
- Agent conversation compaction
- Agent tool output spillover
- Agent plan mode
- Trace curation for Tinker SFT export
- Docker client and tools
- Git server and tools
- Running Qwen 3.5 with llama.cpp
- Finetuning plan: Qwen 3.5 agent behavior
- Integration test: GLM 5.1 vs Qwen 3.5 35B vs Opus 4.6
Apache 2.0 — see LICENSE.

