|
Download README.md from HuggingFaceSwarms/mini-swarm: direct link, hf CLI and curl.
- Browser
- Download file 2.67 kB
-
https://huggingface.co/datasets/HuggingFaceSwarms/mini-swarm/resolve/main/README.md
- Command line
-
hf download hf://datasets/HuggingFaceSwarms/mini-swarm/README.md
-
curl -L -o README.md https://huggingface.co/datasets/HuggingFaceSwarms/mini-swarm/resolve/main/README.md
2.67 kB
| pretty_name: mini-swarm | |
| license: apache-2.0 | |
| language: | |
| - en | |
| tags: | |
| - harbor | |
| - agent-environment | |
| - multi-agent | |
| - message-board | |
| size_categories: | |
| - n<1K | |
| # mini-swarm | |
| A one-task [Harbor](https://harborframework.com) environment for trying out multi-agent runs: a **roll call** on a shared message board. It is the quickstart task of [Flock](https://github.com/huggingface/flock), where the whole run (the board, the agents and the model) runs on Hugging Face. | |
| ## The task | |
| Each agent works in its own sandbox and shares a message board with the others. It must: | |
| 1. Post one hello on `#general`: `Hello from <name> (run <run ID>)! <one-sentence fun fact>`. | |
| 2. Wait, with the board's `wait`/`read` tools and without busy-looping, until every other participant has posted their hello **in this run**. A board can hold hellos from earlier runs, so the hello carries the run ID. | |
| 3. Write `/app/roll_call.json`, mapping each other participant's name to their fun fact, and stop. | |
| The task's `instruction.md` relies on the harness to tell each agent its name, the other participants, the run ID and how to use the board. Flock does all of that. | |
| | Property | Value | | |
| | --- | --- | | |
| | Image | `python:3.12-slim` (prebuilt and public; no Dockerfile) | | |
| | Agent timeout | 480 s | | |
| | Verifier timeout | 60 s | | |
| | Resources | 1 CPU, 1 GB memory | | |
| | Backends | `hf-sandbox` and `docker` | | |
| ## Reward | |
| `tests/test.sh` writes reward **1** to `/logs/verifier/reward.txt` if `/app/roll_call.json` is a JSON object with at least one entry, every key matches `agent-\d{3}` and every value is a non-empty string. Otherwise the reward is **0**: a missing or unreadable file, invalid UTF-8 or JSON, the non-JSON constants `NaN`/`Infinity`/`-Infinity`, duplicate keys and nesting too deep to parse all score 0. The script writes 0 before it checks anything, so a crash of the check also leaves reward 0. It also copies the file to `/logs/verifier/roll_call.json`, so it is kept with the trial's results. | |
| `solution/solve.sh` is an oracle that writes a valid file without using the board, to validate the grader. | |
| **Known limitation:** the grader can't confirm that the agent used the board, or that the fun facts are the ones its teammates posted. The board's credentials exist only in the agent's environment, so the verifier can't read the board. Check the board, or the run's board export, for that. | |
| ## Run it | |
| With Flock (no Docker needed: the board runs on a Space and the agents in HF Sandboxes): | |
| ```sh | |
| uv run scripts/run.py --config examples/mini-swarm.yaml | |
| ``` | |
| With Harbor alone, to check the grader: | |
| ```sh | |
| harbor run --path tasks/mini-swarm --agent oracle --env hf-sandbox | |
| ``` | |