Skip to main content
Give AI agents access to 2,900+ yield opportunities across 80+ blockchain networks. Yield.xyz AgentKit discovers and constructs unsigned transactions for staking, lending, vaults, liquid staking, and restaking. Privy handles wallet creation, policy enforcement, and transaction signing. The two systems never overlap: Yield.xyz never signs, Privy never builds transactions.

Resources

Yield.xyz AgentKit

GitHub repository for the Yield.xyz AgentKit MCP server.

Yield.xyz AgentKit docs

Official documentation for the Yield.xyz AgentKit.

Privy agentic wallets

Set up Privy server wallets for autonomous agents.

Privy manual approvals

Intents API reference for semi-autonomous workflows.

What is Yield.xyz AgentKit?

Yield.xyz AgentKit is an MCP server that provides AI agents with tools to search yield opportunities, build deposit/withdraw/claim transactions, and check balances across 80+ networks. All yield operations go through MCP tools — agents never call the Yield.xyz REST API directly.
Yield.xyz AgentKit is maintained by the Yield.xyz team. For AgentKit-specific issues, refer to their GitHub repository.

Prerequisites

  • A Privy account with API credentials (dashboard.privy.io)
  • PRIVY_APP_ID and PRIVY_APP_SECRET set as environment variables
  • Optionally PRIVY_WALLET_ID if a wallet already exists
  • Claude Code installed
  • Privy Enterprise plan (required for the semi-autonomous workflow only)
To set up Privy server wallets before continuing: Agentic wallets guide · Privy dashboard

Installation

Install the Yield.xyz AgentKit skill:
The installer prompts for a skill selection (yield-agentkit-privy) and an agent choice (Claude Code, Cursor, or Codex CLI). Once complete, the skill is symlinked into the project at .agents/skills/yield-agentkit-privy. Open the agent in the project directory and run:
The skill verifies Privy credentials and prompts for a workflow selection: Autonomous or Semi-Autonomous.

Workflows

Privy supports two control models depending on approval requirements.

Autonomous

The agent signs and broadcasts transactions directly via Privy’s wallet RPC endpoint. Policies are enforced automatically within the TEE. No manual approval is required. Available on any Privy plan.
1

Verify credentials

The skill checks that PRIVY_APP_ID, PRIVY_APP_SECRET, and optionally PRIVY_WALLET_ID are present.
2

Register the MCP server

The skill registers the Yield.xyz AgentKit MCP server:
3

Configure a policy (optional)

The skill offers to attach a policy (conservative, balanced, or skip). Policies restrict per-transaction spend, allowed chains, or allowlisted protocols. All enforcement happens inside the TEE.
4

Create the wallet

The skill creates a wallet and attaches the policy if one was configured.
5

Fund the wallet

Send assets to the displayed wallet address.
6

Issue DeFi instructions

The agent is ready. Example prompt: "Deposit USDC into Aave V3 on Base."

Semi-autonomous (Enterprise)

Every transaction is submitted as an intent via Privy’s Intents API. A designated approver must review and approve each transaction on the Privy dashboard before it executes. Intents expire after 72 hours if not approved. Intent statuses: pending (awaiting approval), executed (broadcast), failed (execution error), expired (72h elapsed), rejected (cancelled), dismissed (resource changed).
1

Complete autonomous setup steps 1–3

Follow the credential verification, MCP registration, and policy configuration steps from the autonomous workflow above.
2

Confirm Enterprise prerequisites

Verify the Enterprise plan is active and the approver has been invited and completed MFA.
3

Create a key quorum

Create a key quorum in the Privy dashboard under Wallet Infrastructure → Authorization → New Key → Register Key Quorum Instead. Copy the Quorum ID and provide it to the agent. The agent verifies it via GET /v1/key_quorums/{id}.
4

Create the wallet

The skill creates the wallet with the key quorum as owner:
5

Set up webhooks (optional)

Register an HTTPS endpoint under Configuration → Webhooks in the Privy dashboard and enable all four intent events: intent.created, intent.authorized, intent.executed, and intent.failed. See Privy intent webhooks.For testing without a backend, use webhook.site.
Once setup is complete, every transaction follows this cycle: agent builds via MCP → submits as intent → approver reviews on dashboard → Privy signs and broadcasts → agent polls until executed → reads hash.

Transaction flow

Every yield action — enter, exit, or manage — follows the same sequence:
  1. Call yields_get to inspect the yield schema
  2. Call actions_enter, actions_exit, or actions_manage to build unsigned transactions
  3. MCP returns an array of transactions with stepIndex, type, and unsignedTransaction
  4. For each transaction in stepIndex order:
    • Autonomous: POST /v1/wallets/{id}/rpc → immediate hash
    • Semi-autonomous: POST /v1/intents/wallets/{id}/rpc → poll until executed
  5. Report results with on-chain confirmation hashes

EVM transactions

Extract only the fields Privy accepts from the unsigned transaction:
Submit to Privy:

Solana transactions

Convert hex to base64 before submitting:

Multi-transaction ordering

Transactions are processed sequentially in stepIndex order. For EVM chains, the nonce increments for each subsequent transaction. If any transaction fails, execution stops immediately and the failure is returned.
For detailed transaction guides, see Send EVM transaction and Send Solana transaction.
The skill never modifies values inside an unsignedTransaction. Amounts, recipient addresses, fees, and calldata are passed through exactly as returned by the MCP. Only structural fields are adjusted for Privy’s signing format.

Error handling


What cannot be automated


Learn more

Yield.xyz AgentKit

Skill repository and MCP server source.

Yield.xyz AgentKit docs

AgentKit reference documentation.

Privy agentic wallets

Wallet setup guide for autonomous agents.

Privy manual approvals

Intents API reference.

Privy webhooks

Webhooks overview for transaction events.

Privy dashboard

Wallet and policy management.