huggingface/pybot
PyBot: a chatbot written in pure Python by a swarm of agents. No weights, no training, just rules.
What it solves
Chatbots today usually rely on large language models (LLMs) that need heavy training, big downloads, and lots of computing power. PyBot shows that a chatbot can work with none of that: it is built entirely from plain Python rules — if-else branches, regex patterns, and lookup tables. It solves the problem of running a useful chatbot with zero dependencies, no model to download, and no training, while still performing surprisingly well on a standard benchmark.
How it works
PyBot is a huge collection of Python files — about 640,000 lines of code. When you type a message, many small "modules" each look at what you said and propose a possible reply. A special module called an arbiter then picks the single best reply to show you. These modules rely on four shared building blocks: an understanding engine (handles typos, chat-speak, the topic, and what words like "it" refer to), a memory store (remembers what you and PyBot have said so far), a knowledge base (facts about the world stored as plain data), and a response composer (decides how to phrase a reply, and what to say when nothing fits). The project was built by a swarm of over 1,000 AI agents that wrote and evaluated more than 5,000 versions, pushing the chatbot's win rate on the SmolTalkBench benchmark from 0% to 26% — matching the performance of a small language model called SmolLM-360M-Instruct.
Who it’s for
PyBot is for developers, AI enthusiasts, and tinkerers who want a chatbot they can run locally with nothing but Python 3.8 or newer — no packages to install, no model to download. It is also interesting for anyone curious about how far rule-based, non-neural approaches can go compared to modern LLMs, and for those who want to study a large, agent-generated codebase.
Highlights
- Runs on plain Python 3.8+ with zero external packages and no model download.
- Achieves a 26% win rate on SmolTalkBench, on par with SmolLM-360M-Instruct.
- Built by a swarm of over 1,000 agents that wrote and evaluated more than 5,000 versions.
- Comprises about 640,000 lines of code, backed by 550,000 lines of tests the agents wrote themselves.
- Modular design: many modules propose replies, and an arbiter picks the best one, supported by shared understanding, memory, knowledge, and composition engines.
- Includes a command-line interface with options for one-shot prompts, interactive mode, fixed random seeds, and verbose module tracing.
Related
- Project
- Project
- Project
- Project