Skip to main content
Guides
Category
Security
Reading time
7 minutes
Published
Updated

How to give an AI agent RPC access without giving up control

A blockchain agent may need to read a balance, create an RPC key, pay for API access, or send a signed transaction. Those actions have different consequences. Giving one general-purpose credential to an agent blurs the boundary between looking up data, managing the account, paying for infrastructure, and moving funds onchain.

SolidRPC's agent-native access makes the first three jobs available through a public management flow, but the owner must set the authority. This guide gives a practical permission model for an EVM agent, including what to do when a payment or transaction result is uncertain. It is about controlling a production workflow, not trusting a prompt to keep a secret safe.

Section 01

Map each action to a separate authority

Use four boxes in your design. Read chain data needs an RPC key and the required method on the selected network. Manage the SolidRPC account needs a scoped sa_ management credential. Fund prepaid RPC access needs an owner-approved signed budget and a wallet authorized for the quoted payment. Sign or broadcast an application transaction needs a separate transaction policy and signer controlled by the application owner.

The sa_ credential is not accepted as an RPC key, and the ak_ RPC key does not authorize account management. Neither is a substitute for an application's transaction approval. SolidRPC's live capabilities and management OpenAPI describe the current credential and scope model. Keep the initial access limited to read-only methods unless the task genuinely needs a write.

Section 02

Keep a balance monitor read-only

An ETH or USDC balance monitor needs public addresses and read methods. It does not need wallet seed phrases, token approvals, or signed transactions. An agent can use a keyless endpoint for a bounded test or a privately stored RPC key for an authenticated worker. It needs a management credential only if account operations are part of the authorized task.

Enforce the worker's allowed RPC methods in code. For example, a balance-only worker can allow chain identity, block headers, eth_getBalance, and eth_call with a verified token contract and read-only ABI. Do not rely on a prompt to prevent arbitrary tool execution. Keep the setup agent's account and payment authority out of the long-running monitor. See the Base monitor guide for the request and persistence design.

Section 03

Grant only the management permissions the task needs

For an existing eligible paid account, create an agent credential in Agent access and select scopes deliberately. A usage auditor may need only usage and billing reads. A setup assistant may need permission to create an RPC key. Funding, budget changes, support actions, and key-secret access are separate decisions. Review the resulting permissions in the dashboard and revoke the credential when its task ends. Free accounts cannot delegate management control.

For a newly provisioned prepaid account, the first credential is restricted to setup and funding. It gains no operational authority merely because payment was attempted. The public onboarding sequence requires settlement and a credential rotation before the agent can create an RPC key. This makes the transition from provisioning to ongoing account management explicit.

Section 04

Keep payment ceilings and retry identities outside the prompt

Before an agent funds access, approve a payment ceiling and an RPC usage ceiling. The current SolidRPC onboarding flow asks the authorized wallet to sign the budget challenge. The agent should show the owner the exact service, payment network, amount, usage ceiling, and terms before requesting a signature. Raising or replacing a budget requires renewed authorization. A text instruction such as 'spend no more than a dollar' is not the budget control.

Store each funding idempotency key and signed payment proof in private durable state before sending them. On an uncertain response, inspect the original intent and reuse its retry identity. Do not create another funding request or sign another payment merely because a network call timed out. The public recovery instructions describe the status checks. Restrict wallet-file access to the payment step, and keep the private key out of chat, source control, logs, and screenshots.

Section 05

Do not confuse an RPC write with permission to transact

A JSON-RPC service can accept eth_sendRawTransaction, but it does not decide whether an agent should sign a transaction. The application owner should define allowed chains, contracts, methods, value limits, and approval steps in the signer or execution environment. The agent can prepare a proposed action and its evidence, then ask for approval before a signer releases a transaction. Do not infer permission to trade, transfer, approve tokens, or deploy contracts from permission to query RPC.

Before any authorized write, read the intended chain ID, target, calldata, value, and fee bounds. Simulate where the chain and method support it, then review the actual signed transaction. A simulation is evidence, not a guarantee of the mined outcome. After a broadcast timeout, reconcile by the transaction hash before deciding whether to rebroadcast the identical signed bytes. Never create a different transaction automatically because the first response was lost. The broadcast-timeout guide explains how to reconcile submission, and the failed-transaction guide explains receipt evidence after inclusion.

Section 06

Verify answers before an agent acts on them

An agent should check the response's JSON-RPC id, result or error, the expected chain ID, and the block context used for a decision. An HTTP 200 alone does not prove the requested method succeeded. A null receipt or empty log list may be a valid answer, but it should not be silently converted into an instruction to retry a payment or transaction. For a multi-call decision, pin compatible reads to the same block where supported and retain the block hash.

Check the exact method family in the live network catalog. If the agent needs historical state or tracing, qualify those calls at the required depth. Keep bounded deadlines and request pacing within the account's published allowance. When an outcome is ambiguous, return it as unknown with the request ID, chain, method, and timestamp. The block-tag guide explains why several latest reads may not describe one state.

Section 07

An operating checklist for an agent with RPC access

  • Give the agent a task-specific management credential and a separate RPC key.
  • Store secrets in private files or a secret manager, never in prompts or code.
  • Approve terms and both budget ceilings before wallet signing.
  • Persist idempotency keys and payment proof before network writes.
  • Keep transaction signing under an explicit application policy and owner approval.
  • Verify the chain and block context before using a read to make a financial decision.
  • Reconcile an uncertain payment or broadcast by its original identity.
  • Review usage and permissions regularly, then revoke access when the task ends.

Start with a read-only task and test revocation before adding funding or transaction authority. The SolidRPC agent onboarding guide gives the account setup sequence, and the provider comparison helps choose the service boundary.

Workload review

Want us to benchmark your current RPC stack?

Send your providers, routing setup, method mix, or monthly bills. We will compare the complete stack with one SolidRPC integration across cost, useful completion rate, failover, and operational work.