Guide
Get xcodon running and start your first research project.
Requirements
- Linux (x86_64 or arm64), macOS, or Windows inside WSL2 (Windows Subsystem for Linux). See Windows (WSL2).
- An API key for the model you want to use (for example
GEMINI_API_KEY,ANTHROPIC_API_KEYorOPENAI_API_KEY). The default model isgemini/gemini-3.8-flash, so aGEMINI_API_KEYis enough to start. - Python 3.12, 3.13 or 3.14, only if you install from a checkout. The installer brings its own Python.
Install
Install with one command:
curl -fsSL https://xcodon.ai/install.sh | bashThe script is scripts/install.sh in the xcodon repository. It needs no root access. It installs uv and a Python 3.12 that uv manages, so it never touches your system Python. xcodon goes into its own environment. The xcodon, coala, coala-runtime and xcrunner commands land in ~/.local/bin, or in DIR/bin with --prefix DIR.
The repository is private for now. The installer finds xcodon in one of three ways:
- a wheel file you were given:
curl -fsSL https://xcodon.ai/install.sh | bash -s -- --wheel xcodon-<version>-py3-none-any.whl; - the latest GitHub release, through a logged-in
gh(gh auth loginfirst); - the latest GitHub release, through a
GITHUB_TOKENwith read access to the repository.
The installer adds a block to your shell startup file (~/.bashrc, ~/.bash_profile on macOS, or ~/.zshrc). That block reads ~/.xcodon/env.sh (DIR/env.sh with --prefix DIR), which puts xcodon on your PATH. Open a new terminal, then check:
xcodon --versionThe installer also reports which container engine works on this machine (Docker, Podman, xcrunner, Apptainer or Singularity). xcodon uses Docker by default and switches to xcrunner by itself when Docker is not usable. For Podman, Apptainer or Singularity, pass the engine when you create a project, for example xcodon init myproject --container-engine apptainer. The installer prints that command for you.
On a desktop machine the installer adds a launcher with the xcodon icon: an xcodon app in ~/Applications on macOS, or an app-menu entry on a Linux desktop. A click opens the web UI, and starts it first when it is not running. The web UI then runs in a terminal window. Closing that window stops it. The launcher keeps projects in ~/xcodon-projects. There is no launcher on a cluster, over SSH, or on WSL.
Pass options after bash -s --, for example:
curl -fsSL https://xcodon.ai/install.sh | bash -s -- --prefix /scratch/$USER/xcodon| Option | What it does |
|---|---|
--version V | Install xcodon version V instead of the latest. |
--wheel PATH|URL | Install this wheel file. |
--prefix DIR | Keep uv, Python, xcodon, container images and caches under DIR. Use it on a cluster with a small home quota. |
--python V | Use Python V for xcodon (default 3.12). |
--projects DIR | Where the desktop launcher keeps projects (default ~/xcodon-projects). |
--no-launcher | Do not add a desktop launcher. |
--no-modify-rc | Do not change your shell startup file. |
--check | Report what this machine has. Install nothing. |
--uninstall | Remove xcodon. Your projects and settings in ~/.xcodon stay. |
Most options can also come from an environment variable: XCODON_VERSION, XCODON_WHEEL, XCODON_PREFIX, XCODON_PYTHON, XCODON_PROJECTS, or XCODON_NO_LAUNCHER=1.
Run the installer again to upgrade. If you used --prefix, pass the same --prefix to upgrade or uninstall.
On an HPC (high-performance computing) cluster, run the installer on a login node, because it needs the internet. Put the install on a shared filesystem, for example --prefix /scratch/$USER/xcodon, so compute nodes can use it too. The web UI listens on the cluster machine only. Reach it from your own computer through an SSH tunnel: ssh -L 8420:localhost:8420 you@cluster, then open http://localhost:8420.
From a checkout (for development). The installer does not install a checkout, so use uv directly:
uv venv .venv && source .venv/bin/activate
uv pip install -e ".[dev]"Put your API key in ~/.xcodon/.env (one KEY=value per line) or export it in your shell. xcodon loads that file at startup. The web UI can also save your model and API key for you, in ~/.xcodon/settings.json.
First project
xcodon init myproject
xcodon run myprojectinit creates the folder ./myproject/ with its agent.yaml. run opens the terminal UI. On the first run xcodon onboards the project: you give it a paper (PDF or URL), your own plan or task, a research template, or a software project.
Plan mode and direct mode
A project runs in one of two modes:
- Plan mode drafts a research plan with steps. You review the plan before anything runs. A paper, a template or a software project always runs in plan mode.
- Direct mode drafts no plan. One conversation works on your task as you wrote it. Then fresh conversations review the result, and code checks the output files.
Your own plan or typed task runs in direct mode by default. You can pick plan mode instead when you set it up. Direct mode explains how it works.
In direct mode, you pick any matching community skills, then xcodon waits. Type start to begin, plan to switch to plan mode, or back to choose the subject again.
In plan mode, you say whether to reproduce the paper's data or use your own, and pick any matching community skills it found. xcodon then writes the research plan and checklist to outputs/research_plan.md.
Then xcodon stops so you can review the plan. Nothing runs yet. Type a change in plain words, for example "merge steps 3 and 4", and xcodon edits the plan. It keeps the previous version as outputs/research_plan.prev.md. You can also ask a question about the plan, or edit the file by hand. Type start to begin step 1, checklist to show the checklist again, or back to choose the data again.
After that, just chat. The agent works through the checklist step by step, asks before it runs anything, and records everything it did in the notebook.
Web UI
Prefer a browser? The same session runs in a local web UI:
xcodon onboardIt opens http://127.0.0.1:8420 with the chat beside your project files. When port 8420 is taken, for example by a second xcodon, it uses the next free port and prints which one. A port you name with --port is used as given. If that port is busy, xcodon stops with a message.
In the web UI, the model picker on the new-project page and in Project settings lists current models by provider. Its Other entry takes any LiteLLM model id. Releases after v0.6.1 also list:
- ChatGPT subscription models. They need no API key. Click Sign in to ChatGPT once, open the link it shows, and enter the code there. See ChatGPT subscription.
- Antigravity, a coding agent that xcodon drives over the Agent Client Protocol (ACP). It needs no API key. Install its
agycommand on the server and sign in there once. It runs only in direct mode, so only your own plan or task can use it.
In the terminal UI, /model opens the same list, without Antigravity.
For your own plan or task, the Run mode field picks direct or plan mode. In plan mode, the Edit the plan box changes the plan by chat. Click Start session to begin step 1. In direct mode, click Start.
The buttons in the top bar switch between a light theme, a dark theme and your system's setting. The browser remembers the choice.
Everyday commands
| I want to… | Command |
|---|---|
| Ask one question without opening the UI | xcodon run myproject -m "your question" |
| Let the agent run without asking for approval | xcodon run myproject --super |
| See my projects | xcodon list |
| Register a project folder that already exists | xcodon import /path/to/project |
| See where the checklist stands | xcodon codon whereami -p myproject |
| Mark a step done or not done | xcodon codon done -p myproject --step N / codon pending |
| Rebuild the report | in the UI: /codon report |
| Start the project over from onboarding | xcodon run myproject --reinit |
| Update host memory from finished projects | xcodon dream myproject otherproject (Dreaming) |
| See or switch the checks run on each step | xcodon rules myproject (Harness rules) |
| Start the web UI without opening a browser | xcodon serve |
| Sign in to a ChatGPT subscription | xcodon chatgpt-login |
| Run a small app the agent built in the project | xcodon webapp run NAME -p myproject (Standalone apps) |
Inside the UI, type /help for the full list of slash commands.
Running unattended
For batch runs, skip the interactive onboarding by passing the subject on the command line:
xcodon run myproject --super \
--subject-kind pdf --subject /path/to/paper.pdf --reproduction-mode paper--subject-kind is one of pdf, url, own-plan, template, software-project; --reproduction-mode is paper or own-data.
An unattended run uses plan mode unless the project says otherwise. To run your own task in direct mode, create the project with --run-mode direct:
xcodon init mytask --run-mode direct
xcodon run mytask --super \
--subject-kind own-plan --subject /path/to/task.md --reproduction-mode own-data--run-mode direct sets direct_mode: true in agent.yaml. An unattended run reads only that field. --subject can be a file or the task text itself. --run-mode plan does the opposite: the terminal and web UIs then default to plan mode for your own plan too.
To run a project again from a clean start, add --fresh. It moves the previous run's conversation, notebook, report, checklist progress and check state to a sibling folder, <project>.pre-fresh-<time>/. Files in workspace/ stay. --fresh works for the terminal UI, one-shot (-m) and unattended runs.
--reinit starts the project over as if just created. It moves workspace/, outputs/, state/, skills/, memory/ and the other folders xcodon writes to a sibling folder, <project>.pre-reinit-<time>/. It keeps inputs/, agent.yaml and the MCP config. Nothing is deleted. --reinit implies --fresh. Both refuse to run while another run of the project is live.
What is in a project
| Path | What it is for |
|---|---|
agent.yaml | Settings: model, step limits, tools (Configuration). |
inputs/ | The paper and your data. Onboarding puts the article markdown, figures and tables here. |
outputs/research_plan.md | The plan and checklist the agent follows. |
outputs/<project>_notebook.md | Everything the agent did, in order. |
outputs/<project>_report.md | The readable report built from the notebook. |
workspace/ | Scripts and intermediate files the agent writes. |
skills/, memory/ | Notes the agent keeps for itself. xcodon dream reads memory/ into host memory. |
state/ | Session and checkpoint state. Leave it alone. |
Shrink a large state file
xcodon saves the conversation in state/deepagents.sqlite so a session can resume. It cleans up that file after each turn, and during a long turn. A file over 1 GB is too large to clean up during a turn. Older xcodon versions could leave a file that large. xcodon then prints a notice with the command to run.
Close every session in the project, then run:
xcodon compact-state myprojectIt rewrites the file with the latest state of each conversation, so the next session resumes where the last one stopped. It needs free disk space for one copy of the conversation. A file of many gigabytes can take several minutes. It stops with a message while a session still has the file open. If anything fails, the file stays as it was.
Next
- Documentation — how the agent works, every setting, the tool catalog, development.
