Skip to content

ACP Primitives

ACP primitives are the operations agents use to coordinate. They’re exposed through the waggle compound tool — one tool that batches multiple operations.

Agents see a single tool called waggle. It accepts a dance array of operations and an optional wait directive:

{
"dance": [
{ "do": "read_file", "path": "src/api.ts" },
{ "do": "publish", "type": "review.started" },
{ "do": "set_state", "key": "status", "value": "reviewing" }
],
"wait": "review.complete"
}

One tool call, three operations, then sleep until review.complete. Zero coordination tokens.

File, shell, git, and web tools provided by propolis.

OperationParametersDescription
read_filepathRead file contents
write_filepath, contentWrite file (create or overwrite)
patch_filepath, patchesApply patches (search/replace)
list_filespathList directory contents
globpattern, path?Find files by pattern
greppattern, path?, glob?Search file contents
OperationParametersDescription
shellcommand, args?, cwd?Execute a shell command
OperationParametersDescription
git_statusShow working tree status
git_diffstaged?Show changes
git_commitmessage, files?Create a commit
git_logcount?Show recent commits
OperationParametersDescription
fetchurl, method?, headers?, body?HTTP request
scrapeurlFetch and extract page content

Coordination primitives — the core of multi-agent communication.

Publish an event to all subscribed agents.

{ "do": "publish", "type": "task.complete", "data": { "task": "auth-module" } }

Events are the primary communication channel. Agents subscribe to event types and wake when matching events arrive.

Atomically claim a resource (mutex lock).

{ "do": "claim", "resource": "file:src/api.ts" }

If the resource is already claimed by another agent, the claim fails. Claims auto-release if the agent’s heartbeat times out.

Release a previously claimed resource.

{ "do": "release", "resource": "file:src/api.ts" }

Read from the shared key-value store.

{ "do": "get_state", "key": "current_phase" }

Omit key to get all state.

Write to the shared key-value store.

{ "do": "set_state", "key": "current_phase", "value": "review" }

State changes trigger events — other agents are notified automatically.

After executing dance operations, agents can sleep until a condition is met:

Wait valueBehavior
trueSleep until any event arrives
"event.type"Sleep until a specific event type
["type.a", "type.b"]Sleep until any of these types
5000Sleep for 5 seconds
{ types: ["type.a"], timeout: 30000 }Sleep for specific event with timeout
{
"dance": [{ "do": "publish", "type": "review.submitted" }],
"wait": { "types": ["revision.complete"], "timeout": 300000 }
}

The agent’s process sleeps. No tokens consumed. When the matching event arrives (or timeout expires), the agent wakes and the LLM continues.

Every primitive maps to a wgl command:

PrimitiveCLI Command
publishwgl events publish --type task.complete --data '{}'
claimwgl claim file:src/api.ts
releasewgl release file:src/api.ts
get_statewgl state get current_phase
set_statewgl state set current_phase review
Event subscriptionwgl events tail --type task.*