SDK reference · Node SDK

prov.mandate.agents.update

prov.mandate.agents.update in Node SDK.

Signature

prov.mandate.agents.update(id: string, params: { name?: string; description?: string | null }): Promise<Agent>

Parameters

idstringRequired
params{ name?: string; description?: string | null }Required

Request fields

idstringpathRequired
The object's ID.
namestring
A name you choose.
descriptionstring | null
A longer description.
categoryenum
The agent's category. One of search_crawler, ai_training_crawler, ai_assistant_fetch, shopping_agent, monitoring, other_agent.
sellingboolean
Mark it a seller agent (it needs an active Identify signing key and a seller_origin).
seller_originstring | null
The https origin that publishes /.well-known/provenance-agent.json. Changing it clears the last check.
responder_mcpboolean
Turn the responder tools on the MCP server on or off for this agent (an owner or admin; on needs an active Identify signing key, since its proposals are signed with it).

Returns

Promise<Agent> The updated agent.

HTTP operation

PATCH /v1/mandate/agents/{id}: Update an agent

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}`, {
  method: "PATCH",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "description": "Pays approved supplier invoices up to $5,000" }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.