What is PyBot?
PyBot is an experiment from Hugging Face: a chatbot with no model weights and no training, built only from if-else branches, regular expressions and lookup tables, all of it written by a swarm of more than 1,000 AI agents. It runs on Python 3.8 or newer with nothing to install and no model to download.
Each turn, modules in bot/modules propose replies and an arbiter picks one. They sit on four shared parts: an understanding engine that handles typos, chat-speak and what "it" refers to; a memory of the conversation so far; a knowledge base of facts kept as data; and a composer that phrases the reply. The repository holds 528 Python files exactly as the swarm wrote them, a small command line and a demo on Hugging Face Spaces. The SmolTalkBench dataset that scored every version is published alongside.
Is PyBot worth it?
PyBot is worth reading as evidence about agent swarms, not as software to use. Hugging Face set more than 1,000 agents to write a chatbot in pure Python; the README says they wrote and evaluated over 5,000 versions, while the SmolTalkBench dataset card counts more than 6,000 commits. Leandro von Werra of Hugging Face wrote that the agents were DeepSeek Flash instances and finished in about a week. The repository, created on 12 November 2026, had about 1,100 GitHub stars ten days later.
The headline number needs its caveats. On SmolTalkBench, PyBot's win rate rose from 0% to 26%, which the team puts level with SmolLM-360M-Instruct. The benchmark is 1,000 single-turn everyday prompts, scored by an LLM judge, DeepSeek-V4.1-Flash, against reference replies from Llama 3.1 70B, with replies more than 500 characters longer than the reference capped at a tie. Two details matter. The dataset card itself says the SmolLM baselines were trained on the source conversations, so their scores are inflated. And the swarm spent thousands of versions optimising against that one benchmark, with a judge from the same model family as its builders, so 26% says more about fit to these prompts than about general conversation.
The code shows what that optimisation produced. About 640,000 lines sit in 528 files, and 317,000 of them are the knowledge base: facts written out as data, which is why PyBot can explain descaling a kettle but knows nothing it was not given. The README says the agents also wrote 550,000 lines of tests, but the public repository ships only one test file, for the command line. Startup takes a few seconds and each reply about a second, by the README's account.
It does have honest uses. Nothing is downloaded and, in our reading of the source, the bot imports no networking code, so it runs offline and every reply can be traced to the module that produced it with -v. A third party has already ported it to Rust with Claude Code and checked the port against PyBot turn by turn, which shows the code, however large, behaves deterministically once the clock and random seed are fixed. As a conversational product it is a curiosity; as a public, inspectable artefact of agent-written software at scale, it is unusually useful.
Where it earns its place
An engineering manager weighing agent-written code for a team of 20
See what a large agent-built codebase looks like before committing to the approach
Clone the repo and read bot/modules and bot/knowledge; with -v, each reply names the module that produced it. Free, and it shows both the reach and the sprawl of swarm output.
A university lecturer teaching a course on chatbots
Show students the gap between ELIZA-style rules and language models
Run python -m pybot in class next to a small instruction-tuned model and compare answers on the same prompts. It needs only Python 3.8, so it runs on lab machines without GPUs or downloads.
Before you commit
- Setup
- git clone the repo and run python -m pybot; Python 3.8+ and nothing else. pip install . adds a pybot command. Startup takes a few seconds.
- Integrations
- Command line only: -p for one reply, -i to keep chatting, -s for a fixed seed, -v to show the module and timing; a browser demo runs on Hugging Face Spaces.
- Data and privacy
- Runs locally with no model downloads; the bot code imports no networking libraries in our reading, so conversations stay on your machine. The Spaces demo is hosted by Hugging Face.
- Limits
- Answers only what its rules and knowledge tables cover; about a second per reply; no releases, no published test suite for the bot itself, and no stated plan for further development.
What’s good
- Full source of a 1,000-agent swarm's output
- Runs offline with no packages or model
- Every reply traceable to the module behind it
- Benchmark and scoring method published
What’s not
- Only knows what its knowledge tables hold
- Win rate tuned against a single benchmark
- The 550,000 lines of tests are not published
- 640,000 lines are hard for a person to maintain
Best for
Researchers and engineering leads studying how far agent swarms can take a codebase, and what that code looks like.
PyBot alternatives
PyBot: common questions
- Is PyBot worth it?
- A fascinating record of what a thousand agents can build in a week, and a chatbot nobody should deploy. We rate it 3.4 out of 5.
- How much does PyBot cost?
- Free and open source under Apache-2.0. Runs on your own machine with no API keys or model downloads.
- What are the downsides of PyBot?
- Only knows what its knowledge tables hold; win rate tuned against a single benchmark; the 550,000 lines of tests are not published; 640,000 lines are hard for a person to maintain.
- Who is PyBot best for?
- Researchers and engineering leads studying how far agent swarms can take a codebase, and what that code looks like.
- Is PyBot safe for company data?
- Runs locally with no model downloads; the bot code imports no networking libraries in our reading, so conversations stay on your machine. The Spaces demo is hosted by Hugging Face.
- What are the best PyBot alternatives?
- The closest alternatives we have reviewed are MiniMind.
Answers checked Nov 22, 2026.