Skip to main content

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​

ShortLongRequiredDescription
-n--nameyesName of the agent, unique in the tenant
-i--instructionsnoPersona and standing instructions of the agent. Never put a credential here. Or use -if
-if--instructionsFilenoFile with the instructions of the agent (instead of -i)
-m--modelnoModel id, e. g. 'claude-sonnet-4-6'. Default: the tenant default
-al--autonomyLevelnoProposeOnly (default) or ActWithinBudget
-rk--runnerKindnoAgentSdk (default) or ClaudeCodeCli
-su--sponsorUserIdnoUser id of the accountable person. Default: you
-d--disablednoCreate the agent disabled (it starts no run until EnableAgent)
-mid--mandateRtIdnoRuntime id of an existing mandate; leave the mandate values (-g, -rc, -cb, -wm, -ct) out then
-g--grantnoTool grant of the new mandate: <toolPattern>[:<maxRisk>[:<argumentConstraints JSON>]], e. g.
'knowledge_*:Medium'. Repeat for several grants. Default: no grant
-rc--riskCeilingnoHighest risk class of any tool call: Low (default), Medium, High
-cb--changeBudgetPerRunnoExecuted changes one run may make (default 0: no direct change)
-wm--writeModenoPropose (default: every granted write becomes a proposal) or Direct
-ct--allowedCkTypenoCK type id the agent may write, e. g. 'System.Ai/KnowledgePage'. Repeat for several
-cid--serviceAccountClientIdnoclient_id of the service-account client. Default: 'agent-' plus the name in lower-case words
-r--rolenoRole name or id for the service-account client. Repeat for several. Default: none
-tid--tenantIdnoId of the tenant. Default: the tenant of the context
-json--jsonnoPrint 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).