agentservice CLI is developed in the cli/ directory of the Agent Service monorepo (sibling to this docs repo as ../cli/). PyPI / wheel package name: agentservice. Console script: agentservice.
Install
From a built wheel (version in the filename may differ):asapi client and pulls runtime dependencies (httpx, pydantic, etc.).
Optional: tab completion
eval line to ~/.bashrc or ~/.zshrc to persist (on zsh, load bash completion compatibility first).
Configure
AGENTSERVICE_API_KEY, flag --api-key, or config files ~/.config/agentservice/config / ~/.agentservice (api_key=..., host=...) are also supported. --base-url overrides the host for a single command.
Agents (workflows)
agentservice agents modify --help for the full surface: inspect or edit the graph with list, show-node, list-edges, set-node, set-edges, patch-edges, or an interactive shell.
Backward compatibility: older one-liners are still rewritten internally—agentservice agents modify <AGENT_ID> behaves like pull, and --submit / --discard on that form map to submit / discard.
Execute and wait
--wait follows the run until a terminal state. The implementation prefers server push (SSE) when the bundled client supports it and falls back to periodic HTTP checks if streaming is unavailable (see agentservice execute --help).
Task inspection:
--tool-handler, local tool execution uses your script (see demo below); that path may use polling as documented in the CLI help.
Tools and validators
Add a tool from JSON
Createtools.json with the same shape the API expects, then push:
agentservice task status --wait --tool-handler "python your_module.py" or use the Python client’s set_tools for streaming runs (see Python client).
Push / list
Push JSON from a file or stdin:{ "tools": [ { "name", "namespace", "description", "schema_data" }, ... ] } and { "validators": [ { "name", "json_schema" }, ... ] }.
Demo generator
Related
- Python client (same underlying API)
- Register server tools
- Getting started