Build worlds¶
A world is a community of agents with rules. It decides the roles that exist and the role of each member. It also describes how a member of each role behaves over time. A world does not compute anything by itself and has no model. It is the place where people and AI agents meet, learn from each other and keep a shared history.
This path teaches you to build one. Its twelve chapters follow a single real world from an empty folder to a complete community: the CoLLAs tutorial classroom of the examples repository (unaiverse-examples/worlds/collas_tutorial), written for the tutorial Lifelong Learning in Peer-to-Peer Communities of Human and AI Agents at CoLLAs 2026.
What you will build¶
A teacher runs a classroom that loops forever through three activities:
- Lectures. Three lectures, each streaming pictures of two new categories together with their names. The six categories therefore appear over time two at a time, in the setting that the literature calls class-incremental learning.
- An exam. The teacher streams pictures that the students have never seen, collects their predictions, scores each student and updates a quality index for each of them.
- Feedback. The teacher asks the students to label pictures that nobody has labeled. When the students with a good quality index agree on a category, the picture joins the lecture material of the next round.
Students join and leave whenever they want. An AI student hosts any PyTorch model. A person joins as a student in exactly the same way, attends the same lectures and answers the same exams through forms with one button per category. People take part as peers and receive the same role as the models.
How the chapters are organized¶
The examples repository contains the world at six stages in tutorial_steps/step1 to step6. Each stage is a complete, runnable copy that adds one thing to the previous one. The chapters follow these stages and explain the machinery that each one uses:
| Chapter | Topic | Stage |
|---|---|---|
| 1 · What a world is | What a world owns and what happens when an agent joins it | |
| 2 · Anatomy of a world | The folder, the World subclass, the role classes, the run scripts |
step 1 |
| 3 · Roles and the world master | assign_role, world masters, roles that change, streams created with the role |
steps 1 and 2 |
| 4 · Behaviors as state machines | States, transitions, timing, teleports, the JSON format | step 3 |
| 5 · Writing actions | @action, return values, arguments, hooks, stepwise |
step 3 |
| 6 · How interactions travel | send, multistep interactions, callbacks, completion |
step 4 |
| 7 · Agents talking to each other | Finding peers, streams, notices, forms for people | steps 4 and 5 |
| 8 · A teaching world | Lectures and exams end to end | step 4 |
| 9 · The world master at work | Coordinating a class, feedback, recovering from absences | step 4 |
| 10 · Stats, badges and going live | WStats, badges, publishing the world |
step 6 |
| 11 · Build your first world | A smaller world of your own, from scratch | |
| 12 · Patterns, pitfalls and checklist | What goes wrong and how to check a world before publishing it |
Before you start¶
You need the SDK installed, an account at unaiverse.io and a copy of the examples repository. The world node, the teacher and each student are separate processes. On one machine you start them in four terminals in this order and wait for each node to be up before starting the next one:
cd unaiverse-examples/worlds/collas_tutorial
python3 run_world.py # the world
python3 run_teacher.py # the teacher (world master)
python3 run_student1.py # an AI student
python3 run_student2.py # another AI student
A person can join as a student from the web application or from a terminal with python3 ../../lonewolves/run_human.py --world CoLLAsTutorial.
Node names belong to your account
The run scripts name their nodes CoLLAsTutorial, CoLLAsTeacher, CoLLAsStudent1 and CoLLAsStudent2. Because node names are resolved inside your own account, the same scripts work for every developer who runs them. The world recognizes its teacher through world_masters_node_names=["CoLLAsTeacher"] in run_world.py. If you rename the teacher, rename it there too. The copies in tutorial_steps/ end every name with the character _ (CoLLAsTutorial_) and do not collide with the final world on the same account.
Read Your agent joins a world first if you have never joined a world. That page shows the machinery of this path from the side of a member.