AgentKit Plugin
Coinbase AgentKit integration for autonomous agent wallets.
Overview
The MARC Protocol AgentKit plugin integrates with Coinbase's AgentKit framework, enabling autonomous agents to make encrypted payments using Coinbase-managed wallets. This is ideal for agents that need enterprise-grade key management without self-custody.
Package: @marc-protocol/agentkit-plugin
Installation
npm install @marc-protocol/agentkit-plugin @coinbase/agentkitSetup
agent.tstypescript
import { CdpWalletProvider } from "@coinbase/agentkit";
import { MarcAgentKitPlugin } from "@marc-protocol/agentkit-plugin";
// Initialize Coinbase wallet
const walletProvider = await CdpWalletProvider.configureWithWallet({
apiKeyName: process.env.CDP_API_KEY_NAME!,
apiKeyPrivateKey: process.env.CDP_API_KEY_PRIVATE_KEY!,
networkId: "ethereum-sepolia",
});
// Create MARC plugin
const marcPlugin = new MarcAgentKitPlugin({
walletProvider,
tokenAddress: "0xE944754aa70d4924dc5d8E57774CDf21Df5e592D",
verifierAddress: "0x4503A7aee235aBD10e6064BBa8E14235fdF041f4",
});
// Get available actions
const actions = marcPlugin.getActions();
// Returns: marc_wrap, marc_unwrap, marc_transfer, marc_pay, marc_balanceAvailable Actions
| Action | Description | Parameters |
|---|---|---|
marc_wrap | Wrap USDC to cUSDC | amount, to (optional) |
marc_unwrap | Unwrap cUSDC to USDC | amount, to (optional) |
marc_transfer | Encrypted cUSDC transfer | to, amount |
marc_pay | x402 payment (transfer + record) | to, amount |
marc_balance | Check USDC and cUSDC balances | address (optional) |
With LangChain
langchain-agent.tstypescript
import { AgentKit } from "@coinbase/agentkit";
import { getLangChainTools } from "@coinbase/agentkit-langchain";
import { MarcAgentKitPlugin } from "@marc-protocol/agentkit-plugin";
const agentKit = await AgentKit.from({
walletProvider,
actionProviders: [new MarcAgentKitPlugin({ walletProvider, ...config })],
});
const tools = getLangChainTools(agentKit);
// Use tools with LangChain agent executorVirtuals GAME Plugin
For Virtuals Protocol GAME agents, MARC provides a separate plugin:
virtuals-agent.tstypescript
import { FhePlugin } from "@marc-protocol/virtuals-plugin";
const plugin = new FhePlugin({
credentials: {
privateKey: process.env.PRIVATE_KEY!,
tokenAddress: "0xE944754aa70d4924dc5d8E57774CDf21Df5e592D",
verifierAddress: "0x4503A7aee235aBD10e6064BBa8E14235fdF041f4",
fhevmInstance,
},
});
const worker = plugin.getWorker();
// 5 GameFunctions: fhe_wrap, fhe_pay, fhe_unwrap, fhe_balance, fhe_infoOpenClaw Skill
For OpenClaw agents, MARC provides 6 CLI scripts:
# Wrap USDC into cUSDC
npx tsx scripts/wrap.ts --amount 10
# Encrypted payment
npx tsx scripts/pay.ts --to 0x... --amount 1
# Unwrap (cUSDC → USDC)
npx tsx scripts/unwrap.ts --amount 5
# Check balance
npx tsx scripts/balance.ts
# Protocol info
npx tsx scripts/info.tsFramework Comparison
| Framework | Package | Tools | Tests |
|---|---|---|---|
| MCP (Claude/GPT) | @marc-protocol/mcp-server | 6 | Included |
| Coinbase AgentKit | @marc-protocol/agentkit-plugin | 5 | Included |
| Virtuals GAME | @marc-protocol/virtuals-plugin | 5 | 37 |
| OpenClaw | @marc-protocol/openclaw-skill | 6 | 31 |
| ElizaOS | Example in repo | 3 | Example |