Getting Started
Leviath runs LLM agents. What it adds over asking a model directly is structure. That means context that stays coherent across hundreds of tool calls, a different model for each phase of a task, and thousands of agents running at once in one process.
You'll go from nothing to a running agent in four steps:
flowchart LR A["Install<br/>lev"] --> B["Configure<br/>a provider"] B --> C["Run<br/>an agent"] C --> D["Read<br/>the result"]
Install
One command, any platform. It installs a prebuilt binary, so no Rust toolchain is needed.
macOS and Linux
curl -fsSL https://leviath.dev/install.sh | shWindows
powershell -ExecutionPolicy Bypass -c "irm https://leviath.dev/install.ps1 | iex"Check it worked:
lev --versionThat is the whole install. The options below are here when you want them, not because you need them.
Prefer Homebrew or Scoop
The one-liners above already use Homebrew on macOS when you have it. To manage the tap yourself:
brew tap gemisis/leviath https://github.com/GEMISIS/leviath-dist.git
brew trust gemisis/leviath # Homebrew 6 requires trusting third-party taps
brew install leviathOn Windows, Scoop works the same way:
scoop bucket add leviath https://github.com/GEMISIS/leviath-dist.git
scoop install leviathSwitch to the beta or alpha channel
stable is the default and is what you want unless you have a reason to be ahead of it. To ride a
faster channel, pass it to the installer:
curl -fsSL https://leviath.dev/install.sh | sh -s -- --channel betaThe installer prints which channel it is about to install, so you can see you got the one you asked for.
Homebrew and Scoop name the channels as separate packages instead: install leviath-beta or
leviath-alpha in place of leviath. See Releases and channels for what each
channel means and how often it moves.
Build with Cargo, or embed the runtime
With Rust installed:
cargo install leviath-cli # released version from crates.io
cargo install --git https://github.com/GEMISIS/leviath.git --bin lev # latest development buildTo embed the runtime in your own application instead of running the CLI, add the
leviath crate as a dependency.
Configure a provider
One provider is all you need: an API key from Anthropic, OpenAI, Google AI, or OpenRouter, or a local Ollama with no key at all.
lev setupThe wizard detects keys already in your environment, sets a default model, and installs the pre-built agents.
Tip
No API key handy? Point Leviath at a local Ollama install and run
entirely offline. lev setup will detect it. See Providers for the full list.
Script the setup instead
For CI, containers, or any headless machine:
lev setup --non-interactive --anthropic-key "$ANTHROPIC_API_KEY" --install-agentsTwo flags matter more than they look:
--install-agentsinstalls the pre-built agents. Without it, non-interactive setup configures the provider and installs nothing.--default-model <provider>/<model>sets the model every stage falls back to. Without a default model, a blueprint's own list decides, which may not pick your provider.
The other credential flags are --openai-key, --google-key, --openrouter-key, and
--ollama-url. See lev setup for the full set.
Run an agent
First cd into the directory you want the agent working in. That directory becomes the run's
workdir: its file tools are confined to it, and its output lands there.
Then pick one of the seven pre-built agents and give it a task:
lev run coder --task "Build a CLI that converts CSV to JSON"
lev run deep-researcher --task "Survey the state of solid-state batteries"A run spends real API tokens on your configured provider. For a free first try, point
lev setup at a local Ollama instead.
Leave --task off and your editor opens on a template, which is easier than
fighting shell quoting for anything longer than a sentence. It also takes a
file: lev run coder --task ./brief.md.
lev run returns as soon as the work is accepted, not when it is done. The agent runs in the
background and keeps going after you close the terminal, so the next section is how you check on
it. Real tasks take minutes.
Read the result
Watch it live, or come back later. Either way:
lev dash # live view of every run
lev ps # one-shot list: what is running, what finished
lev result <run-id> # the answer, once a run is completeFiles the agent created are in the workdir you ran it from. See Outputs for structured answers.
Expect to be asked things along the way. The agent stops and waits before it writes a file or
runs a shell command. Answer in lev dash (select the run, Enter, then i) or with
lev respond, or pass --yolo to pre-approve everything for an unattended
run.
Tip
Prefer a visual UI? Serve the daemon over HTTP and open The Lair, the browser console:
lev serve --token <your-secret> --cors https://leviath.devIt shows the same runs, context, logs, and interactions, from any browser.
On Windows the agent's shell is cmd.exe, not a POSIX shell, and Leviath tells the model so. See
which shell you get, and
Troubleshooting for PowerShell
quoting and environment-variable syntax.
Create your own
lev create my-agent # scaffolds an agent directory
cd my-agent
lev run . --task "Your task here"This writes an agent.leviath file you can customize: the stages, the model for each phase, and
the context regions. Build your first agent walks through writing one from
scratch, a stage at a time, and is the natural next thing to read.
Where to go next
- The Agent catalog tours the seven pre-built agents and what each is for.
- Build your first agent writes one from an empty directory, explaining each piece as it goes.
- Overview explains what Leviath is doing underneath: stages, context regions, and the shared world your agents run in.
- Agent blueprints covers what goes in an
agent.leviathfile, for building your own. - Troubleshooting has the common snags, and
lev doctordiagnoses most of them for you. - Glossary defines every term these docs use in a particular way. Worth a skim if a page starts using a word you have not met.
- Where Leviath sits is for deciding whether you want Leviath at all, and what to run alongside it.
- Where Leviath fits covers driving Leviath from a tool you already use, like an orchestrator or a CI job.