CreateAgent
Creates an agent of the tenant with its mandate and its service-account client (tenant administrators only). Calls the MCP tool create_agent with your token; the client secret is never shown.
Examples
Create an agent that may call the knowledge tools; every write becomes a proposal:
octo-cli -c CreateAgent `
-n "Knowledge curator" `
-if "./curator.md" `
-g "knowledge_*:Medium" `
-rc "Medium"
Options
| Short | Long | Required | Description |
|---|---|---|---|
-n | --name | yes | Name of the agent, unique in the tenant |
-i | --instructions | no | Persona and standing instructions of the agent. Never put a credential here. Or use -if |
-if | --instructionsFile | no | File with the instructions of the agent (instead of -i) |
-m | --model | no | Model id, e. g. 'claude-sonnet-4-6'. Default: the tenant default |
-al | --autonomyLevel | no | ProposeOnly (default) or ActWithinBudget |
-rk | --runnerKind | no | AgentSdk (default) or ClaudeCodeCli |
-su | --sponsorUserId | no | User id of the accountable person. Default: you |
-d | --disabled | no | Create the agent disabled (it starts no run until EnableAgent) |
-mid | --mandateRtId | no | Runtime id of an existing mandate; leave the mandate values (-g, -rc, -cb, -wm, -ct) out then |
-g | --grant | no | Tool grant of the new mandate: <toolPattern>[:<maxRisk>[:<argumentConstraints JSON>]], e. g. 'knowledge_*:Medium'. Repeat for several grants. Default: no grant |
-rc | --riskCeiling | no | Highest risk class of any tool call: Low (default), Medium, High |
-cb | --changeBudgetPerRun | no | Executed changes one run may make (default 0: no direct change) |
-wm | --writeMode | no | Propose (default: every granted write becomes a proposal) or Direct |
-ct | --allowedCkType | no | CK type id the agent may write, e. g. 'System.Ai/KnowledgePage'. Repeat for several |
-cid | --serviceAccountClientId | no | client_id of the service-account client. Default: 'agent-' plus the name in lower-case words |
-r | --role | no | Role name or id for the service-account client. Repeat for several. Default: none |
-tid | --tenantId | no | Id of the tenant. Default: the tenant of the context |
-json | --json | no | Print the answer of the MCP tool as JSON |
Notes
Tenant administrators only (role TenantManagement or UserManagement); an agent's own token is refused. The MCP service checks every grant against its tool list (UnknownTool) and the risk ceiling.
The defaults are deliberately narrow: no grants, risk ceiling Low, change budget 0, write mode Propose.
There is no option for the client secret: the service generates one and never returns it, so no secret lands in a shell history or process list.
Calls <McpServiceUrl of the context>/<tenant>/mcp (set it once with AddContext -msu or Config -msu).