← Back to all projects

XAgent

You give it a goal; it plans the subtasks and works through them in Docker containers — an application, not a library.

OfficialApache-2.0
Stars
8.5k
Forks
901
Open issues
58
Last commit
31 Jul 2026

What is XAgent?

You hand XAgent a goal in one sentence and it takes over from there. An outer loop plans, breaking the goal into subtasks; an inner loop acts, working each subtask with a shell, a Python notebook, a web browser and a file editor. The project calls this its dual-loop mechanism and names three parts: a dispatcher that picks the agent for each stage, a planner and an actor. The tools live in Docker containers the stack starts for you, so the agent works in a container's own workspace and the files it makes are pulled back afterwards, and between subtasks the planner can reopen the plan and split, add or delete the steps still ahead. The catch is that this is a research demonstrator from late 2023 rather than a maintained product: every model call is written in OpenAI's function-calling format, the shipped configuration still names a model OpenAI has shut down, and feature work stopped in early 2024. Read it as a clearly documented reference implementation of the planner-and-actor split, and expect repair work before it runs at all.

What can you do with XAgent?

  • Describe the goal once, in plain language — You hand it a sentence such as "analyse this dataset and write up what you find", and can attach files from your own machine at launch. Nothing is wired up beforehand — working out the sequence of steps is the agent's job.
  • An outer loop that rewrites the plan as it goes — The project calls this its dual-loop mechanism: the outer loop splits the goal into subtasks, and between them can re-enter planning to split, add or delete the steps still ahead, so something learnt in step two can reshape step five. Only the current subtask and later ones may be edited, and the shipped configuration caps the plan at three levels deep with at most five sibling steps under any one parent.
  • A separate container holding the shell, notebook and browser — The ToolServer is a second Docker container carrying what the agent may use: bash, an interactive Python notebook, web search and page browsing, and reading and writing files. Commands run there, in that container's own workspace, and the files produced are pulled back to a folder beside the code when the run finishes.
  • It can stop and ask you a question — When a request is too vague to act on, the agent can hand a question back and carry on once you answer — the restaurant-recommendation case in the README works this way. It is off in the shipped configuration; a setting in the file or a flag on the command line switches it on.
  • Every run is recorded, and can be replayed — Each run writes out the plan, every exchange with the model, every tool call and a copy of the container's workspace. The project says sensitive information is removed so a record can be shared; what the code strips is the API keys in your configuration, so read a record before you pass it on. Point the configuration at an old record and the run is reproduced step by step.
  • A browser interface as well as a command line — Bringing the stack up serves a web interface where you log in and watch the plan and each step arrive over a live connection. The same run starts from a single command instead. Either way, a step-by-step mode pauses before each subtask and lets you rewrite that subtask's goal before it begins.

Before you choose XAgent

  • Model names are hard-coded: the configuration defaults to gpt-4-32k, which OpenAI shut down in June 2025, and any name outside a fixed list of GPT-4 and GPT-3.5 variants plus the project's own model is refused.
  • Development effectively stopped in early 2024: the only tagged release is v1.0.0 from November 2023, the project's own model is still labelled in training, and the fixes merged in July 2026 never reached a release.Reported in#434
  • The shipped compose file hands the tool manager the host's Docker socket, starts each tool container in Docker's privileged mode and hard-codes the database and login passwords, so it assumes a throwaway machine.

Star history

17 Aug to 30 Oct · +12

8.5k8.6k

Frequently asked questions

Is XAgent free for commercial use?

XAgent is released under the Apache-2.0 licence — OSI-approved open source, which permits commercial use.

How can XAgent be deployed?

XAgent is available as Self-hosted / Runs locally.