SDK reference · Node SDK

prov.mandate.agents.create

prov.mandate.agents.create in Node SDK.

Signature

prov.mandate.agents.create(params: CreateAgentParams): Promise<Agent>

Parameters

paramsCreateAgentParamsRequired

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
namestringRequired
A name you choose.
descriptionstring
A longer description.
categoryenum
What kind of agent this is, shown to sites in verdicts and in the agent's card. One of search_crawler, ai_training_crawler, ai_assistant_fetch, shopping_agent, monitoring, other_agent.

Returns

Promise<Agent> The agent.

HTTP operation

POST /v1/mandate/agents: Register an agent

Errors

Example

const data = 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",
    "description": "Pays approved supplier invoices"
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.