# openheim

> A fast, multi-provider LLM agent runtime built in Rust that runs as an interactive TUI, headless CLI, ACP stdio agent, or self-hosted WebSocket server.

Openheim is an open-source, multi-provider LLM agent runtime written in Rust, published under the MIT license. It runs an iterative agent loop — calling an LLM, executing tools on its behalf, feeding results back, and repeating until a task is complete. The project is maintained by weirdstuff.dev and is available on crates.io as well as via Docker or source build.

## What It Is

Openheim is a general-purpose LLM agent that can be deployed in four distinct modes from a single binary: an interactive terminal UI (TUI), a headless CLI for one-shot prompts, an ACP stdio agent for editor integrations, or a self-hosted ACP-over-WebSocket server. It is provider-agnostic, supporting OpenAI, Anthropic Claude, Google Gemini, Ollama, vLLM, LM Studio, and any OpenAI-compatible endpoint. The agent loop, tool execution, conversation memory, and MCP integration are all shared across every run mode — no code changes needed when switching deployment targets.

## Architecture and Run Modes

The single `openheim` binary exposes four entry points:

- **Interactive TUI** — a ratatui-based terminal UI with theming, session restore (`:sessions`), and live context-size tracking in the footer
- **Headless CLI** (`openheim run`) — streams a single prompt to stdout; supports model overrides and skill flags
- **ACP stdio agent** (`openheim acp`) — implements the Agent Client Protocol over stdio for native editor integration with Zed, JetBrains, and any ACP-compatible client
- **Self-hosted server** (`openheim serve`) — exposes ACP over a multiplexed WebSocket plus a REST API on port 1217; multiple clients connect simultaneously with isolated session contexts

The Rust implementation is highlighted for low memory footprint, fast startup, true concurrency, and memory safety by default.

## Built-in Tools and MCP Extension

Openheim ships eight built-in tools available to the LLM: `execute_command`, `read_file`, `write_file`, `edit_file`, `list_dir`, `search` (ripgrep-style), `web_fetch`, and `delegate_task` for subagent delegation. Shell execution is disabled by default and must be explicitly enabled via `allow_shell = true`. File access is sandboxed to a configurable `work_dir`.

External tools are added by connecting MCP servers in `config.toml` — both stdio and Streamable HTTP transports are supported. Tools are auto-discovered at startup and namespaced as `server__tool`, requiring no code changes.

## Skills System and Conversation Memory

The skills system lets users drop Markdown files into `~/.openheim/skills/` and reference them by name with `--skills`. They are injected into the system prompt at runtime after the agent's base identity (`system.md`). Default skills can be set in `config.toml` to auto-load every session; ACP clients can also pass skills per-session via the `_meta` field.

Every conversation — including full tool call history — is persisted to disk as JSON in `~/.openheim/history/`. Sessions can be resumed from the TUI, headless CLI, or over ACP with `session/load`, continuing exactly where they left off.

## Deployment Options

Openheim supports four deployment paths:

- **Local binary** — `cargo install openheim` from crates.io, or build from source
- **Docker** — multi-stage Dockerfile with a Compose file; mount a volume for history persistence
- **Cloud / self-hosted** — deploy the binary or Docker image on any Linux host (Fly.io, Railway, EC2, Raspberry Pi) behind a reverse proxy
- **Rust library** — embed the full agent runtime in any Rust application via the `openheim` crate with `default-features = false` to exclude TUI and server dependencies

## Update: v0.9.0

The latest release is v0.9.0, published on September 1, 2026. The repository was created in January 2026 and has seen active development, with the most recent push on the same date as the v0.9.0 release. The crates.io page lists the current library version as `0.6` for embedding, while the binary release tracks the `v0.9.x` series. The project direction signals continued investment in ACP transport, MCP integration, and the Rust library embedding path.

## Features
- Multi-provider LLM support (OpenAI, Anthropic, Gemini, Ollama, vLLM, LM Studio)
- Interactive TUI with theming and session restore
- Headless CLI for one-shot prompts
- ACP stdio agent for editor integration (Zed, JetBrains)
- Self-hosted ACP-over-WebSocket server with REST API
- Built-in tools: shell execution, file read/write/edit, directory listing, ripgrep search, web fetch, subagent delegation
- MCP (Model Context Protocol) integration via stdio and Streamable HTTP
- Skills system: inject Markdown files into system prompt
- Persistent conversation memory with session resume
- Agent sandboxing with configurable work-directory boundary
- Subagent delegation with named profiles and inline one-off agents
- Context-size tracking per session
- Retry with exponential backoff for transient failures
- Docker-ready with multi-stage Dockerfile and Compose
- Embeddable as a Rust library via openheim crate
- Provider-agnostic config with one-line switching

## Integrations
OpenAI, Anthropic Claude, Google Gemini, Ollama, vLLM, LM Studio, Azure OpenAI, AWS Bedrock, Zed editor, JetBrains IDEs, MCP servers (stdio and Streamable HTTP), Docker, systemd, nginx, Caddy

## Platforms
LINUX, API, VSC_EXTENSION, JETBRAINS_PLUGIN, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.9.0

## Links
- Website: https://openheim.io
- Documentation: https://docs.rs/openheim
- Repository: https://github.com/weirdstuff-dev/openheim
- EveryDev.ai: https://www.everydev.ai/tools/openheim
