Skip to main content
POST
Issue a least-privilege child context for an external CLI

Body

application/json
cliName
string
required

Logical CLI name for audit and lineage

allow
string

Comma-separated permission:objectType:objectId entries to lease to the child context

asAgent
string

Admin-only: delegate the child context to an explicit agent identity

asSessionKey
string

Admin-only: bind the delegated identity to an explicit session key

asSessionName
string

Admin-only: bind the delegated identity to an explicit session name

inherit
boolean

Inherit all capabilities from the current context

ttl
string

TTL like 30m, 2h or 1d (default: 1h, capped by the parent context)

withSessionActor
boolean

Admin-only: project the verified human actor of the delegated session's live turn (fails closed otherwise)

Response

Success — body conforms to the @Returns schema.

agentId
string | null
required
capabilities
object[]
required
capabilitiesCount
number
required
cliName
string
required
contextId
string
required
contextKey
string
required
createdAt
number
required
env
object
required
expiresAt
number | null
required
kind
string
required
metadata
object | null
required
parentContextId
string
required
sessionKey
string | null
required
sessionName
string | null
required
source
object | null
required
warnings
string[]