Agents
Software agents and robots that act for the organization. Each has a human sponsor, an operator, an expiry (90 days unless set, at most 365) and keys of its own. It gets an access token by signing a client assertion with one of them (private_key_jwt, RFC 7523) and binding the token to a key of its choice with DPoP (RFC 9449), so a stolen token is useless. An agent can never hold a scope that changes who has access, such as people:write or access-assignments:write. Deactivating or deleting the sponsor suspends their agents, and /v1/agents:suspend stops a sponsor's, an operator's, or every agent at once.
The agent model
An agent.
Properties
- Name
id- Type
- string
- Description
Agent ID: also its OAuth client ID.
- Name
etag- Type
- string
- Description
Current version, for
If-Match.
- Name
name- Type
- string
- Description
Unique in the organization.
- Name
description- Type
- string
- Description
What it is for.
- Name
kind- Type
- string
- Description
Software or a robot. One of
software,robot.
- Name
sponsor_id- Type
- string
- Description
The person accountable for it.
- Name
operator- Type
- string
- Description
Who built or runs it: the AI or robot vendor.
- Name
status- Type
- string
- Description
Whether it may act. Changed only by
:suspendand:resume. One ofactive,suspended.
- Name
suspended_reason- Type
- string
- Description
Why it was suspended. Can be
null.
- Name
expires_at- Type
- timestamp
- Description
When it stops working.
- Name
scopes- Type
- array of strings
- Description
The scopes its tokens may carry.
- Name
workload_audiences- Type
- array of strings
- Description
The audiences this may ask for workload tokens for: short-lived JWTs that other platforms trust, such as
sts.amazonaws.com. Exact strings; empty means none.
- Name
federated_credentials- Type
- array of objects
- Description
Outside identities this trusts instead of a secret (see
docs/federated-credentials.md).
- Name
federated_credentials[].name- Type
- string
- Description
A name for it, unique on the API client or agent, such as
github-main.
- Name
federated_credentials[].issuer- Type
- string
- Description
The platform's issuer, exactly as its tokens'
iss: anhttpsURL that serves/.well-known/openid-configuration.
- Name
federated_credentials[].subject- Type
- string
- Description
The
suba token must have, exactly. Set this orsubject_pattern. Can benull.
- Name
federated_credentials[].subject_pattern- Type
- string
- Description
A pattern the
submust match instead, where*stands for any run of characters. It must start with a literal part, sorepo:acme/infra:*is allowed and*:ref:refs/heads/mainis not. Can benull.
- Name
federated_credentials[].audience- Type
- string
- Description
The
auda token must carry: what the workload asks its platform for, such as the organization's issuer URL.
- Name
federated_credentials[].claims- Type
- object
- Description
Other claims a token must carry with exactly these values, such as GitHub's
repository_ownerorenvironment.
- Name
jwks- Type
- object
- Description
Its public keys, as a JWKS: it signs client assertions with one.
- Name
labels- Type
- object
- Description
Labels.
- Name
managed_by- Type
- string
- Description
The tool that manages it, if any. Can be
null.
- Name
created_at- Type
- timestamp
- Description
When it was created.
- Name
updated_at- Type
- timestamp
- Description
When it last changed.
List agents
Needs the agents:read scope.
Query parameters
- Name
page_size- Type
- integer
- Description
Results per page, 1 to 200.
0or absent means 50; more than 200 means 200 (AIP-158).
- Name
page_token- Type
- string
- Description
next_page_tokenfrom the previous page.
- Name
updated_since- Type
- timestamp
- Description
Only resources changed at or after this time.
- Name
sponsor_id- Type
- string
- Description
Only this sponsor's agents.
- Name
status- Type
- string
- Description
Only active or only suspended agents. One of
active,suspended.
- Name
kind- Type
- string
- Description
Only software or only robots. One of
software,robot.
Request
curl https://acme.ext.passway.com/v1/agents \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"data": [
{
"id": "agt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "lobby-delivery-bot",
"description": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "acme-robotics",
"status": "active",
"suspended_reason": null,
"expires_at": "2026-11-30T14:02:11Z",
"scopes": [
"…"
],
"workload_audiences": [
"…"
],
"federated_credentials": [
{}
],
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": null,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
],
"next_page_token": null
}
Create an agent
The sponsor must be an active person, and the caller must hold every scope it gives. jwks holds public keys only.
Needs the agents:write scope.
Headers
- Name
Idempotency-Key- Type
- string
- Description
A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns
422; repeating it while the first is still running returns409withRetry-After.
Required attributes
- Name
name- Type
- string
- Description
Unique in the organization.
- Name
kind- Type
- string
- Description
Software or a robot. One of
software,robot.
- Name
sponsor_id- Type
- string
- Description
The person accountable for it: an active person.
- Name
operator- Type
- string
- Description
Who built or runs it.
- Name
jwks- Type
- object
- Description
Its public keys, as a JWKS (
{"keys": [...]}): EC P-256 or RSA, at most five, never a private key.
Optional attributes
- Name
description- Type
- string
- Description
What it is for.
- Name
expires_at- Type
- timestamp
- Description
When it stops working: within a year. Default 90 days from now.
- Name
scopes- Type
- array of strings
- Description
The scopes its tokens may carry. Never the ones that manage identity or access; and only scopes the creator holds.
- Name
workload_audiences- Type
- array of strings
- Description
The audiences this may ask for workload tokens for (see
POST /oauth/tokenwithaudience): at most 10 exact strings.
- Name
federated_credentials- Type
- array of objects
- Description
Outside identities this trusts instead of a secret: tokens another platform issues to a workload, such as a GitHub Actions job.
- Name
federated_credentials[].name- Type
- string
- Description
A name for it, unique on the API client or agent, such as
github-main.
- Name
federated_credentials[].issuer- Type
- string
- Description
The platform's issuer, exactly as its tokens'
iss: anhttpsURL that serves/.well-known/openid-configuration.
- Name
federated_credentials[].subject- Type
- string
- Description
The
suba token must have, exactly. Set this orsubject_pattern. Can benull.
- Name
federated_credentials[].subject_pattern- Type
- string
- Description
A pattern the
submust match instead, where*stands for any run of characters. It must start with a literal part, sorepo:acme/infra:*is allowed and*:ref:refs/heads/mainis not. Can benull.
- Name
federated_credentials[].audience- Type
- string
- Description
The
auda token must carry: what the workload asks its platform for, such as the organization's issuer URL.
- Name
federated_credentials[].claims- Type
- object
- Description
Other claims a token must carry with exactly these values, such as GitHub's
repository_ownerorenvironment.
- Name
labels- Type
- object
- Description
Labels.
- Name
managed_by- Type
- string
- Description
The tool that manages it, if any.
Request
curl -X POST https://acme.ext.passway.com/v1/agents \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "equals",
"expires_at": "2026-11-30T14:02:11Z",
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
}
}'
Response
{
"id": "agt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "lobby-delivery-bot",
"description": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "acme-robotics",
"status": "active",
"suspended_reason": null,
"expires_at": "2026-11-30T14:02:11Z",
"scopes": [
"…"
],
"workload_audiences": [
"…"
],
"federated_credentials": [
{
"name": "github-main",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:acme/infra:ref:refs/heads/main",
"subject_pattern": "repo:acme/infra:environment:*",
"audience": "https://acme.ext.passway.com",
"claims": {}
}
],
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": null,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Get an agent
Needs the agents:read scope.
Path parameters
- Name
agent_id- Type
- string
- Description
Agent ID:
agt_followed by 1 to 64 lowercase letters and digits.
Request
curl https://acme.ext.passway.com/v1/agents/agt_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"id": "agt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "lobby-delivery-bot",
"description": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "acme-robotics",
"status": "active",
"suspended_reason": null,
"expires_at": "2026-11-30T14:02:11Z",
"scopes": [
"…"
],
"workload_audiences": [
"…"
],
"federated_credentials": [
{
"name": "github-main",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:acme/infra:ref:refs/heads/main",
"subject_pattern": "repo:acme/infra:environment:*",
"audience": "https://acme.ext.passway.com",
"claims": {}
}
],
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": null,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Update an agent
A JSON merge patch (RFC 7396): fields in the body replace the current ones, null removes a field where the schema allows null, and objects such as labels are merged. Requires If-Match with the current etag.
Needs the agents:write scope.
Path parameters
- Name
agent_id- Type
- string
- Description
Agent ID:
agt_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
The resource's current
etag, in double quotes. Required.
Optional attributes
- Name
name- Type
- string
- Description
New name.
- Name
description- Type
- string
- Description
New description.
- Name
sponsor_id- Type
- string
- Description
A new sponsor: an active person.
- Name
operator- Type
- string
- Description
New operator.
- Name
expires_at- Type
- timestamp
- Description
A new expiry, within a year of now: how a sponsor renews it.
- Name
scopes- Type
- array of strings
- Description
New scopes.
- Name
workload_audiences- Type
- array of strings
- Description
New workload audiences, replacing the current ones.
- Name
federated_credentials- Type
- array of objects
- Description
New federated credentials, replacing the current ones.
- Name
federated_credentials[].name- Type
- string
- Description
A name for it, unique on the API client or agent, such as
github-main.
- Name
federated_credentials[].issuer- Type
- string
- Description
The platform's issuer, exactly as its tokens'
iss: anhttpsURL that serves/.well-known/openid-configuration.
- Name
federated_credentials[].subject- Type
- string
- Description
The
suba token must have, exactly. Set this orsubject_pattern. Can benull.
- Name
federated_credentials[].subject_pattern- Type
- string
- Description
A pattern the
submust match instead, where*stands for any run of characters. It must start with a literal part, sorepo:acme/infra:*is allowed and*:ref:refs/heads/mainis not. Can benull.
- Name
federated_credentials[].audience- Type
- string
- Description
The
auda token must carry: what the workload asks its platform for, such as the organization's issuer URL.
- Name
federated_credentials[].claims- Type
- object
- Description
Other claims a token must carry with exactly these values, such as GitHub's
repository_ownerorenvironment.
- Name
jwks- Type
- object
- Description
New keys.
- Name
labels- Type
- object
- Description
Labels to set;
nullvalues remove a label. Can benull.
- Name
managed_by- Type
- string
- Description
The tool that manages it;
nullclears it. Can benull.
Request
curl -X PATCH https://acme.ext.passway.com/v1/agents/agt_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"' \
-H "Content-Type: application/merge-patch+json" \
-d '{
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"expires_at": "2026-11-30T14:02:11Z",
"labels": {
"old-label": null,
"team": "security"
}
}'
Response
{
"id": "agt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "lobby-delivery-bot",
"description": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "acme-robotics",
"status": "active",
"suspended_reason": null,
"expires_at": "2026-11-30T14:02:11Z",
"scopes": [
"…"
],
"workload_audiences": [
"…"
],
"federated_credentials": [
{
"name": "github-main",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:acme/infra:ref:refs/heads/main",
"subject_pattern": "repo:acme/infra:environment:*",
"audience": "https://acme.ext.passway.com",
"claims": {}
}
],
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": null,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Delete an agent
Its access tokens stop working at once.
Needs the agents:write scope.
Path parameters
- Name
agent_id- Type
- string
- Description
Agent ID:
agt_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
The resource's current
etag, in double quotes. Required.
Request
curl -X DELETE https://acme.ext.passway.com/v1/agents/agt_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"'
Response
204 Deleted
Suspend an agent
The kill switch for one agent: its access tokens stop working at once and it gets no new ones until :resume.
Needs the agents:write scope.
Path parameters
- Name
agent_id- Type
- string
- Description
Agent ID:
agt_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
If set, the action only runs if the resource's
etagstill matches.
- Name
Idempotency-Key- Type
- string
- Description
A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns
422; repeating it while the first is still running returns409withRetry-After.
Optional attributes
- Name
reason- Type
- string
- Description
Why, for the log and the sponsor.
Request
curl -X POST https://acme.ext.passway.com/v1/agents/agt_01jd8k3m2v9x4q7r5t6w8y0z1a:suspend \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'
Response
{
"id": "agt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "lobby-delivery-bot",
"description": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "acme-robotics",
"status": "active",
"suspended_reason": null,
"expires_at": "2026-11-30T14:02:11Z",
"scopes": [
"…"
],
"workload_audiences": [
"…"
],
"federated_credentials": [
{
"name": "github-main",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:acme/infra:ref:refs/heads/main",
"subject_pattern": "repo:acme/infra:environment:*",
"audience": "https://acme.ext.passway.com",
"claims": {}
}
],
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": null,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Resume a suspended agent
Refused with 409 while the sponsor is inactive or the agent has expired.
Needs the agents:write scope.
Path parameters
- Name
agent_id- Type
- string
- Description
Agent ID:
agt_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
If set, the action only runs if the resource's
etagstill matches.
- Name
Idempotency-Key- Type
- string
- Description
A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns
422; repeating it while the first is still running returns409withRetry-After.
Request
curl -X POST https://acme.ext.passway.com/v1/agents/agt_01jd8k3m2v9x4q7r5t6w8y0z1a:resume \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"
Response
{
"id": "agt_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"name": "lobby-delivery-bot",
"description": "…",
"kind": "software",
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"operator": "acme-robotics",
"status": "active",
"suspended_reason": null,
"expires_at": "2026-11-30T14:02:11Z",
"scopes": [
"…"
],
"workload_audiences": [
"…"
],
"federated_credentials": [
{
"name": "github-main",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:acme/infra:ref:refs/heads/main",
"subject_pattern": "repo:acme/infra:environment:*",
"audience": "https://acme.ext.passway.com",
"claims": {}
}
],
"jwks": {},
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": null,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Suspend many agents
The kill switch for a sponsor's agents, an operator's, or all of them: name exactly one. Returns the agents it suspended; ones already suspended are left as they are.
Needs the agents:write scope.
Headers
- Name
Idempotency-Key- Type
- string
- Description
A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns
422; repeating it while the first is still running returns409withRetry-After.
Optional attributes
- Name
sponsor_id- Type
- string
- Description
Every agent this person sponsors.
- Name
operator- Type
- string
- Description
Every agent from this operator.
- Name
all- Type
- boolean
- Description
Every agent in the organization.
- Name
reason- Type
- string
- Description
Why, for the log.
Request
curl -X POST https://acme.ext.passway.com/v1/agents:suspend \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"sponsor_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a"
}'
Response
{
"suspended": [
"agt_01jd8k3m2v9x4q7r5t6w8y0z1a"
]
}