Rune Agent
Rune Agent is the AI coding assistant built into Rune. It lives in the same workspace as your code, so it can read and edit files, search and navigate the codebase, run commands, and carry a conversation, all without leaving the editor.
The agent is distributed as the rune-agent package. Install it from
Rune's console with pkg install rune-agent (or run
console pkg install rune-agent from the command prompt).
This page introduces what the agent is and what it can do. More detailed guides will follow in this section.
Two ways to ask
The agent has two entry points, both command prompt commands, depending on how much you need from it:
- Quick question (
?): a one-off question about the code you are looking at, answered in a floating window. See below. - Chat (
agent):agentopens a conversation tab. This is the full experience: a back-and-forth dialogue where the agent can use tools, edit files, run code, and work through a task with you. You can pass a saved conversation ID to resume it, and an optional model to use for the session. Without an explicit model, chat uses thedefaultalias (see Models).
Type either at the command prompt. When the editor is in modal mode, the chat input is itself a modal editor, so you get the same motions and text objects you use everywhere else while composing messages.
Quick questions with ?
? <message> asks a one-off question and shows the answer in a floating
window, without opening a conversation tab. It is meant to be fast: each
? is its own throwaway session with no saved history.
What the model sees with ?:
- The files you have open. The full contents of every open and focused file are put in context, along with their paths, so you can ask about the code in front of you without copying anything in.
- Your project instructions. Any
AGENTS.mdguidance for the workspace is applied, so answers respect your conventions. - The workspace root, for orientation.
It does not receive your cursor position, your selection, or your conversation history. So phrase the question to say what you mean ("what does the retry loop in this file do?") rather than relying on where the cursor is.
? can still use tools when it needs to, so it can read another file or
check a reference to answer well. But it is tuned to answer quickly and
avoid wandering the codebase. That makes it a good fit for:
- "What does this file (or function) do?"
- "Why might this be failing?"
- "How do I use this API / write this in Go?"
- Quick explanations and one-line fixes you want to read, not apply.
Reach for a full chat instead when you want the agent to make changes across the project, work through a multi-step task, or keep context over a back-and-forth.
By default ? uses the same model as chat. If you prefer a faster or
cheaper model for quick questions, point the query alias at one (see
Models); whenever that alias is set, ? uses it instead.
Skills
Skills are focused capability bundles the agent loads on demand, and
sub-agents let it spawn scoped, parallel workers such as explore and
plan. See Skills for how they are discovered, managed,
and authored.
Memory
We are building a cutting-edge memory system for Rune Agent that lets it carry durable learnings across conversations, such as architecture decisions, project conventions, and prior fixes, and surface them when they are relevant. It is in active development and will land in an upcoming Rune Agent release.
The agent shell command
Alongside ? and agent, Rune Agent registers an agent command in
Rune's console for inspecting and managing models,
conversations, skills, tools, and configuration. Run agent help to see
everything it offers. The most useful subcommands:
| Command | What it does |
|---|---|
agent models | List available models with their context window sizes. |
agent model [<id>] | Show the default model, or a conversation's model. |
agent effort [<level>] | Show or set the default reasoning effort. |
agent max_tokens [<n>] | Show or set the max output tokens. |
agent chats list | List saved conversations. |
agent chats show <id> | Show a conversation's history. |
agent chats export [--audit] <id> | Export a conversation or its audit log. |
agent chats compact <id> | Compact a conversation into a summarized copy. |
agent chats fork <id> | Fork a conversation at a chosen message. |
agent chats clear <id> | Clear a conversation (its contents are archived). |
agent skills ... | Inspect and manage skills (see above). |
agent tools | List the tools the agent can use. |
agent mcp | Show MCP server status and tool stats. |
agent config | Show the current configuration. |
Focused chat commands
When you are focused on an open chat tab, use the Rune command prompt's chat commands to act on that conversation:
| Command | What it does |
|---|---|
chatmodel [<model>] | Show or switch the focused chat's model. |
chateffort [<level>] | Show or set the focused chat's reasoning effort. |
chatmaxtokens [<n>] | Show or set the focused chat's max output tokens. |
chatskill <skill> [args] | Load a skill into the focused chat. |
chatclear | Clear the focused chat and archive its previous contents. |
chatcompact | Compact the focused chat into a summarized copy. |
chatfork | Fork the focused chat at a selected message. |
chatexport [--audit] | Export the focused chat or its audit log. |
chatlog | Show the focused chat's LLM token audit log. |
These are command-prompt commands, not agent shell command subcommands and not
chat-message slash commands. They are useful when you want completion, history,
or key bindings from Rune's normal command surface while operating on the chat
you are currently viewing.
Models
The agent works with configurable model providers, including OpenAI,
Codex, Anthropic, Claude, Gemini, and local models. You can switch the
focused conversation's model or reasoning effort with the chatmodel and
chateffort command prompt commands.
Model aliases
Which model the agent uses for each kind of work is controlled by named aliases:
default: the model new chats use when you do not pass one.query: the model?uses for quick questions.compact: the model used to compact (summarize) long conversations.dream: the model used for memory consolidation.
An alias is just a name that resolves to a real model, and it works
anywhere a model is accepted. You manage aliases with the models alias
command from the Rune console:
| Command | What it does |
|---|---|
models alias | List the aliases and the models they resolve to. |
models alias set <name> <provider/model> | Point an alias at a model. |
models alias remove <name> | Clear an alias. |
For example, to make chat use Codex's flagship model and route quick questions, compaction, and memory consolidation to smaller, cheaper models:
models alias set default codex/gpt-5.5
models alias set query codex/gpt-5.4-mini
models alias set compact codex/gpt-5.4-mini
models alias set dream codex/gpt-5.4-mini
The models alias <name> <provider/model> shorthand (without set) does
the same thing. Run models to see every available provider/model
name.
When an alias is unset
default is the one alias to set if you only set one. Any other alias
that you leave unset (query, compact, dream) falls back to
default, so setting default alone gives every kind of work a sensible
model. Set the others only when you want them to differ.
default itself, when unset, resolves to the flagship model of the
provider you most recently signed in to. So once you authenticate a
provider (see Providers), every alias works out of the
box, and signing in to a newer provider moves them over automatically.
Set an alias explicitly whenever you want to pin a specific model
instead.
Connecting external tools (MCP)
Rune Agent is an MCP (Model Context Protocol) client. Declare external
MCP servers in an .mcp.json file and the agent connects to them,
discovers their tools, and makes them available in chat, extending what
it can do with third-party integrations.
Project instructions
The agent reads AGENTS.md files from your project, walking up from the
workspace root, and folds those instructions into how it works. Use them
to teach it your conventions, so its output matches your project without
repeating yourself each session.
For the full list of extensions.rune-agent.config settings, including
hooks and appearance, see Configuration.