An orchestrator agent that hands work to a sub-agent gets the sub-agent its own task, created inside the orchestrator's task. The child task can only narrow the parent. Scute records the chain of agents between the person and each task.
Create a child task#
Create a task for the sub-agent with parent_task_id set to the orchestrator's open task.
/v1/apps/:app_id/authz/agents/:slug/tasksApp keycurl -X POST https://api.scute.io/v1/apps/$SCUTE_APP_ID/authz/agents/refund-worker/tasks \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "Content-Type: application/json" \ -d '{ "parent_task_id": "PARENT_TASK_ID", "acts_for": "APP_USER_ID", "actions": ["invoice:refund"] }'The child task stays inside its parent:
| Rule | What Scute does |
|---|---|
| Same person | acts_for (or acts_for_operator) must equal the parent's, or the create is a 422 |
| Never longer | expires_at is the earlier of its own lifetime and the parent's expires_at |
| Never more actions | Omit actions to inherit the parent's list. A list must be within the parent's. |
| Never more objects | Omit resources to inherit the parent's list. Each entry must be covered by the parent's list (invoice covers invoice:42). |
| Parent must be open | A closed parent is a 422 |
| Dies with the parent | Revoking or completing the parent, or suspending the parent's agent, makes the child read revoked and its token stop working |
Revoking a task ends every open task inside it, at any depth, whatever agent runs it. The revoke answer lists them in also_revoked.
The chain#
Each task has chain: the agent slugs from the person outward, outermost first. A sub-agent's task created under billing-assistant reads:
{ "chain": ["billing-assistant", "refund-worker"] }Decisions carry the chain in agent.chain, and the decision log records it.
The delegation as a JWT#
/v1/apps/:app_id/authz/agents/:slug/tasks/:id/assertionApp keyReturns the task as a JWT signed with the app's signing key, for systems that take a JWT instead of the opaque token. Verify it with the app's JWKS at /v1/auth/:app_id/.well-known/jwks.json.
{ "assertion": "eyJhbGciOi...", "expires_at": "2026-11-19T10:15:00Z" }Payload:
{ "iss": "scute", "aud": "APP_ID", "iat": 1795082400, "exp": 1795083300, "jti": "TASK_ID", "sub": "APP_USER_ID", "act": { "sub": "agent:refund-worker", "act": { "sub": "agent:billing-assistant" } }, "scute": { "task": "TASK_ID", "actions": ["invoice:refund"], "resources": ["invoice:42"], "ref": "ticket-8812" }}| Claim | Meaning |
|---|---|
| sub | The person the task acts for: an app user id, or a dashboard user id for operator tasks. For an autonomous task, agent:<slug>. |
| act | RFC 8693 actor claim. The outer act.sub is the agent running this task; each nested act is the agent that delegated to it. The orchestrator ends up innermost. |
| exp | The task's expires_at |
| scute.actions, scute.resources | The task's lists, when set |
The assertion works as the agent's credential, so from the dashboard it needs an owner or admin. A task that is not open, or whose person is banned or suspended, answers 409 with task_closed.