Agents
Understand the agent primitive — Wallgent's core building block for AI-native finance.
An agent is the central primitive in Wallgent. It combines three things into a single managed entity:
- A wallet — holds funds, maintains balance, enforces spending isolation
- A scoped API key — grants only the permissions the agent needs (least privilege)
- Spending policies — automatic rules enforced before every payment
This means your AI agent gets everything it needs to operate financially as a single unit, with no manual stitching together of wallets, keys, and rules.
Two wallet types
Wallgent has two wallet types:
| Type | Purpose | Created by |
|---|---|---|
ORG | Organization-level wallet; the funding source | Automatically on signup |
AGENT | Per-agent budget; funded from the org wallet | POST /v1/agents |
Agent wallets inherit the environment (SANDBOX or PRODUCTION) and currency of the org wallet. An agent cannot operate across environments.
The agent lifecycle
create → fund → operate → (pause ↔ resume) → (rotate key) → delete- Create: A wallet and a scoped API key are provisioned together. The returned API key is shown once.
- Fund: Move money from the org wallet to the agent's wallet (
adjustBudget). - Operate: The agent uses its API key to call the Wallgent API. Every payment is checked against the agent's policies.
- Pause/Resume: Freeze the agent's wallet to halt all spending without losing the balance.
- Rotate: Issue a new API key with zero downtime; the old key is immediately revoked.
- Delete: The remaining balance is swept back to the org wallet before the agent is removed.
Budget model
Agents do not have a credit limit — they can only spend what's in their wallet. This makes them safe to run autonomously:
- Your org wallet is the source of truth for available funds
- An agent's
adjustBudgetcall is a ledger transfer between org wallet and agent wallet - If the agent's wallet balance hits zero, the next payment fails with
INSUFFICIENT_FUNDS
This prevents runaway spending by design: no budget, no payment.
Agent templates
Wallgent provides 10 pre-configured agent templates, each with sensible default policies:
| Template | Use case | Default max/day |
|---|---|---|
customer-support | Handle refunds and service credits | $100 |
procurement | Purchase approved vendors | $1,000 |
research | API calls, data subscriptions | $50 |
trading | Market operations | $500 |
expense-tracker | Employee reimbursements | $200 |
invoice-collector | Collect from customers | — |
budget-guardian | Monitor and alert on spending | — |
payroll-agent | Distribute compensation | $10,000 |
revenue-reporter | Analytics and reporting | — |
subscription-manager | Recurring billing | $500 |
Templates are starting points. You can override any policy after creation.