Execute Intent API
HTTP mirror for execute-intent, status, and build-tx. Prefer Agent CLI or MCP for agent execution.
Overview
Default path: Use Agent CLI (thirdfy-agent run) or MCP (walletExecute, or executeIntent and agentRun with an agent API key). This page documents the underlying REST contract for custom backends and llms-full.txt.
Submit and track intents for registered agents. Thirdfy validates policy, then fans out to delegated users or executes on an agent wallet lane.
Authentication: your agent API key (agent-...). Create it in the Thirdfy dashboard at thirdfy.com/connect, under Agent key. It is shown once.
How fan-out works
An agent submits one intent. Thirdfy checks it against the agent's policy, limits and allowed actions, then builds one execution per delegated user and runs each within that user's delegation, moving only that user's funds. A rejected intent reaches no one. See Act for many wallets.
| Model | Route | Who builds | Who signs and broadcasts |
|---|---|---|---|
| Execute Intent | POST /api/v1/agent/execute-intent | Thirdfy | A delegated executor, within each user's delegation (or the agent's own wallet on agent_wallet) |
| Build Tx | POST /api/v1/agent/build-tx | Thirdfy, one unsigned transaction | The agent or user, who broadcasts it |
| Fails at | Where | Result |
|---|---|---|
| Policy, mandate or allowlist | Thirdfy, before anything is built | The intent is rejected |
| Params or slippage | Thirdfy, or on-chain | Rejected at validation, or the transaction reverts |
| The user revoked first | Thirdfy | Pending executions are cancelled |
| A revert on-chain (for example, no liquidity) | On-chain | That user's transaction fails; no funds move |
| A user has no Credits left | Thirdfy | That user's result is blocked at stage credits; the others still run |
CLI and MCP equivalents
agentRun, executeIntent, getAgentActions, getIntentStatus, buildTx and the delegation tools need an agent API key. An app signed in with Thirdfy (Claude, ChatGPT) doesn't get them: it runs the same actions with previewOrder and walletExecute.
| REST | MCP | CLI |
|---|---|---|
GET .../actions/catalog | getActionsCatalog | thirdfy-agent actions |
GET .../actions | getAgentActions | thirdfy-agent actions --agent-api-key <key> |
POST .../execute-intent | executeIntent, agentRun | thirdfy-agent run |
GET .../execute-intent/status | getIntentStatus | thirdfy-agent intent-status |
POST .../build-tx | buildTx | thirdfy-agent run --signer user (returns the unsigned transaction) |
Hosted agents should not reimplement this table with raw curl unless they operate outside CLI and MCP.
Base URL
| Environment | Base URL |
|---|---|
| Production | https://api.thirdfy.com |
| Testnet | https://api-test.thirdfy.com |
Endpoints
GET /api/v1/agent/actions/catalog
Full public catalog (schema, params, provider families). No authentication.
See Actions Reference and Actions List.
GET /api/v1/agent/actions
Actions allowed for your agent key. Omit agentApiKey for the full list.
POST /api/v1/agent/execute-intent
Submit an intent. Thirdfy validates policy and fans out to delegated users.
| Field | Type | Required | Description |
|---|---|---|---|
agentApiKey | string | Yes | Agent API key |
action | string | Yes | Catalog action name |
params | object | Yes | Action-specific parameters |
chainId | number | No | Defaults to 8453 |
estimatedAmountUsd | number | No | Policy limit hint |
idempotencyKey | string | No | Strongly recommended for write retries |
thirdfy-agent run generates an idempotency key when you omit --idempotency-key. Pass your own stable key for deterministic retries across workers.
Example
Common rejection codes: ACTION_NOT_ALLOWED, INSUFFICIENT_CREDITS, DAILY_FREE_LIMIT_EXCEEDED, METAMASK_IDEMPOTENCY_KEY_REQUIRED.
GET /api/v1/agent/execute-intent/status
Poll fan-out intent status until completed or failed.
Solo agent_wallet executes via MCP walletExecute or CLI do not use this poll path. Read txHash from the direct response instead.
POST /api/v1/agent/build-tx
Build an unsigned transaction for signer: user, where your own wallet signs (runMode: self is the old name).
| Field | Type | Required | Description |
|---|---|---|---|
agentApiKey | string | Yes | Agent API key |
action | string | Yes | Catalog action |
params | object | Yes | Action parameters |
chainId | number | Yes | Chain ID |
walletAddress | string | No | Signer address when required |
Delegation
Fan-out to delegated users requires an active Gator binding before execute-intent succeeds.
| REST | Purpose |
|---|---|
POST .../delegation/create | Build payload for owner signature |
POST .../delegation/activate | Persist signed delegation |
GET .../delegation/check | Status gate |
GET .../delegation/verify | On-chain verification |
Prefer Delegation API (with MCP/CLI map) and Delegation and protection.