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.
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.
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.
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.
- Installation and Quick start
- Guides: interactive use, headless and CI, workflow files, teams, GDB debugging, harnesses
- Concepts: agents and modes, state machines, memory
- Reference: command line, configuration, providers, tools, SDK, MCP, ACP
- 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,planandsdlc; 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
tasktool; 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-sdkembeds the kernel in your own application; harnesses define agents as YAML programs.
curl -fsSL https://agentsven.com/install.sh | shor build from source (a recent stable Rust toolchain is all you need):
make build/release
export PATH="$PWD/target/release:$PATH"
sven --versionExport 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 filebrain 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.
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 manualSee docs/contributing and AGENTS.md. Open an issue or pull request on GitHub; for larger changes, open an issue first.
Licensed under the Apache License 2.0. See CHANGELOG.md for version history.

