Set agent credentials
set_agent_credentialsSave credential fields on a deployed agent: API keys, bot tokens, account IDs, allow lists, your own OAuth app keys, or the token for a browser-free connection. Call with only credential (no fields) to see that credential's field keys, formats, which are required, how it connects, and what is already set on this agent; nothing is written then. Skip that call when list_agent_skills with name already showed the fields. Then call with fields. Every field is checked before anything is written; unknown or Wiro-managed fields are refused. A key file, such as a Google service account JSON or an App Store .p8 key, takes the file's text, never a link: never ask for a public link to a key (the user can also upload it on the agent's page in the Wiro dashboard). Other file fields take a public URL and the file is uploaded. Values are never echoed back. A running agent restarts to load values that change, and one still stopping or queued for a restart, such as after a setup change approved in its chat, loads them with that restart; a save that changes nothing leaves it running. Fields saved for a sign-in integration that is not connected yet, such as its app keys or token, leave it running too: it restarts once, when connect_agent_oauth completes the connection. A key the agent or Wiro asks for in its chat is saved here, never sent in a message. Channels such as Telegram, Slack and Discord turn on by themselves once all their required fields are set, and turn off when one is cleared. Saving a credential turns on the scheduled tasks that need it, and the result names any that stay paused until a skill they need is on; turn off any you do not want. Sign-in integrations (such as Google Ads, YouTube, Meta and HubSpot) are then connected with connect_agent_oauth; Gmail, Google Calendar and Google Drive are not sign-ins and are set here. To connect a Wiro project (credential "wiro"), use bind_agent_project first: it takes no key. Only save a Wiro project API key here that the user gave you for this: model runs are billed to the wallet of the workspace that owns the project. On a team agent this needs a team admin or the person who deployed it; other team members can read the agent with get_my_agent and message it, so do not ask them for values they cannot save. The agents playbook (get_playbook) has the full setup walkthrough.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_guid": "<agent_guid>"
},
"name": "set_agent_credentials"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Fields to save. Send the fields of one credential together. | |
| agent_guid | Yes | The deployed agent's guid, from list_my_agents. | |
| credential | No | Describe mode: a credential key such as "telegram" or "google-ads". Used when fields is empty. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| notes | Yes | ||
| errors | No | ||
| applied | No | ||
| channels | No | ||
| agentGuid | Yes | ||
| credential | No | ||
| nextAction | No | ||
| agentStatus | No | ||
| credentials | No | ||
| uploadedFiles | No |