DeFAI Explained: AI Agents That Run DeFi, and Where They Break
AI Agents · 2026-11-16 · 4 min read
DeFAI is a short name for AI agents that take DeFi actions, such as swaps, transfers and contract calls, on their own. There's no official definition. We use the word to mean one thing: an AI model with a wallet and permission to act. The risk is simple. If someone can steer the model, they may be able to steer the money.
This post explains how it works and where it breaks. It isn't a guide to what to trade or buy.
What is DeFAI?
DeFi means financial tools that run on a blockchain, not through a bank. DeFAI adds an AI agent on top. You tell the agent what you want, and it picks the actions. If the word agent is new, our sister site explains how an AI agent differs from an AI employee or plain automation.
How does an AI agent act onchain?
It needs two things: a wallet and a list of actions it can take.
Coinbase's AgentKit is a good example. Its README describes a toolkit for giving AI agents a crypto wallet and onchain interactions. It lists wallet providers and plugs into agent frameworks.
Many tools like this are exposed to a model through the Model Context Protocol (MCP), an open standard for connecting AI apps to outside tools. Our sister site has a guide on how to build an MCP server.
What guardrails exist?
Fewer than you'd hope, and many sit outside the agent.
The AgentKit README itself warns that the toolkit doesn't gate transfers behind human approval or enforce spend caps. It says managing prompt injection risk is the developer's job. That's the current README, so check it before you rely on the wording.
So the limits have to live in the wallet. Safe's docs describe modules that allow DeFi actions without manual approvals, and that can set "whitelists, rate limits, or spending caps". The idea is to give the agent a small allowance, and let the wallet block anything outside it.
How can an agent be tricked?
The main threat is prompt injection. OWASP's entry on it says it's unclear whether there are fool-proof methods of prevention. It also notes that injected content doesn't need to be readable by a human.
In March 2025, researchers tested agents built on ElizaOS. Bad text planted in an agent's prompt or saved history could trigger unauthorised asset transfers. Models were more vulnerable to memory injection than to plain prompt injection. This was a lab test, not a real loss.
The takeaway: any text the agent reads, such as a post, a reply or a web page, could carry instructions.
Has it gone wrong in the real world?
One well-known case is the AIXBT bot, in March 2025. The Block reported about 55 ETH moved out of the bot's wallet after two malicious replies. But the maintainer said it was a dashboard access hack, "not a result of agent manipulation". Details were thin when it was reported.
We found no confirmed case of an agent losing funds to prompt injection. That doesn't mean it can't happen.
The lesson from AIXBT is plain, and it isn't about AI. Basic access controls still matter most.
How should a founder think about it?
This is our view, not a sourced fact. If you build or use an agent with a wallet:
- Keep the wallet small. Fund it with what you can afford to lose.
- Cap spending. Use limits at the wallet layer, not just in the prompt.
- Allowlist where it can send. Block everything else.
- Require a human above a limit.
- Lock down access. Protect dashboards and keys as hard as the agent.
A guardrail test. Before real money goes in, give the agent a test wallet. Try to talk it into sending funds to an address that isn't on the allowlist. If that works, the wallet isn't enforcing the limit.
What to do next
If you're testing an agent with a wallet, write down its three limits today: the most it can hold, the most it can send at once and who it can send to. If you can't name all three, don't give it funds yet.
Frequently asked questions
Is DeFAI the same as a trading bot?
Not quite. A bot follows fixed rules. A DeFAI agent uses an AI model to choose actions, which makes its behaviour harder to predict.
Can I cap what an AI agent can spend?
Yes, at the wallet layer. Safe's docs describe modules that can set spending caps and whitelists. AgentKit's README says it doesn't enforce caps itself.
What is prompt injection?
It's text that tricks an AI model into following new instructions. OWASP says there's no known fool-proof way to prevent it.
Do I need DeFAI to use DeFi?
No. You can use DeFi tools by hand. An agent adds convenience and adds risk.