explaingit

openbmb/xagent

8,530PythonAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

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.

Mindmap

mindmap
  root((xagent))
    What it does
      Autonomous task execution
      Multi-step planning
      Human check-in option
    Tools available
      Web browser
      Python notebook
      File editor
      Shell terminal
      Web APIs
    Tech stack
      Python
      Docker
      GPT-4
    Audience
      AI researchers
      Developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

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.

USE CASE 2

Automate a multi-step software task by letting XAgent write code in a sandboxed Python notebook, test it, and save the output files.

USE CASE 3

Extend XAgent with custom tools added to the ToolServer Docker container to automate workflows specific to your own stack.

Tech stack

PythonDockerGPT-4

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires Docker, Python 3.10+, and a paid OpenAI API key, GPT-4 is strongly recommended as GPT-3.5 causes failures due to limited context length.

Use freely for any purpose including commercial, as long as you include the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
Set up XAgent with Docker and my OpenAI API key, then run it with the task 'scrape the top 10 Hacker News posts and save them to a CSV', show the full setup and launch command.
Prompt 2
How do I add a custom tool to XAgent's ToolServer so the agent can query my internal database as part of a multi-step task?
Prompt 3
Give XAgent the task 'find the bug in this Python file, fix it, run the tests, and tell me what changed', show the exact prompt and how to pass the file to it.
Prompt 4
Explain how XAgent's Planner and Actor work together when given the task 'build a simple Flask app with a /health endpoint and test it locally'.
Open on GitHub → Explain another repo

← openbmb on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.