Skip to content
Projects

swedishembedded/sven has 35 GitHub stars and 2 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-14 20:05 UTC. Last push 2026-11-13.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Agent Sven: Terminal AI Agent

AI

README.md

Original

Sven banner

Agent Sven

A keyboard-driven AI agent for the terminal. Built in Rust, sven works as an interactive TUI and as a headless CI runner - one HSM kernel behind every surface.

CI License Changelog

sven TUI showing a live chat session with streamed markdown response and vim-style navigation

Give sven a task in plain English. It reads your code, runs commands, writes files, searches the web, and delegates subtasks to sub-agents - all autonomously, all in your terminal - or headless in CI, driven by markdown workflow files.

Three projects, one stack

sven is one of three open projects that work together. Each one stands on its own:

Project Its role
sven (this repository) Runs the agent. A terminal AI agent that reads code, runs tools and works through tasks, interactively or headless in CI.
brain Runs the models. Inference, training, fine-tuning and serving on your own hardware; sven can use it as a local model provider (Running on Brain).
Splinter Turns agent experience into better local models. It runs sven on real tasks, checks the results, trains a model with brain, and releases it only when held-out tests show it improved.

sven works with any of its model providers; it needs neither of the other two.

Documentation

Full documentation: https://swedishembedded.com/docs/sven. The same pages live in docs/ and read well on GitHub; docs/manifest.yaml lists them in order.

What sven does

  • One kernel behind every surface. Control flow is a hierarchical state machine; the model proposes actions and never drives execution. The TUI, headless runs, ACP and MCP all drive the same kernel.
  • Interactive and headless. A keyboard-driven terminal UI, or stdin and Markdown workflow files in CI, pipeable into one another.
  • Modes. agent (default), chat, research, plan and sdlc; see Agents and modes for what each may do and how approvals apply.
  • Tools and delegation. Files, search, shell, web, context, GDB, and sub-agents through the task tool; teams of agents with a shared task board.
  • Memory, skills and project knowledge that persist across sessions.
  • More than thirty model providers, MCP client and server, and ACP for editors.
  • A framework. sven-sdk embeds the kernel in your own application; harnesses define agents as YAML programs.

A harness for a job says what must be true, and sven makes it so or fails:

api_version: "2"
name: verified-task
inputs: { feature: string }
execution: { limits: { model_turns: 12 } }
gates:
  test: { command: [sh, run_tests.sh], timeout: 300 }
workflow:
  - name: implement
    task: "Implement: {{ inputs.feature }}"
    verify: [test]          # the exit status decides, not the agent
    repair: { attempts: 2 }

sven harness run drives it with a real model and real tools; sven harness validate, inspect, explain and replay read a harness and a recorded run without one. See the harness guide.

Install

curl -fsSL https://sven.swedishembedded.com/install.sh | sh

or build from source (a recent stable Rust toolchain is all you need):

make build/release
export PATH="$PWD/target/release:$PATH"
sven --version

Quick start

Sign in to your sven account once and its models are sven's, with no provider key to manage:

sven auth login                       # approve this machine in the browser
sven doctor provider                  # can sven reach a model?
sven                                  # interactive TUI
sven "Summarise the project"          # one-shot, headless
sven --file plan.md                   # multi-step workflow file

sven also runs on a local model with brain (below), or on a key of your own: sven auth set openrouter (or anthropic, openai, ...).

Running on Brain

brain serves models on your own machine, so sven works with no cloud account and nothing leaving the computer. With brain serve running, sven finds the server, its address and its key from the connection record brain publishes, and asks it which model it serves; nothing is configured. Local and hosted models work side by side (-M brain/<model>, -M openrouter/<model>, sven list-models). See Brain in the provider reference and brain's documentation for serving a model.

Building and contributing

make build        # debug build
make test         # unit and integration tests
make check        # rustfmt, text gates, architecture ratchet, clippy
make docs         # documentation publication (build/docs) and the manual

See docs/contributing and AGENTS.md. Open an issue or pull request on GitHub; for larger changes, open an issue first.

License

Licensed under the Apache License 2.0. See CHANGELOG.md for version history.