PyBot: a Python chatbot built by DeepSeek agents
Hugging Face’s PyBot tests how far DeepSeek agents can take a rule-based Python chatbot, from its reply-selection architecture to SmolTalkBench results.
Apparently, the web needed another PyBot. With the name already attached to IRC and Discord bots, Hugging Face has joined the collection.
How far can a rule-based chatbot go when a swarm of AI agents writes the rules? PyBot is Hugging Face’s experiment in that question: agents repeatedly build and evaluate a conversational program whose replies come entirely from Python code.
Leandro von Werra’s announcement attributes the week-long build to 1,000 DeepSeek Flash agents. The published repository describes more than 5,000 evaluated versions, resulting in roughly 640,000 lines of Python.
What PyBot is
The repository places the experiment in the tradition of ELIZA, the early chatbot that matched text patterns to response templates. Extending that approach meant writing more rules by hand. PyBot gives that work to agents and measures the resulting conversational performance.
PyBot is a rule-based chatbot, rather than a large language model. Its runtime uses conditions, text patterns and lookup tables. The LLMs did the development work; the finished program runs locally with Python 3.8 or newer and the standard library.
Developers can inspect the rules, change stored facts and trace an answer to its module. The browser demo shows which module produced each reply.
How its Python rules produce a reply
An understanding layer interprets the message, including its topic and references to earlier turns. Modules draw on conversation memory, stored knowledge and a response composer to propose answers. An arbiter selects a candidate, using rules for topic relevance, priority and repetition.
Following the conversation. Memory carries context between messages. The project’s demo follows kettle-cleaning instructions with a question about duration, which PyBot answers from that context. The diagram groups understanding, memory, knowledge and composition code into the shared assembly.
How far the experiment reached
On SmolTalkBench, where an LLM judge compares replies with reference answers, the team reports its win rate rising from 0% to 26% across development. The project places that result alongside SmolLM-360M-Instruct on the same conversational evaluation. Its documented runtime takes a few seconds to start and about a second per reply.
The question was how much further agents could take an approach once expanded by hand. PyBot leaves a measured result and a runnable codebase: a record of the rules the swarm produced, how they work together and how their answers improved through repeated evaluation.
Loading content…