Guide: Agent Integration
assembly-cli is built for both humans and AI runtimes.
This guide covers how to expose the CLI to agents and produce reliable machine-readable output.
1) Discover command surface (--llms / --llms-full)
Print an LLM-readable command manifest:
bash
# Compact command index
assembly-cli --llms
# Full manifest with arguments, env vars, and output fields
assembly-cli --llms-fullUse --llms for quick discovery and --llms-full when bootstrapping tools in an agent harness so the model can inspect all available commands and arguments.
2) Get structured command contracts (--schema)
Get JSON Schema for a command to validate arguments/output expectations:
bash
assembly-cli governance proposals --schema
assembly-cli governance proposal --schema
assembly-cli council seats --schemaThis is useful for typed wrappers and guardrails in orchestrators.
3) Register as an agent skill (skills add)
bash
assembly-cli skills addThis syncs skill files so compatible agent runtimes can call the CLI as a tool.
4) Register as MCP server (mcp add)
bash
assembly-cli mcp addUse this when your agent framework prefers MCP discovery/invocation.
5) Prefer machine-readable output for automation
JSON output
bash
assembly-cli governance proposals --format json
assembly-cli status --format jsonInclude metadata envelope (--verbose)
bash
assembly-cli governance proposal 42 --format json --verboseNarrow payloads (--filter-output)
bash
assembly-cli governance proposal 42 --format json --filter-output id,status,voteEndAt
assembly-cli status --format json --filter-output activeMemberCount,proposalCount6) Example: polling loop primitive
bash
assembly-cli governance proposals --format json --filter-output proposalsAgent workflow pattern:
- Fetch proposals list
- Detect status transitions by proposal id
- On change, query
assembly-cli governance proposal <id> --format json --verbose - Emit alert/event to downstream systems
7) Reliability tips for agent systems
- Pin a consistent output format (
--format json) - Use
--filter-outputto minimize token usage - Use
--schemato validate command contracts before deployment - Keep command reference nearby for parameter details