Agent routes: update, delete
The Agent Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.
Reference for Agent, one group of Agent routes.
Agent.update
Changes the given properties of an Agent. Verb page.
PATCH /{namespace}/ agents/ {id}Path: id. Body, as JSON: the other inputs. Emits Agent.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Agent. |
instructions | text | What the Agent does and how. | |
model | string | The model the Agent runs on. | |
tools | string[] | The tools the Agent may call. | |
skills | list of Skill | The Skills it loads. | |
memory | string | One of tenant (one Memory per Customer Tenant) or startup (one Memory for the Startup). | |
maxSteps | integer | The most steps one Task may take. | |
budget | money | The most one Task may spend; the Mandate’s Limits apply as well. | |
handoffs | list of Role | The Roles it hands work to. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
agent | Agent | required | The Agent. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X PATCH https: //api.sb/ leaseline.app/ agents/ agent_tCzKDMorKn \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"skills": ["skill_xBqG4zTxBA"]}'{
"api": "https: //api.sb/ leaseline.app",
"agent": {
"$id": "https: //api.sb/ leaseline.app/ agents/ agent_tCzKDMorKn",
"$type": "Agent",
"instructions": "Write as the property manager’s assistant. Never promise a rent the manager has not set.",
"model": "claude-opus-5-5",
"status": "seated",
"skills": [
"skill_xBqG4zTxBA"
]
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Agent.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Agent.delete
Deletes an Agent: a soft delete that keeps its history, undone by Thing.restore. Verb page.
DELETE /{namespace}/ agents/ {id}Path: id. Emits Agent.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Agent. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
agent | Agent | required | The Agent. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X DELETE https: //api.sb/ leaseline.app/ agents/ agent_tCzKDMorKn \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ leaseline.app",
"agent": {
"$id": "https: //api.sb/ leaseline.app/ agents/ agent_tCzKDMorKn",
"$type": "Agent",
"instructions": "Write as the property manager’s assistant. Never promise a rent the manager has not set.",
"model": "claude-opus-5-5",
"status": "seated"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Agent.delete",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}