Documentation
Three audiences, and what each one needs.
The pages below are rendered from the repository's own markdown rather than copied — the source is edited in one place, and a link at the foot of each takes you to it. Anything not rendered here links to GitHub, because it is written for someone already reading the source.
What cxagent is
A coding agent that runs in your terminal, and in your browser when you are away from it. You give it a goal in plain language; it reads your code, edits files, runs commands and reports back, asking first before a command that can write, and before anything outside the folder you started it in. It works with the model you choose — local through Ollama, llama.cpp or any OpenAI-compatible server, or Anthropic, OpenAI and OpenRouter in the cloud — and there is no cxagent account or server between you and it.
Why use it: it works like a small team, not a single assistant. The agent you talk to puts workers on a job — an explorer, a reviewer, a tester, a planner, a builder, or a type you define — each with its own brief and its own context, and its own model and folder when one is chosen for it. They run in the background while the conversation goes on, and they do not disappear when their part is done: each keeps everything it read, ran and concluded, so you or the lead agent can hand it the next piece, or a correction mid-task, and it carries on from where it is instead of starting over. They read the same notes about you and the project the lead does. Resume the session another day and the team is still there, its conversations intact.
Several sessions run side by side, each in its own tab, and every feature works on a local model as well as a cloud one.
A first session, in a minute
- Install. On Linux or macOS,
curl -fsSL https://raw.githubusercontent.com/nickprotop/cxagent/master/install.sh | bash, then open a new shell. Windows, the .NET tool, and reading the script first → - Start it in a project.
cdinto a git repository with your work committed — it writes inside that folder, and there is no undo inside cxagent; git is the undo — and runcxagent. - Pick a model. With no configuration yet, the configuration dialog opens on a card
per kind of endpoint. Choose one, give it a key if it needs one, pick a model from the list it
serves, and save. F8 opens the same dialog later.

First run: a card per kind of endpoint. - Trust the folder. The first session in a folder asks Trust this folder?
Trusted, reads and read-only commands inside it stop asking. Writes still ask in the default
always-askmode; Shift+Tab switches toaccept-edits, where writes inside the folder go through. Commands that can write, and anything outside the folder, ask either way./trustchanges the answer later.
The question the first session in a folder asks. - Ask for something. Type a goal in the composer
and press Enter — add a --verbose flag to the CLI and a test for it. Its tool calls
appear in the transcript as it works, and anything that needs your say-so stops and asks.

A turn in progress: what it does is in the transcript, and the test run waits for your say-so. - Put a team on it. Ask for work that splits — have an explorer map how config
is loaded while a reviewer checks the last commit. Each worker runs in the background with its
own context; F7 lists them, Enter opens one in its tab, and typing there gives
it more — while it works, or after. A finished worker stays, with everything it learned, for the next
question. Workers →

Three workers: F7 lists what is running and what has finished. - Keep the one that learned it. A worker you keep coming back to is offered as a
colleague — or keep one yourself with
/colleagues keep. After each task it is given, what it did is distilled into its experience, and it brings that into any session you call it into:/colleagues bringit into a new app and it starts from what it learned in the last one. Colleagues, with a tutorial →
A colleague that learned SharpConsoleUI in one repository, planning a new app in another. - It remembers you. Tell it how you work — always write tests with xUnit and
plain Assert — and it keeps a note: system notes, about you, go with you to every project; project
notes stay with this one; both in cxagent's own folder, never in your repository. The next session
already knows.
/memorylists them, and/memory openor/memory forgetcorrects or removes one. Memory →
The note it keeps, and the panel counting it. - Carry on from a browser. Type
/web: it answers Serving this terminal's sessions at http://localhost:5180/, and a browser on this machine opening that address gets the same live session — the same turns and tabs, its prompts shown in both places, the first answer taken. To reach it from your phone, open F8 › Web first: set Listen on to0.0.0.0, add a user under Login, save, then/web(or/web offand/webif it is already serving). On the phone, openhttp://<this machine's LAN address>:5180/and log in. Without a user it refuses to listen beyond this machine and says how to add one. Plain HTTP sends that login across the network as it is typed: on a network you do not control, choose HTTPS, self-signed in the same tab and openhttps://instead. Sessions in a browser →
The same session on a phone.
Using cxagent
- Installing and running — Windows, the .NET tool and building from source, the first run, where the configuration lives, the command line, uninstalling
- Using cxagent — what a session can do: the tools, sessions, the browser, workers and the keys
- Safety — what it asks before it does, the sandbox, and everything it does to your machine
- Extending — skills, custom commands, hooks and plugins
- Commands
— everything you can type in the composer:
/mode,/stats,/plugin,/skills, and the keys - Colleagues — workers kept across sessions: a tutorial from one codebase to the next, ways to use one, and how each part works
- Configuration
— every block of
config.json, where the file lives on each OS, and what each key's absence means - Scripting — running cxagent from a script or CI, and reading what it did
- A session, in pictures — captures from real sessions, mistakes included
- Glossary — the words these pages use in a sense of their own: composer, worker, trust, load set and the rest
New here? Install first — you do not need to write any configuration to start.
Writing a plugin
- Start here
— what a plugin is, and the path from
cxagent plugin newto the catalog - The SDK and its tutorials — a weather plugin in C#, a word counter in C, end to end
- The contract — the lifecycle, the sidecar, gating, commands, settings
- The command line
—
new,check,call,pack,verify - Testing — from the command line, and from a C# test with CxAgent.Plugins.Testing
- The C SDK
— the
cxpAPI and building for every platform - The C ABI
— what crosses each call, for a plugin written without
cxp - Publishing — pack, upload, verify, submit, with a worked entry for each shape
Embedding CxAgent.Core
- Overview — what the library is, and the four calls an app makes
- API reference — every public type, configuration, and tool selection
- Tools
— injecting tools of your own:
IAgentTool, the two gates, and whatGateshould return - Examples — five runnable apps, from a console front end to a plugin in C