Hugging Face's PyBot: 1,000 AI agents build a chatbot with no neural network

Hugging Face has released PyBot, a chatbot made of roughly half a million lines of plain Python with no neural network anywhere. A swarm of more than 1,000 AI agents wrote it. The experiment shows how far hard-coded rules can go when machines write them instead of humans.

Tools Nov 12, 2026 7 min read Source: Merkliste: explainx.ai
Illustrative image, AI-generated

What it is

On November 12, 2026, Hugging Face, the well-known platform for AI models, released an unusual project: PyBot, a chatbot that works without any neural network. There's no trained language model behind it, just roughly half a million lines of ordinary Python code, in other words hard-coded rules. What's new is who wrote those rules. According to the project description (README), more than 1,000 AI agents did it. These are programs that write, test and submit code on their own. They produced over 5,000 versions until the bot reached a win rate of about 26 percent on Hugging Face's in-house benchmark, SmolTalkBench.

The project is on GitHub under the open Apache 2.0 license: github.com/huggingface/pybot. The README also points to a Hugging Face Space where you can try the bot in your browser. This summary is based on a report by explainx.ai, which in turn mostly relays what the README says.

The idea: ELIZA with machine muscle

Hugging Face asks a deliberately contrarian question: if AI agents can write rules far faster than humans, how far can a purely symbolic chatbot get? That means one that runs only on fixed if-then rules.

The README points back to ELIZA, a chatbot from the 1960s. ELIZA used simple text patterns and response templates, and still fooled some users into thinking they were talking to a real person. Systems like it always ran into the same wall: a human had to write every rule by hand, and that doesn't scale. PyBot replaces the human author with a swarm of coding agents that propose, test and merge modules.

According to explainx.ai, this isn't a nostalgia gag but an experiment. How much conversational coverage can you squeeze into explicit rules with raw compute and writing power before you have to reach for a Transformer, the architecture behind ChatGPT and friends?

How PyBot is built

The code is split into several areas. The line counts come from the README:

Folder Purpose Lines (approx.)
bot/modules/ Response modules and arbiter 67,000
bot/understanding/ Input parsing, typos, references 22,000
bot/memory/ Conversation memory 92,000
bot/knowledge/ World knowledge as data 275,000
bot/compose/ Phrasing and fallback responses 75,000
tests/ Agent-written tests approx. 550,000

At its core is an arbiter module (bot/modules/arbiter.py). For every message, all modules can propose a response and state how confident they are. The arbiter then picks the winner, again using hard-coded rules. The README compares this to an election among candidates. Larger agent systems route requests to specialized components in a similar way. The difference is that every candidate here is concrete Python code, not words a model generates piece by piece.

The README walks through an example. A user mentions limescale in their kettle, and PyBot explains how to descale it with vinegar. When the user follows up with "How long does that take?", a module for time estimates steps in. And when asked "What's my name?", the bot pulls the name from memory because the user wrote "I'm Sam" earlier. So the bot remembers what was said in the conversation, all without a neural network and without RAG, meaning no language model processing retrieved documents.

What the 26 percent means

SmolTalkBench is a Hugging Face test in which a "judge model", another AI, compares PyBot's answers with reference answers. Across the 5,000 versions, the win rate rose from 0 to about 26 percent, according to the README. The project says that puts PyBot roughly on par with SmolLM-360M-Instruct, a small language model with 360 million parameters that was considered very strong for its size a few years ago.

It can't compete with today's frontier models like GPT or Claude, and Hugging Face doesn't claim it can. Its strengths lie elsewhere:

  • No GPU needed: The bot runs on any machine with Python.
  • Traceability: Every response can be traced back to a specific code file.
  • Tests included: Alongside every feature, the agents wrote tests meant to catch regressions.

explainx.ai suggests teams use PyBot as a baseline. If you build your own domain-specific rules with knowledge retrieval and can't beat PyBot, you might be better off putting the agents to work on better data rather than on more text patterns.

Try it

According to the README, installation couldn't be simpler. All you need is Python 3.8 or later, and the chat requires no extra packages:

git clone https://github.com/huggingface/pybot
cd pybot
python -m pybot

Handy commands: /reset clears the session, /exit quits the program, -p "question" returns a single answer, --seed N makes the bot phrase things the same way for the same input, and -v shows which module won and how long it took. Run pip install . to set PyBot up as a regular pybot command.

Startup takes a few seconds because Python has to load hundreds of thousands of lines of code. After that, the README says the bot answers in about a second. On a regular CPU, that's about as fast as small language models, but it eats a lot of disk space and RAM.

For classes and workshops, explainx.ai suggests using -v mode to show live how responses get routed, adding your own small modules (say, for the cafeteria's opening hours), writing tests for them and measuring the win rate and startup time before and after.

Limits and risks

explainx.ai points out several weak spots:

  • Maintenance: No human can meaningfully maintain half a million lines. The project assumes agents will handle future changes too.
  • No real generalization: The knowledge lives in lookup tables. Questions outside those tables end up with generic fallback responses.
  • Security: Plain Python code doesn't automatically protect against malicious input. If dangerous constructs like eval, which executes text as code, slipped into the swarm's commits, hostile inputs could reach them. Review the code before any public deployment.
  • Resources: Load time and memory footprint far exceed what typical small web services use. PyBot is a research demo, not a template for production.
  • Rough edges: When two modules tie, the arbiter picks more or less at random unless you set --seed. The huge Git repository can slow down automated CI pipelines.

One more thing stands out: the repository doesn't explain how Hugging Face coordinated more than 1,000 agents. The orchestration system behind it hasn't been released. All explainx.ai can infer from the project is that version control coordinated the agents and that the benchmark ran automatically after every merge.

Our take

PyBot isn't a product meant to replace language models. Hugging Face itself benchmarks it against a tiny 360-million-parameter model, not against Claude or GPT. The project is interesting as a baseline and as teaching material. It shows that AI agents today can produce a lot of code that actually works, and that a rule-based system can improve measurably with enough grinding. Every decision stays traceable, which is hardly possible with neural networks.

At the same time, it's a cautionary tale. Agents multiply the amount of code, but not automatically the judgment behind it. Half a million lines that no human can keep track of are close to unmaintainable. And the fact that it took about 1,000 agents and 5,000 versions to catch up with a tiny language model from a few years ago fits neatly with Richard Sutton's "Bitter Lesson": general learning methods beat handcrafted knowledge in the long run, even when the hand doing the crafting is now a machine. It's also unclear how reliably SmolTalkBench measures anything with an AI judge. So far, all the numbers come from Hugging Face alone.

Sources

#hugging face#chatbot#ai agents#open source#python
Read the original source

Ask the AI assistant

Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.

Connecting …

The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.

Comments

What do you think? Already tried it? Write it here, no sign-up needed.

  1. Loading comments …

Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.