Skip to content
swedishembeddedPublic

Repository files navigation

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.

Install

curl -fsSL https://agentsven.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

Export a key for a hosted provider (OPENROUTER_API_KEY, ANTHROPIC_API_KEY or OPENAI_API_KEY), or run a local model with brain (below), then:

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

Running on Brain

brain serves models on your own machine, so sven works with no cloud account and nothing leaving the computer. With brain serving an OpenAI-compatible endpoint, sven finds it from brain's keys file and asks it which model it serves; 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.

Releases

Packages

Contributors

Languages