selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

XAgent logo

Self-host XAgent

v1.0.0

Open-source autonomous LLM agent that plans and uses tools

ReleaseOpen SourceApache-2.0
Docker ComposeCompose file & guide
docker compose up
Updated2 years ago
LanguagePython
Setup difficultyAdvanced
Stars
8 551
Ports
5173 (Web GUI (nginx fronting the XAgent-Server frontend)), 8090 (XAgent-Server backend)
Requires
MongoDB, MySQL, Redis
Docker
xagentteam/xagent-server
XAgent web UI login screenXAgent playground screen after logging in

What is XAgent?

XAgent is an experimental autonomous agent that drives a large language model to complete complex jobs with little human input. It plans each task by breaking it into subtasks with milestones, dispatches work between agents, and acts through a fixed set of tools - a file editor, a Python notebook, a web browser, a bash shell and Rapid API calls - all executed inside a Docker container for safety. When information is missing it can stop and ask the operator for help, and it can follow guidance while working. Running it yourself means bringing up the ToolServer stack with docker compose (MongoDB, MySQL and Redis are part of that stack), filling in OpenAI keys and other settings in assets/config.yml, and then using either the web GUI served on port 5173 or the terminal entry point run.py. Every run is recorded, and a record can be loaded again to reproduce a previous result, with sensitive data such as API keys stripped out. The maintainers describe the project as still in its early stages: it needs a long-context GPT-4-class model to behave well, and its claimed advantage over AutoGPT comes from a human-preference evaluation on around 50 hand-prepared tasks.

XAgent alternatives

Should you self-host XAgent?

XAgent scores 60/100 on selfhost.directory (how scoring works) and ranks #61 of 209 in AI Agents. It has 8 551 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Orca (91/100, 123 964 stars). It scores higher overall, so compare the two before you pick. See XAgent vs Orca side by side.

Features

  • Agent dispatching
  • Autonomous task solving
  • Command Line Interface
  • Docker sandboxed execution
  • Extensible tool set
  • File editing tool
  • Human-in-the-loop collaborationControlled by enable_ask_human_for_help in assets/config.yml, which ships set to False.
  • Initial file upload
  • Model selection and fallbackgpt-4-32k recommended; gpt-3.5-turbo-16k as backup.
  • Python code execution
  • Run recording and replay
  • Shell command execution
  • Subtask planning
  • Web browsing tool
  • Web GUI

XAgent README

XAgent

Twitter Discord License: Apache 2.0 Welcome

English • 中文 • 日本語

Tutorial • Demo • Blog • Documentation • Citation

📖 Introduction

XAgent is an open-source experimental Large Language Model (LLM) driven autonomous agent that can automatically solve various tasks. It is designed to be a general-purpose agent that can be applied to a wide range of tasks. XAgent is still in its early stages, and we are working hard to improve it.

How to install XAgent

Install XAgent with Docker Compose

docker and docker-compose
Environment variables
CONFIG_FILE, DB_USERNAME, DB_PASSWORD, DB_COLLECTION
docker compose build
docker compose up

Run the container in the background with docker compose up -d. Then start the web UI service:

## run nginx in docker
docker exec XAgent-Server systemctl start nginx

Web UI on http://localhost:5173; ToolServer needs docker and docker-compose installed first. Requires assets/config.yml to be configured.

How to configure XAgent

  • default_request_typeopenaiWhich request backend the LLM calls go through.

    values: openai or xagent

  • enable_summarytrueSummarizes long action outputs to keep the context manageable.
  • use_selfhost_toolservertrueUse the locally run ToolServer container for tool execution.
  • selfhost_toolserver_urlhttp://localhost:8080URL of the local ToolServer manager.
  • max_retry_times5How often an action may be retried.

XAgent releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

I got ConnectTimeout when calling WebEnv_search_and_browse, how to fix it?

Search defaults to DuckDuckGo; if that network path fails, put a Bing search API key into assets/config/node.yml and restart the containers with docker-compose up.

How to provide XAgent service for others to use over the network?

Expose port 5173 to the external network and reach the interface at ip:5173.

How to enlarge the size and amount of uploaded files?

Edit the backend router file XAgentServer/application/routers/workspace.py and the frontend component XAgentWeb/src/views/playground/components/FileUpload.vue; the project warns this is at your own risk.

More in AI Agents

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…