huggingface/legion
https://skillcdn.ai/gh/huggingface/legionConnect this address to your AI to use these skills. How to connect
- Unverified
- Default branch
main - Commit
1409aec - License
None declared - Searchwords
Showing commit 1409aec
The newest commit, 2696557, is being indexed. Until it is ready, this page and every agent are served the last indexed commit.
Explore this repository
Searches the original text of skills and documents, and the translations of skills when you search in their language.
Documents
- architecture.svgdocs/architecture.svg
- Billing and storagenamespace is the optional account that pays for worker and controller Jobs, hf-sandbox sandboxes, vLLM servers started with inference.hf_jobs, and HF router requests. Runnable examples omit it for pe…docs/billing.md
- Comms: the team's message boardHarbor agents reach a msgboard board through the message_board resource (legion.harbor.builtin.resources.message_board) and its message_board. tools: the run's resources: {message_board: {...}}; its…docs/comms.md
- Dashboard: the run on flock-overviewdashboard: puts the run on the flock-overview Space (its board next to its run viewer), the way report_to puts a training run on a tracker. Metrics need nothing new: the controller already mirrors ru…docs/dashboard.md
- Controller as an HF Job (job mode)The Space deployment (scripts/deploy-space.sh) is unsupported: its build cannot install the private msgboard (Dockerfile.controller).docs/deploy-job.md
- legion: designHow legion works today. The contract in code is src/legion/models.py; the user guides are the other files in docs/.docs/design.md
- Export runs for viewinglegion export writes finished runs as a Harbor jobs folder, which Harbor's own viewer (harbor view) shows: each run's agents with their prompt, full trajectory (messages, thinking, tool calls and res…docs/export.md
- HarnessesEach role runs one agent harness: Pi (the default), Codex, Claude Code or Antigravity. A run can mix them, for example a Claude Code planner, Pi implementers on an open model and a Codex reviewer, al…docs/harnesses.md
- Health: snapshots, usage, rollupsThe controller samples each swarm every 30 s (LEGION_HEALTH_INTERVAL, 0 = off). Agent event files are never read: counters are fed by the event batches as they arrive, and the swarm stream is tailed…docs/health.md
- Share original code through HF pull requestsThe optional hf_repo resource connects agents to an existing private Hugging Face dataset repository. Every worker uses the same repository, including workers added or restarted later. Agents keep se…docs/hf-repo.md
- Equal-budget ladderCompare completed team runs with independent solo rollouts of matched tasks:docs/ladder.md
- Live changes: `legion update`Everything an experiment customises lives in its folder, next to the spec: spec.yaml, the prompt files it names, tools/ (when the spec sets tools_dir), the comms protocol files. legion reads them at…docs/live.md
- Local mode: `legion launch`One spec from a laptop to 1k agents. compute: local runs the swarm on your machine: legion launch spec.yaml starts the controller on 127.0.0.1 and launches each worker as a subprocess, both in the ba…docs/local.md
- Loops, final rounds and the budget stopA type's loop: keeps its agents prompted on a cadence until a condition fails, then runs one final round and leaves them idle. limits.budget_usd is a hard stop for the whole swarm.docs/loop.md
- MigrationsSpec changes that need you to edit a spec or a stored swarm, newest first.docs/migrations.md
- Open models in legionA spec names its model with model, a Hub id, and says where it runs with one inference block:docs/open-models.md
- Run resultslegion.results.load(path) reads a finished run into one typed result: an outcome for each Trial, each agent and the run, the run and attempt IDs, the spec's limits and task, timing, and the paths of…docs/results.md
- compute: slurmWorkers as Slurm jobs, sbatch'ed by the controller; the controller and the world are Slurm jobs too, which legion launch submits and legion stop --release cancels. The reconcile loop, placement, hear…docs/slurm.md
- Spawning agentsA running agent (a "leader") can create child agents of other roles, prompt them, read their status and remove them. Children are ordinary agents: they have a Trial, a session, a worker, a state and…docs/spawn.md
- Sweeps on Slurmlegion sweep runs an independent matrix of pinned Harbor experiments. It uses the regular legion init, launch and release lifecycle for each cell. Run the driver on a compute node when the cluster li…docs/sweeps.md
- Adding Harbor tasksLegion runs tasks from Hugging Face dataset repositories through Harbor. Each agent gets its own task environment. A shared board or world is configured separately in the Legion spec.docs/tasks.md
- Adding toolsTools are Python functions packaged for the agents' task environments. Add them as modules in src/legion/harbor/builtin/tools/; that is where tools for an experiment in experiments/ go too (experimen…docs/tools.md
- WorldsA world is shared state behind tools: a task board, a canvas, a game. It is an HTTP service outside legion, in any language. Each call reaches the world with the calling agent's name and a secret. le…docs/world.md