---
title: "One call: intent in, plan or signable payload out"
method: POST
path: "/api/agent/do"
tags: ["agents"]
---

# One call: intent in, plan or signable payload out

`POST /api/agent/do`

## Request

- Base URL: `https://api.anygas.xyz/svc`
- URL: `https://api.anygas.xyz/svc/api/agent/do`
- Auth: none declared

The single entry point for an autonomous agent. Accepts plain language ("send 25 USDC to 0xabc... on arbitrum") or structured fields, resolves chains/token/amount, quotes the best rail, and returns exactly one of: status "sign" (with the precise payload to sign and where to POST it), "quoted" (something is still missing), "done" (sandbox), or a typed error. Replaces the chains -> quote -> execute -> poll sequence. Send header x-anygas-sandbox: 1 to dry-run the whole flow with no funds. Rate limit 60/min (300/min with a key).

## Headers

- `x-anygas-pass` string

## Request body

- object
  - `intent` string: plain-language instruction
  - `fromChain` union
    - integer
    - string
  - `toChain` union
    - integer
    - string
  - `token` string
  - `amountHuman` number: human units, e.g. 25
  - `amount` string: base units; overrides amountHuman
  - `toAddress` string
  - `sandbox` boolean

## Response `200`

Plan, signing instruction, or sandbox result

- object

## Other responses

- `400`: Typed error - branch on errorCode, never on the message text
- `429`: Typed error - branch on errorCode, never on the message text
- `503`: Typed error - branch on errorCode, never on the message text

---

[API](https://skmtc.dev/anygas/apis/robyn-anygas-api.md) · [All operations](https://skmtc.dev/anygas/apis/robyn-anygas-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anygas/apis/robyn-anygas-api/revisions/9b7498be8304?raw)
