//  REFERENCE

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

  1. 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 →
  2. Start it in a project. cd into a git repository with your work committed — it writes inside that folder, and there is no undo inside cxagent; git is the undo — and run cxagent.
  3. 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.
    The configuration dialog on first run, with no provider yet: the Roles block empty, and six cards to pick from — Anthropic, OpenRouter, OpenAI, Ollama, llama.cpp and OpenAI-compatible
    First run: a card per kind of endpoint.
  4. 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-ask mode; Shift+Tab switches to accept-edits, where writes inside the folder go through. Commands that can write, and anything outside the folder, ask either way. /trust changes the answer later.
    The first session in a folder: the question Trust this folder?, the folder's path, what trusting allows, and the two answers with Don't trust selected
    The question the first session in a folder asks.
  5. 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 at work: the goal, an explore worker it sent first, the bug it named, its edits to invoice.py and the test file, and a prompt asking to run the tests, with Allow once and Deny
    A turn in progress: what it does is in the transcript, and the test run waits for your say-so.
  6. 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 →
    The lead's conversation with explore, review and test workers spawned in the background and a table of them, and the Tasks column with the explorer and reviewer running and the test run finished
    Three workers: F7 lists what is running and what has finished.
  7. 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 bring it into a new app and it starts from what it learned in the last one. Colleagues, with a tutorial →
    The colleague SharpConsoleUI Guide brought into an empty repository: it recalls its experience of cxgpu, then plans diskdash's first screen from what it observed there
    A colleague that learned SharpConsoleUI in one repository, planning a new app in another.
  8. 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. /memory lists them, and /memory open or /memory forget corrects or removes one. Memory →
    The preference stated in the composer, the memory · write · test-framework-preference row the model's note made, its reply, and the session panel's Memory section reading 1 system · 0 project
    The note it keeps, and the panel counting it.
  9. 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 to 0.0.0.0, add a user under Login, save, then /web (or /web off and /web if it is already serving). On the phone, open http://<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 open https:// instead. Sessions in a browser →
    The same session in a phone's browser: the fix and its new tests, a message sent from the phone, and the answer, above the composer with its model, mode, thinking and sandbox pickers
    The same session on a phone.

Using cxagent

New here? Install first — you do not need to write any configuration to start.

Writing a plugin

Embedding CxAgent.Core

Elsewhere in the repository