Blog · AI Development
AI Agents in Crypto: On-Chain Agents, Use Cases and Risks
AI agents and blockchains are a natural combination. Blockchains provide open, programmable money and data; agents can read that data, make decisions and take actions. From DeFi automation to research assistants, "AI agents crypto" has become one of the most discussed topics in Web3. Here's what's real today and how to build safely.
What is an on-chain AI agent?
An on-chain agent is an AI system that can read blockchain data and sign transactions through a wallet it controls, within limits. It might rebalance a portfolio, claim rewards, pay for services or respond to events in a protocol. Because transactions are irreversible, the design of permissions and safeguards matters more than in most AI applications.
Practical use cases
- DeFi automation: move funds between yield sources, rebalance positions, or repay loans before liquidation.
- Treasury management: execute approved strategies for DAO or company treasuries with human sign-off.
- Research assistants: summarise on-chain activity, token unlocks, governance proposals and news.
- Customer support for Web3 apps: answer questions about transactions and wallets using live chain data.
- Security monitoring: watch contracts and wallets for suspicious behaviour and alert teams.
- Payments between agents: agents paying for APIs or data using stablecoins.
Giving agents wallets safely
The biggest design question is how much power the agent has. Good patterns include:
- Smart contract wallets with policies: daily spending limits, allowed contracts and allowed tokens.
- Session keys: temporary permissions that expire and can be revoked.
- Human approval: require a person to approve transactions above a threshold.
- Simulation first: simulate every transaction before signing to check its effects.
- Separate funds: keep the agent's wallet funded only with what it needs.
Risks to manage
- Prompt injection: malicious text in data sources that tries to trick the agent into harmful actions.
- Hallucinated actions: the model misunderstands a situation and takes the wrong step.
- Smart contract risk: interacting with a malicious or buggy contract.
- Key compromise: if the agent's keys leak, funds are at risk.
- Regulatory questions: automated management of others' funds may be a regulated activity.
Defences include strict allow-lists, transaction simulation, rate limits, monitoring and keeping a human accountable.
Architecture
- Perception: blockchain indexers, price feeds and approved news or social sources.
- Reasoning: a language model with clear instructions and tools.
- Tools: functions to read balances, simulate transactions and propose actions.
- Policy layer: code (not the model) that enforces limits and approvals.
- Execution: a smart wallet or MPC signer that only accepts policy-approved transactions.
- Audit log: every decision and action recorded for review.
The key principle: let the AI propose, and let deterministic code and humans decide what's allowed.
Agent tokens and hype
Many tokens have been launched around AI agents. Some support real products; many are speculative. If you're building an agent product, focus on the service it provides. A token should only exist if it has a clear role, and its launch should follow the same responsible practices as any other token.
Getting started
- Pick one read-only use case, such as research summaries or monitoring.
- Add proposed actions that a human approves.
- Introduce limited autonomous actions with strict policies.
- Expand gradually as you build confidence and track record.
Defending against prompt injection
Agents that read web pages, social media or token metadata can encounter text written to manipulate them, for example instructions hidden in a token name telling the agent to send funds elsewhere. Treat all external content as untrusted data. Separate instructions from data in your prompts, never let content from outside sources change the agent's goals or permissions, and enforce all spending rules in code rather than relying on the model to follow them. Test your agent with deliberately malicious inputs before launch.
Monitoring and observability
- Log every input, decision and proposed action
- Alert on unusual behaviour, such as repeated failed transactions or new counterparties
- Track spending against limits in real time
- Review samples of decisions regularly
- Keep a fast way to pause the agent
Good observability turns an agent from a black box into a system you can trust and improve.
Use case spotlight: DAO operations
DAOs generate a lot of operational work: summarising governance proposals, tracking treasury positions, preparing payment batches and reporting to members. An agent can draft proposal summaries, monitor treasury risk and prepare transactions, while the DAO's multi-signature signers or governance votes keep final control. This combination saves time without handing over custody of community funds.
Choosing what not to automate
Some decisions should stay human: large transfers, changes to protocol parameters, responses to security incidents and anything with legal implications. Defining these boundaries clearly at the start makes it easier to automate everything else with confidence.
Development roadmap
- Choose a narrow, valuable use case.
- Build read-only data access and summaries.
- Add transaction proposals with simulation and human approval.
- Introduce limited autonomy with policy-enforced limits.
- Monitor, audit and expand carefully.
Regulatory outlook
Regulators haven't written specific rules for AI agents in crypto, but existing rules still apply. If an agent manages funds for others, gives investment advice or executes trades for clients, the business behind it may need licences. Keep humans accountable, document how the agent makes decisions, and seek legal advice for customer-facing agent products.
Agents for customer support in Web3 apps
One of the most practical uses of AI agents today is customer support for crypto products. Users often ask why a transaction is pending, where their tokens went, or how to bridge assets. An agent that can read the user's public transaction history, explain what happened in plain language and guide them through fixes can resolve many tickets instantly. Because these agents only read public data and give guidance, they carry far less risk than agents that move funds.
Combine the agent with human escalation for complex cases, and keep a strict rule that support agents never ask for seed phrases or private keys, a common tactic used by scammers impersonating support.
Frequently asked questions
Can an AI agent hold crypto?
Technically, an agent can control a wallet. Legally, the funds belong to a person or company, who remains responsible for what the agent does.
Which chains are best for agents?
Low-fee chains with good smart wallet support, such as Ethereum Layer 2s and Solana, are common choices.
Is it safe to let an agent trade?
Only with strong limits, simulation, monitoring and human oversight. Start small and expand carefully.
Key takeaways
- Let AI propose; let code and humans decide.
- Limit agent wallets with strict policies.
- Defend against prompt injection and monitor everything.
- Start read-only and expand carefully.
Build with AnAInfo
We combine AI development and blockchain engineering to build safe on-chain agents. See also AI agents for business, or contact us.