scute.agents manages the app's agents with the secret key. An agent has an owner and roles (its ceiling). Each job runs as a task with a short-lived task token. Scute::Harness starts and ends tasks for you (see Harness); use scute.agents to register agents and to manage tasks from your backend. For the concepts, see AI agents.
scute = Scute::Client.newscute.agents.create(slug: "support-bot", owner_user_id: owner_id, name: "Support bot", roles: ["support_agent"])task = scute.agents.start_task("support-bot", acts_for: user_id, actions: %w[invoice:read invoice:refund], ttl: 900)task["token"] # returned once; hand it to the agent, never to the modelRegister and manage#
| Method | Request |
|---|---|
| list | GET /v1/apps/:app_id/authz/agents (returns an Array) |
| get(slug) | GET .../agents/:slug |
| create(slug:, owner_user_id:, name: nil, description: nil, roles: nil, team_role: nil, settings: nil) | POST .../agents |
| update(slug, **attrs) | PATCH .../agents/:slug |
| delete(slug) | DELETE .../agents/:slug |
| suspend(slug) | POST .../agents/:slug/suspend |
| resume(slug) | POST .../agents/:slug/resume |
suspend is the kill switch: every open task ends at once. resume reactivates the agent.
Tasks#
| Method | Request |
|---|---|
| tasks(slug, status: nil) | GET .../agents/:slug/tasks (returns an Array; status: "open" for live tasks) |
| start_task(slug, acts_for: nil, actions: nil, resources: nil, requester: nil, ttl: nil, ref: nil, parent_task_id: nil) | POST .../agents/:slug/tasks |
| complete_task(slug, id) | POST .../agents/:slug/tasks/:id/complete |
| revoke_task(slug, id) | POST .../agents/:slug/tasks/:id/revoke |
| assertion(slug, id) | GET .../agents/:slug/tasks/:id/assertion |
start_task returns the task with id, expires_at, acts_for and token. The token is in this answer only.
Every tool call made with the token is checked against three things: the agent's roles, the person it acts for, and the task's actions and resources.
Delegation assertion#
assertion(slug, id) returns the delegation as a signed JWT in assertion: sub is the person, act is the agent chain (RFC 8693), for example { "sub" => "agent:support-bot" }. It is signed with the app's keys at /v1/auth/:app_id/.well-known/jwks.json.
jwt = scute.agents.assertion("support-bot", task["id"])["assertion"]