# mare > A hyperextensible agent harness. A small Rust kernel confines processes, keeps sessions durable, and runs Lua 5.5 plugins; everything else is a plugin. ## Key Resources - [Full English Documentation (llms-full.txt)](https://signalridge.github.io/mare/llms-full.txt): Concatenated English documentation in one file. - [mare Repository](https://github.com/signalridge/mare): Core Rust kernel, CLI, TUI, and built-in Lua plugins. - [mare-plugins](https://github.com/signalridge/mare-plugins): Official curated plugins, hooks, and themes via `mare.plugins.add`. - [cordis-lua](https://github.com/signalridge/cordis-lua): Standalone Lua 5.5 Cordis plugin kernel. ## Documentation (English) ### Get started - [Installation](https://signalridge.github.io/mare/en/get-started/installation/) ([raw](https://signalridge.github.io/mare/raw/en/get-started/installation.md)): Install mare using the method best suited to your operating system, then run mare init and mare doctor to verify the setup. - [Overview](https://signalridge.github.io/mare/en/get-started/overview/) ([raw](https://signalridge.github.io/mare/raw/en/get-started/overview.md)): mare is an agent harness built as a small Rust core plus Lua 5.5 plugins that you can read, wrap, or replace. - [Quickstart](https://signalridge.github.io/mare/en/get-started/quickstart/) ([raw](https://signalridge.github.io/mare/raw/en/get-started/quickstart.md)): Log in to a provider, start mare in a repository, approve a tool call, and create ~/.config/mare/init.lua. On first launch, you can pick optional plugins… - [Troubleshooting](https://signalridge.github.io/mare/en/get-started/troubleshooting/) ([raw](https://signalridge.github.io/mare/raw/en/get-started/troubleshooting.md)): How to find out why mare does not start, cannot reach a model, behaves differently than you configured, or draws wrongly in your terminal. - [Workflows](https://signalridge.github.io/mare/en/get-started/workflows/) ([raw](https://signalridge.github.io/mare/raw/en/get-started/workflows.md)): mare --permission read-only "Give me a map of this repository: the main modules, the entry points and how they connect." ### Use mare - [Checkpoints and code review](https://signalridge.github.io/mare/en/use/checkpoints-and-review/) ([raw](https://signalridge.github.io/mare/raw/en/use/checkpoints-and-review.md)): Before mare's file tools (write, edit, applypatch) modify, delete, or rename a file, mare records the previous file bytes in a per-session snapshot… - [Context and instructions](https://signalridge.github.io/mare/en/use/context/) ([raw](https://signalridge.github.io/mare/raw/en/use/context.md)): Each request sends the system prompt, tool definitions, and conversation history. The system prompt combines named sections: identity line, general… - [Headless mode](https://signalridge.github.io/mare/en/use/headless/) ([raw](https://signalridge.github.io/mare/raw/en/use/headless.md)): Run mare without the interactive UI, for scripts and CI: print the final answer, or stream machine-readable events, then exit with a status code. - [MCP servers](https://signalridge.github.io/mare/en/use/mcp/) ([raw](https://signalridge.github.io/mare/raw/en/use/mcp.md)): Connect Model Context Protocol servers to mare: where to configure them, how tools reach the model, how project servers are approved and OAuth login. - [Models and providers](https://signalridge.github.io/mare/en/use/models/) ([raw](https://signalridge.github.io/mare/raw/en/use/models.md)): How to sign in to a provider, pick a model and a reasoning effort, override model metadata, and add an OpenAI-compatible endpoint. - [Permissions and sandbox](https://signalridge.github.io/mare/en/use/permissions/) ([raw](https://signalridge.github.io/mare/raw/en/use/permissions.md)): How mare decides what the agent may do: permission presets, approvals, rules, project trust and the operating-system sandbox, including what is not protected. - [Sessions](https://signalridge.github.io/mare/en/use/sessions/) ([raw](https://signalridge.github.io/mare/raw/en/use/sessions.md)): Each session is an append-only JSONL file scoped to a working directory. Every entry stores an id and parent, so rewinding or retrying creates a branch… - [Skills and prompt templates](https://signalridge.github.io/mare/en/use/skills/) ([raw](https://signalridge.github.io/mare/raw/en/use/skills.md)): Skills package reusable SKILL.md instructions that load on demand. Prompt templates turn Markdown files into /command shortcuts with shell-style argument… - [Subagents and side threads](https://signalridge.github.io/mare/en/use/subagents/) ([raw](https://signalridge.github.io/mare/raw/en/use/subagents.md)): mare supports two ways to isolate work from your main conversation: persistent child agents (subagent) that execute tasks in separate threads, and… - [Tools and shell mode](https://signalridge.github.io/mare/en/use/tools/) ([raw](https://signalridge.github.io/mare/raw/en/use/tools.md)): Every built-in tool in mare is registered by Lua plugins (tools, tools-apply-patch, jobs, web, subagent, permissions) and executed through one guarded… - [Interactive interface](https://signalridge.github.io/mare/en/use/tui/) ([raw](https://signalridge.github.io/mare/raw/en/use/tui.md)): How the mare terminal UI works: the input editor, key bindings, slash commands, file mentions, shell commands, queued messages, transcript and notifications. - [Usage and compaction](https://signalridge.github.io/mare/en/use/usage-and-compaction/) ([raw](https://signalridge.github.io/mare/raw/en/use/usage-and-compaction.md)): mare tracks per-session token counts, cost, and provider quota windows (usage), compacts long histories in four stages before hitting context limits… - [Local WebSocket and HTTP listener](https://signalridge.github.io/mare/en/use/web/) ([raw](https://signalridge.github.io/mare/raw/en/use/web.md)): mare includes an authenticated host HTTP/WebSocket listener (--web / webserver) that exposes mare RPC protocol 3.0 (JSON-RPC 2.0 envelope) over WebSocket,… ### Configure - [Configuration files](https://signalridge.github.io/mare/en/configure/files/) ([raw](https://signalridge.github.io/mare/raw/en/configure/files.md)): Configure mare with Lua: where init.lua lives, how configuration layers combine, splitting a config into modules, reloading, and what happens on errors. - [Hooks, status line, and notifications](https://signalridge.github.io/mare/en/configure/hooks/) ([raw](https://signalridge.github.io/mare/raw/en/configure/hooks.md)): mare has no built-in shell-command hook runner in core; instead, hooks are Lua listeners (mare.on, ctx:on, mare.policy.voter, ctx.policy:rewriter) or… - [Key bindings](https://signalridge.github.io/mare/en/configure/keymaps/) ([raw](https://signalridge.github.io/mare/raw/en/configure/keymaps.md)): Bind and remove keys with mare.keymap: key notation, contexts and conditions, the keys shorthand, Lua actions and the default bindings. - [Options](https://signalridge.github.io/mare/en/configure/options/) ([raw](https://signalridge.github.io/mare/raw/en/configure/options.md)): Core options set with mare.setup { ... } in init.lua, MARE in the environment, or --set name=value on the command line. - [Packages](https://signalridge.github.io/mare/en/configure/packages/) ([raw](https://signalridge.github.io/mare/raw/en/configure/packages.md)): Install plugins, themes and skills from git with mare.plugins.add: declaring and pinning versions, the lock file, the mare plugin commands and startup… - [Appearance](https://signalridge.github.io/mare/en/configure/ui/) ([raw](https://signalridge.github.io/mare/raw/en/configure/ui.md)): Change how mare looks: named styles, themes and flavors, overriding UI components and tool renderers, the status line, borders and other appearance options. ### Extend - [The boot fragment and the `task` host plugin](https://signalridge.github.io/mare/en/extend/host-kernel/) ([raw](https://signalridge.github.io/mare/raw/en/extend/host-kernel.md)): context, uses the host plugins (task, loader), and turns each plugin definition into a cordis - [The `loader` host plugin](https://signalridge.github.io/mare/en/extend/host-loader/) ([raw](https://signalridge.github.io/mare/raw/en/extend/host-loader.md)): The plugin tree runs on cordis-lua's loader (cordis.loader). mare wraps it in a host plugin, - [Lua API](https://signalridge.github.io/mare/en/extend/lua-api/) ([raw](https://signalridge.github.io/mare/raw/en/extend/lua-api.md)): The public mare., ui., and ctx. functions, taken from the LuaLS definitions that ship with mare. Run mare init to get completion and inline documentation… - [Plugins](https://signalridge.github.io/mare/en/extend/plugins/) ([raw](https://signalridge.github.io/mare/raw/en/extend/plugins.md)): What a mare plugin is: where plugins load from, the fields of a plugin definition, lifecycle, turning built-ins on and off, and how failures are contained. - [Plugin runtime guarantees](https://signalridge.github.io/mare/en/extend/runtime-guarantees/) ([raw](https://signalridge.github.io/mare/raw/en/extend/runtime-guarantees.md)): What mare promises a plugin author about lifecycle, services, registrations, reloads and cleanup. A plugin can rely on each of these; a change that breaks… - [Services and events](https://signalridge.github.io/mare/en/extend/services-and-events/) ([raw](https://signalridge.github.io/mare/raw/en/extend/services-and-events.md)): How plugins talk to each other: providing and replacing services, the event dispatch styles, policy and rewrite events, built-in services and main events. - [Writing a plugin](https://signalridge.github.io/mare/en/extend/writing-a-plugin/) ([raw](https://signalridge.github.io/mare/raw/en/extend/writing-a-plugin.md)): Build a small mare plugin step by step: a tool, a slash command, an event listener, a config option and a status-line segment, then test and publish it. ### Integrate - [ACP server](https://signalridge.github.io/mare/en/integrate/acp/) ([raw](https://signalridge.github.io/mare/raw/en/integrate/acp.md)): An ACP client starts the agent as a subprocess and talks JSON-RPC over its stdin and stdout. Every client needs the same two things, a command and its… - [JSON event stream](https://signalridge.github.io/mare/en/integrate/json-stream/) ([raw](https://signalridge.github.io/mare/raw/en/integrate/json-stream.md)): mare --json "Run the tests and fix any failures" - [RPC](https://signalridge.github.io/mare/en/integrate/rpc/) ([raw](https://signalridge.github.io/mare/raw/en/integrate/rpc.md)): mare --rpc --no-session ### Reference - [CLI](https://signalridge.github.io/mare/en/reference/cli/) ([raw](https://signalridge.github.io/mare/raw/en/reference/cli.md)): Every mare command and flag, as printed by --help. - [Environment variables](https://signalridge.github.io/mare/en/reference/environment/) ([raw](https://signalridge.github.io/mare/raw/en/reference/environment.md)): Every environment variable mare reads, grouped by what it controls, and the variables mare sets for the commands it starts. For MARE