Documentation

How to install Xi, use it every day, and make it yours. Start at the top; the pages build on each other.

Start here

Everyday use

ProjectsXi keeps a list of your project directories so you can jump into any of them from a chat, and so each project can carry its own prompt and snippets.
WorkspacesA workspace is a set of projects. Pick one in the tab bar across the top of the web client and the chat lists, the project list and the home page show only chats and projects in it. The first tab, All, is always there and shows everything. The bar appears once a tab besides All is open. On a phone or a narrow window it sits atop the sidebar instead.
Project instructionsXi reads a project's AGENTS.md into the system prompt at the start of every chat, and tells the agent about every other AGENTS.md in the repository so it reads the right one before it edits a subdirectory. Nothing has to be configured; the files only have to exist.
Built-in toolsThe tools the agent has out of the box, what each one does, and when it asks you first. Everything here ships with Xi; [extensions](extensions.md) and [MCP servers](mcp-servers.md) add to the list, and an [agent profile](agents.md) can shorten it.
How the agent reads codeWhen the agent reads a large source file, Xi parses it into a syntax tree and hands over an outline of that tree: imports, types and function signatures, each with its line range. The agent then reads only the definitions it needs, so a 2,000-line file costs a few dozen lines of context instead of the whole file.
Agent blocksThe agent can put something in the chat that you act on: a checklist you tick off, options to pick, a layout with buttons and fields. A block appears right after the tool call that made it, the agent can change it while it works, and it can read what you did with it. A sub-agent's block appears in its view, after its own tool call. Tables, lists and notes you only read come as ordinary text in the agent's answer.
SessionsEvery chat is saved as you go. This page covers continuing one, starting over, and the tools that keep a long chat workable: going back to an earlier point, summarising, trimming, and rolling over with pointers to the past.
The web clientXi's browser client shows the same chats as your terminal, on any device that can reach the server. Start a task at your desk and follow it on your phone.
Keyboard shortcutsEvery key Xi reacts to runs a named action, and every key can be changed. The terminal client and the web client share one model: a set of actions (:chat/new, :agent/abort, :diff/fold, …), layers that say where a key applies (everywhere, while navigating, in a diff view, …), and a keymap that binds keys to actions per layer. The built-in keymap is below; your own bindings go under :keys in ~/.config/xi/config.edn.
Keyboard navigationUse the web client without a mouse: leave the message box, click any button or sidebar row by typing its label, move between chats, and scroll a chat. The keys that move between chats work out of the box; the single-letter keys are yours to bind in ~/.config/xi/config.edn.
Slash commandsType / and a name into the chat to run a command instead of sending a message. /help lists everything that is available in the current setup.
Command lineEvery subcommand and flag of the xi command. xi help prints a short version of this page.

Making it yours

Configuration
ModelsXi runs Claude through the Claude Agent SDK, local models through Ollama, the models of OpenCode Zen and OpenCode Go, and GPT models on a ChatGPT subscription. Pick one with /model or --model. Each of these is a [provider](providers.md); :providers in config.edn chooses which run, and you can add your own.
ProvidersA provider connects Xi to models. Each one is a program Xi starts for every message; Xi keeps the tools, the rules and the chat. Xi ships Claude, Ollama, OpenAI Codex and OpenCode ([Models](models.md)). Which ones run is :providers in [config.edn](configuration.md#providers).
Permissions and rulesRules decide what the agent may do without asking you. They are a list in a file: each rule matches a kind of tool call and says allow, deny, ask, or nudge. The first rule that matches wins. A fifth kind, a hint, decides nothing and only adds text to whatever rule wins below it.
Rules referenceEvery match field, action, and built-in bundle of the rules engine. The [introduction](rules.md) explains how to use them.
The clj toolXi agents run sandboxed Clojure instead of single-line shell commands. The clj tool is a Clojure REPL with file helpers that runs inside Xi, so commands are readable scripts rather than pipe chains. They filter and aggregate in the runtime, real commands run one at a time, and only the result enters the conversation.
clj tool referenceEvery helper of the agent's clj tool, what each one may touch, and how commands get approved. The [introduction](clj-tool.md) explains the idea.
MCP serversAny MCP server can give the agent tools. Add it with one command, approve it once, and its tools are there on the next turn, under the same rules as every other tool.
ExtensionsAn extension is one ClojureScript file in ~/.config/xi/extensions/. It can give the agent a tool, give you a slash command or a keyboard shortcut, react to what happens in a chat, add to the system prompt, or add a page to the web client. No build step, no restart.
Tutorial: a toolGive the agent a notesadd tool that appends a line to a notes file, and a /notes command that shows the file.
Tutorial: a command and a keyShow a desktop notification when the agent finishes a turn, toggled with a key and visible as a badge next to the prompt. This covers reacting to events, per-chat state, keybindings, badges, and running a program from an extension.
Tutorial: a web toolGive the agent a hnsearch tool that queries the Hacker News API and returns the top stories for a term. This covers HTTP requests, JSON, and formatting a result for the model.
Tutorial: a page in the browserGive the notes extension from the [first tutorial](extension-tutorial-tool.md) a page in the web client: a list of the notes, a Refresh button, and a field to add one. This covers the browser half of an extension, routes, menu entries, and how the two halves talk.
Tutorial: your own MCP serverAn extension can bring an MCP server that only it can call. Here a headless browser from chrome-devtools-mcp backs one tool, pageheadings, that lists the headings of a web page after it rendered.
Tutorial: users and rolesGive the people on a shared server roles, and let the roles decide what their chats may do. Rules restrict the agent's tools per role. An extension reads the same roles to gate its own features and to hand out extra roles at runtime. No code is needed for the first half.
Extension referenceEvery key an extension map may hold, every function of the xi.api namespaces, and the limits of the sandbox. Read the [tutorials](extensions.md) first; this page is for looking things up.
Agent profilesRun Xi as an assistant with a fixed set of tools and its own instructions instead of as a coding harness. A profile is a few lines of config; the sessions it creates are kept apart from your coding chats.

Running it