XAgent
An Autonomous LLM Agent for Complex Task Solving
XAgent is an open-source autonomous AI agent that takes a plain-text task, plans steps, and executes them using tools like a web browser, code runner, and file editor running safely inside Docker.
XAgent is an open-source autonomous AI agent from OpenBMB, a research group at Tsinghua University. You give it a task in plain text, and it attempts to complete that task by planning a series of steps and executing them using a set of built-in tools, with minimal human involvement. It is designed as a general-purpose system, meaning it is not narrowly focused on one type of task but instead tries to apply to a broad range.
The agent is built around three internal components working together. A Dispatcher decides which agent handles a given task. A Planner breaks the overall goal into subtasks and sets intermediate milestones. An Actor then carries out each subtask by calling tools and can ask the human for guidance if it runs into obstacles. This human collaboration feature means XAgent is not fully hands-off; it can pause and check in rather than failing silently or making bad assumptions.
The tools XAgent can use are provided through a separate component called ToolServer, which runs inside a Docker container for safety. Available tools include a file editor, a Python notebook for running and testing code, a web browser for searching pages, a shell for running terminal commands, and an interface for calling external web APIs. All tool execution happens inside the container, so the agent cannot affect the rest of your system directly. You can also add new tools to ToolServer to extend what the agent can do.
Setting it up requires Docker and Python 3.10 or higher. You configure at least one OpenAI API key, and the README strongly recommends using GPT-4 for reliable results, noting that GPT-3.5 is not recommended because its limited context length causes problems. A web interface is included and runs on port 5173 after startup, alongside the command-line option.
The project is licensed under Apache 2.0. It describes itself as experimental and still in early stages at the time of writing.
Where it fits
- Give XAgent a research task in plain English and let it autonomously browse the web, run code, and produce a report with minimal human input.
- Automate a multi-step software task by letting XAgent write code in a sandboxed Python notebook, test it, and save the output files.
- Extend XAgent with custom tools added to the ToolServer Docker container to automate workflows specific to your own stack.