CommandsService
city service command
Forward custom action commands to a service
city service command
Forward any action command to a target service.
This is the advanced fallback form. Prefer concrete roots like city task ..., city memory ..., and city chat ... when they already expose the action you need.
Usage
city service command <serviceName> <command> [--payload <json>] [--agent <name> | --path <path>] [--host <host>] [--port <port>]Key options
--payload <json>: action input payload; JSON string is supported, non-JSON is passed as plain string--delay <ms>: delay this action--time <time>: schedule this action (Unix sec/ms timestamp or timezone-aware ISO datetime)--agent <name>/--path <path>: target agent resolution
About --delay / --time:
- scheduled jobs are persisted in the current agent project at
.downcity/schedule.sqlite - unfinished jobs are automatically restored after runtime restart
--delayand--timecannot be used together
For the full behavior and examples, see:
Examples
city service command task list --payload '{"status":"enabled"}' --agent my-agent
city service command memory search --payload '{"query":"release decision"}' --path /abs/path/to/agent
city service command chat send --payload '{"chatKey":"ctx_xxx","text":"later"}' --time "2026-03-25T21:00:00+08:00" --path /abs/path/to/agentRelated commands
Example Output (Based on Current Implementation)
The examples below are aligned with current command implementations in packages/downcity/src (including default output mode and field structure). Placeholder values are used for environment-specific fields.
$ city service command task list --payload '{"status":"enabled"}' --agent <agentName>
{
"success": true,
"service": "task",
"data": {
"success": true,
"tasks": []
}
}$ city service command task list --agent missing-agent
{
"success": false,
"error": "Agent not found in console registry: missing-agent. Run \"city agent list\" to inspect names."
}