Manage a Wiro agent's plan and credits
manage_agent_billingPay, renew, upgrade, or cancel a deployed agent's plan, or buy extra credits, with quotes and confirmation before charges from the workspace wallet.
Instructions
Pay for, renew, upgrade or cancel a deployed agent's plan, or buy extra credits. Charges come from the Wiro wallet of the agent's workspace (the team wallet for a team agent); the connected project must belong to that same workspace. Every call without confirm: true only returns what will happen and the amount (for a prorated upgrade, an estimate and its maximum). Show it to the user, get their approval, then repeat the call with confirm: true and confirm_charge_usd set to the quoted amount (for an upgrade, its maximum); if the price changed in between, nothing is charged and a new quote comes back. Never repeat a confirmed charge that failed or timed out without checking get_my_agent first. subscribe starts a plan for an agent without one; renew undoes a cancellation or renews an expired wallet plan; upgrade_to_pro charges the prorated difference now; buy_credits adds a credit pack (Pro only); cancel stops renewals with no refund. Plans renew every 30 days until cancelled. An agent whose plan is billed by card is upgraded and topped up in the Wiro dashboard, and a personal card plan is cancelled there; the tool returns the link and charges nothing. On a team agent only a team admin, the organization's owner or the person who deployed the agent can pay for it or change its plan; other members are refused and nothing is charged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pack | No | buy_credits only: the credit pack to buy. Leave it out to get the packs with their credits and prices. | |
| tier | No | subscribe only: the tier to pay for (default: the agent's current tier). | |
| action | Yes | subscribe, upgrade_to_pro, cancel, renew or buy_credits. | |
| confirm | No | false returns only the quote. true performs the action. Set it only after the user approved it. | |
| agent_guid | Yes | The deployed agent's guid, from list_my_agents or deploy_agent. | |
| request_id | No | buy_credits only: the id returned by the quote. Repeating a purchase with the same id never charges twice. Every new purchase needs a new quote; an id whose purchase already completed buys nothing. | |
| confirm_charge_usd | No | With confirm: true, the amount the user approved, from the quote's nextAction (quote.chargeNowUsd, or quote.maxChargeUsd for upgrade_to_pro). Required for every action that charges: subscribe, upgrade_to_pro, buy_credits and renewing an expired plan. If a fresh quote no longer matches it, nothing is charged and the new quote is returned. For upgrade_to_pro it is the most the user agreed to pay now. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | Yes | ||
| quote | No | ||
| action | Yes | ||
| result | No | ||
| message | Yes | ||
| outcome | Yes | ||
| agentGuid | Yes | ||
| requestId | No | ||
| nextAction | No | ||
| dashboardUrl | Yes | ||
| priceChanged | No |