How rokbenko/quackd works
quackd is a command-line and service layer for connecting heterogeneous robots, piloting them with language models, and coordinating them as flocks. The main run accepts a goal from the CLI, chat, or a .duck task, resolves a registered robot and its declared capabilities, then repeatedly observes, chooses one action, enforces run limits, and executes it through the robot adapter. The repository also documents flock coordination, perception, simulation, and remote LeRobot policy serving. Some subsystems are represented from README claims and the file tree; their internal wiring is omitted where source evidence was not provided.
Main entry points: loop.py Agent loop · cli.py CLI · safety.py Safety executor · core.py Core verbs
Components 25
Entry and tasks
- CLI
quackd/cli.py - Task files
quackd/duckfile/parser.py - MCP server
quackd/mcp_server.py
Pilot and controls
- Agent loop
quackd/agent/loop.py - LLM providers
quackd/agent/providers - Decision pilots
quackd/agent/decision - Safety executor
quackd/safety.py - Verb registry
quackd/verbs/registry.py - Core verbs
quackd/verbs/core.py
Robot runtime
- Perception
quackd/perception - Robot manifest
quackd/adapters/manifest.py - Robot adapters
quackd/adapters/base.py - Transport
quackd/transport/base.py - Robot registry
quackd/registry.py - 2D simulator
quackd/sim2d/world.py
Flock coordination
- Flock task
quackd/duckfile/schema.py - Flock coordinator
quackd/flock/coordinator.py - Flock member
quackd/flock/member.py - Flock message bus
quackd/flock/bus.py
LeRobot policy
- Policy client
adapters/lerobot/src/quackd_lerobot/policy/client.py - Policy server
adapters/lerobot/src/quackd_lerobot/policy/server.py - Checkpoint pipeline
adapters/lerobot/src/quackd_lerobot/policy/pipeline.py - Policy runner
adapters/lerobot/src/quackd_lerobot/policy/runner.py
Other components
- Robot operator
- Human approver
Connections 27
- Robot operator → CLI: submits goal
README.md - Robot operator → MCP server: pilots by chat
README.md - Task files → CLI: provides task
README.md - CLI → Agent loop: starts run
quackd/cli.py - CLI → Robot registry: selects robot
quackd/cli.py - Agent loop → LLM providers: requests model choice
quackd/agent/loop.py - Agent loop → Decision pilots: optionally scores choices
quackd/agent/loop.py - Agent loop → Safety executor: enforces action
quackd/agent/loop.py - Safety executor → Verb registry: checks allowlist
quackd/safety.py - Verb registry → Core verbs: registers templates
quackd/verbs/registry.py - Core verbs → Transport: sends intents
quackd/verbs/core.py - Core verbs → Perception: detects targets
quackd/verbs/core.py - Agent loop → Perception: observes
quackd/agent/loop.py - Robot adapters → Robot manifest: returns capabilities
quackd/adapters/base.py - Robot adapters → Transport: implements interface
quackd/adapters/base.py - Robot registry → Robot adapters: resolves registered body
- 2D simulator → Transport: simulates transport
- Safety executor → Human approver: requests approval
README.md - CLI → Flock coordinator: starts flock run
README.md - Flock task → Flock coordinator: configures roles
quackd/duckfile/schema.py - Flock coordinator → Flock member: dispatches work
- Flock member → Flock message bus: exchanges messages
quackd/flock/member.py - Flock member → Agent loop: runs robot pilot
- Policy client → Policy server: sends policy requests
adapters/lerobot/src/quackd_lerobot/policy/client.py - Policy server → Checkpoint pipeline: loads checkpoint
adapters/lerobot/src/quackd_lerobot/policy/server.py - Checkpoint pipeline → Policy runner: builds runner
adapters/lerobot/src/quackd_lerobot/policy/pipeline.py - Policy client → Policy runner: requests action chunks
adapters/lerobot/src/quackd_lerobot/policy/client.py