agent.fund
fund(agentId, amount) → Receipt Send OKRW from the owner's wallet to the agent's AA wallet as a native transfer, and wait until it confirms. Any agent except a REVOKED one can be funded: OKRW sent to a REVOKED agent could never be drained or sent again, so the tool refuses.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
agentId | string | ✓ | The UUID of the agent to fund. |
amount | string | ✓ | Amount of OKRW to send, as a decimal string (e.g., '10.5'). |
Returns
Type:
object { txHash, agent, amount, unit } once the transaction confirms: agent is the agent's name, amount echoes the requested decimal string, and unit is "OKRW".
Errors
| Code | Name | Description |
|---|---|---|
AGENT_NOT_ACTIVE | AgentNotActive | The agent is REVOKED. OKRW sent to it could never be drained or sent, so the tool refuses. Not retryable: create a new agent and fund that one instead. |
FUND_FAILED | FundFailed | The owner's transfer failed, for example because the owner wallet holds less than the amount plus gas. detail carries requestId, errorCode, errorMessage and revertReason. Retryable. |
Examples
Fund Agent with 1,000 OKRW
{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"amount": "1000"
}