React components and TypeScript utilities to help you build top-tier onchain apps.
One kit renders the wallet UI a human clicks. The other gives your agent a wallet so it doesn't need a human to click anything.
Turn what you learned into a concrete stack decision.
Want the shortlist in your inbox?
Subscribe for the weekly brief that turns new AI noise into the few tools and workflows worth testing.
React components and TypeScript utilities to help you build top-tier onchain apps.
Guide
Hermes Agent vs OpenClaw: Memory, Cost, and the Terminal Agent Upgrade
OpenClaw put agents in your terminal. Hermes adds memory, tools, and a cost dial you can see.
Guide
AI Tools Weekly — May 1, 2026
The agentic desktop is here — and ByteDance's UI-TARS is the one to watch
Guide
Build an AI UGC Video Factory for TikTok Shop
550 product videos per day — no actors, no creators, no missed deadlines
Every few weeks someone asks a version of the same question: "I want to build an app on Base where an AI agent handles the onchain stuff — what do I actually need?" The confusing part is that Coinbase ships two different kits that both have "onchain" and "agent" energy in their marketing, and they solve completely different problems. Mixing them up costs you a wasted afternoon reading the wrong docs.
Short version: OnchainKit is a React component library — wallet connect buttons, swap widgets, checkout flows, identity badges — for apps a human clicks through. AgentKit is a framework that gives an AI agent its own wallet and the ability to sign and send transactions on its own, no human click required. Most real products need pieces of both, not one instead of the other.
OnchainKit (@coinbase/onchainkit) is the UI and utility layer. You drop in components like <Wallet />, <Swap />, or <Checkout /> and get working, styled, wallet-aware UI without hand-rolling wagmi hooks and RPC calls yourself. It's the same category as a component library — it doesn't decide who triggers a transaction, it just makes rendering and wiring up the transaction UI fast. It's MIT-licensed, built and maintained by Coinbase, sitting at 1,000+ GitHub stars with active commits.
AgentKit (@coinbase/agentkit) is a different layer entirely: a framework for giving an autonomous agent a wallet it controls directly. No UI, no human approving each click — the agent holds keys (via Coinbase's Developer Platform infrastructure), decides when to transact, and executes. Coinbase's own tagline for it is blunt about the point: "every AI agent deserves a wallet." It's newer than OnchainKit but growing faster — it's already past 1,200 stars with commits landing within the last week as of this writing.
Put plainly: OnchainKit answers "how does a person interact with my onchain app." AgentKit answers "how does my agent interact with the chain without a person in the loop." Those are different questions, and most people asking about "AI agents on Base" are actually asking about AgentKit, then discovering OnchainKit when they realize their agent's actions still need to show up in a UI somewhere.
If you've already looked at agent-wallet plumbing like Swapper Toolkit or agent-to-API payment rails like x402, OnchainKit sits at a different layer of the stack than either. Those are about an agent moving money or paying for data behind the scenes. OnchainKit is about the front end a human sees — the connect-wallet button, the swap modal, the "Buy" flow — when your product isn't fully autonomous and still needs a person to approve, review, or just watch what's happening.
The real-world pattern that keeps showing up: a semi-autonomous agent product where the agent proposes an action (a swap, a mint, a transfer) and a human confirms it through a UI, versus a fully autonomous agent that just executes. The first case is OnchainKit's job. The second is AgentKit's. A lot of products end up needing both — AgentKit running the agent's decision loop on the backend, OnchainKit rendering the human-facing dashboard where someone can see what the agent did or is about to do.
Coinbase ships a CLI for each half, and they're worth trying side by side to feel the difference.
Scaffold the human-facing app (OnchainKit):
npx create-onchain@latest
This bootstraps a Next.js app pre-wired with OnchainKit's components. The core piece you'll touch first is the provider wrapping your app:
// providers.tsx
import { OnchainKitProvider } from '@coinbase/onchainkit';
import { base } from 'wagmi/chains';
export function Providers({ children }: { children: React.ReactNode }) {
return (
<OnchainKitProvider
apiKey={process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY}
chain={base}
>
{children}
</OnchainKitProvider>
);
}
The apiKey comes from the Coinbase Developer Platform dashboard — without it (or your own RPC URL), OnchainKit's data-fetching components have nothing to talk to. Once that's wired, dropping in <Wallet /> or <Swap /> gives you working, chain-aware UI instead of hand-building wagmi hooks and transaction state machines yourself.
Scaffold the agent-facing app (AgentKit):
npm create onchain-agent@latest
This scaffolds an agent that has its own CDP-managed wallet and can be handed a goal ("swap 10 USDC for ETH if the price drops below X") that it executes without anyone clicking a confirm button. No <Wallet /> component involved — the agent is the wallet holder.
Run both scaffolds in two terminal tabs and you'll see the split immediately: one produces a pages/ or app/ directory full of React components, the other produces an agent loop with tool definitions and no UI at all. That's the whole distinction in one comparison.
| Tool | What it's for | Who triggers the transaction | Best for | |---|---|---|---| | OnchainKit | Onchain UI components (wallet, swap, checkout) | A human, via the rendered UI | Apps where a person still approves or watches onchain actions | | AgentKit | Giving an AI agent its own wallet | The agent, autonomously | Fully autonomous agents that transact without a human in the loop | | Raw wagmi + viem | Headless hooks and low-level chain calls | Whatever you build on top | Teams that want full control over UI and transaction logic, no prebuilt components | | Thirdweb SDKs | Full-stack web3 dev platform (contracts, UI, backend) | Depends on what you build | Teams wanting one vendor across the whole stack instead of mixing kits |
If you're not sure which you need: ask whether a human ever needs to see or approve the transaction before it happens. If yes, you need OnchainKit (or equivalent UI) somewhere in the stack. If the answer is genuinely "never, the agent just acts," AgentKit is the piece doing the actual work — OnchainKit becomes optional, useful only if you still want a dashboard to observe what the agent did after the fact.
Installing OnchainKit expecting it to give your agent autonomy. It won't — it's UI. If your goal is "the agent decides and acts without anyone clicking anything," you want AgentKit, not a fancier <Swap /> button.
Skipping the API key and wondering why components render empty. OnchainKit's data-heavy components (price feeds, swap quotes, identity lookups) need either an apiKey or your own RPC URL passed to OnchainKitProvider. Without one, you get a UI shell with nothing behind it.
Giving an AgentKit-powered agent unlimited spend without guardrails. A wallet an agent controls autonomously is exactly as dangerous as it sounds if you don't cap transaction size, allowlist contracts, or add a spending ceiling. Treat agent wallet permissions the same way you'd treat API rate limits — bounded by default, widened deliberately.
Assuming you need both kits on day one. Plenty of legitimate products only need one half. A dashboard for humans to manage their own wallet doesn't need AgentKit. A pure backend agent with no UI doesn't need OnchainKit. Add the second kit when the product actually grows into needing it, not before.
Yes, and it's a common pattern — AgentKit running the agent's autonomous logic on the backend, OnchainKit rendering a human-facing dashboard showing the agent's activity or letting a human step in and act directly when needed.
OnchainKit needs either a CDP API key or your own RPC URL to power its data components. AgentKit's wallet infrastructure runs through CDP as well, so yes — for the full setup you'll be creating one CDP project that both kits can draw from.
Both are built and optimized for Base first, since Coinbase maintains the chain as well as the kits, but OnchainKit's underlying wagmi/viem stack isn't inherently Base-only if you reconfigure the chain. AgentKit's out-of-the-box wallet infra is more tightly coupled to Coinbase's own infrastructure — check current docs before assuming multi-chain support out of the box.
→ Ask the index what to build your onchain agent stack
→ Free credits for these tools
Written by McKlaud AI. Want to know which AI tools actually fit your business? Get a free AI audit.