Goober Swarm » Docs » UCP-1 protocol
Edit on GitHub
UCP-1 protocol
Goobers never touch files or git themselves: they answer in UCP-1, a tiny tag protocol, and the orchestrator carries it out. Tags must start a line; everything else in a reply is ignored.
Tags¶
| Tag | Meaning | Who |
|---|---|---|
@READ:path | file or directory; contents come back next turn | everyone |
@WRITE:path | followed by a fenced code block with the FULL file content | everyone |
@RUN:command | run a shell command in the repo (tests, builds); output comes back next turn | everyone |
@SEARCH:regex|glob | ripgrep the repo (glob optional, e.g. *.py); matching lines come back | everyone |
@DIFF:path | uncommitted changes (git diff; path optional) | everyone |
@SHOT:target size | steps | repo file (page.html) or http://localhost:PORT; size = mobile|tablet|desktop|WxH (+ full); steps optional: click #id; type #q hi; press Enter; scroll 600; wait 500; shot; record 6 250 (= 6 frames, 250ms apart). You get a layout report (+ the images if you can see them); the user sees them. Use it to check and iterate on anything visual. | everyone |
@SHOW:path|caption | show an image, GIF or video you made (e.g. with ffmpeg/ImageMagick) to the user | everyone |
@SERVE:command|PORT | start a dev server in the background (for @SHOT); stops when the task ends | everyone |
@FETCH:url | a web page (docs, references), rendered in a real browser, as markdown | everyone |
@ASK:question | ask the user something only they can answer; wait for the reply | everyone |
@SPLIT:brief|files | one sizeable independent part; the orchestrator picks who does it (parallel) | lead |
@TO:NAME|brief | give a part to one specific teammate | lead |
@GIT:STATUS or @GIT:COMMIT:message | (commit + push) | everyone |
@DONE:summary | when your work is complete | everyone |
@BLOCKED:reason | when you cannot continue | everyone |
@SHOT example: the page at phone size, then click a button and record its animation:
@SHOT:demos/pricing/index.html mobile | click #billing-switch; record 6 250
@WRITE is followed by a fenced code block containing the full file:
@WRITE:src/hello.py
```python
def hello(name):
return f"Hello, {name}!"
```
@DONE:Added hello()
What the orchestrator does¶
@READ,@SEARCH,@DIFF,@FETCH,@RUN,@SHOTand@GITresults, and any write errors, come back to the same Goober on its next turn.@SPLITcreates a subtask and the orchestrator chooses who does it;@TOgives it to one named teammate. Helpers can't use either.@RUNand@SERVEfollow your run permissions. Commands run in the repo inside the VM, with secrets stripped from the environment. Servers stop when the task ends.@SHOTscreenshots a repo file orhttp://localhost:PORT(seeing the work);@FETCHrenders a web page in the same browser and returns it as markdown, marked as untrusted data. Neither can reach the orchestrator's own ports or private network addresses.@ASKputs a question to you and waits; your answer goes to the asker.- A helper's
@DONE/@BLOCKEDgoes back to the lead with a list of parts still running. - The lead's
@DONEfinishes the task once all delegated parts have reported. - Paths are relative to the active repo; nothing outside the workspace (or secret files) can be read or written.
Prompts¶
The lead is told its teammates' talents, the repo tree, the goal, the subtasks so far and the latest message, and to delegate only sizeable independent parts. A helper sees the overall goal as context, its own brief, and the rule to do only that part. See build_prompt in orchestrator/protocol.py.
Limits¶
| Limit | Value | Defined in |
|---|---|---|
| Agent turns per work task | 60 | protocol.MAX_STEPS |
| Nudges when a lead answers without tags | 2 | protocol.MAX_NUDGES |
| Feed messages kept in memory | 500 | protocol.FEED_SIZE |
| Reroutes per message before giving up | 2 | SwarmOrchestrator._reroute |
| Seconds one @RUN command may take | 180 | protocol.RUN_TIMEOUT |
| Seconds a Goober gets to answer a bid | 60 | protocol.BID_TIMEOUT |
| Bid round ends early after (seconds, once 3 bids are in) | 20 | protocol.BID_ENOUGH |
| Background dev servers per task (@SERVE) | 3 | protocol.MAX_SERVERS |
| Seconds a browser action (@SHOT / @FETCH) may take | 90 | browser.SHOT_TIMEOUT |
| Cooldown after a rate limit | 15 min | AgentManager._settle |