
PrivyShild
AI-powered DeFi agent with Privy-secured wallets and policy guardrails
Demo
About
PrivyShield AI is an autonomous DeFi agent designed to let users perform on-chain actions while keeping wallet operations within strict security boundaries. The project combines Privy Server Wallets and the Privy Policy Engine with an AI agent, allowing the agent to execute approved DeFi actions while enforcing transaction limits, destination restrictions, and chain restrictions. It also includes a Red-Team simulator that demonstrates how a malicious transaction can be rejected by the policy layer
How it's made
PrivyShield AI was built with Next.js 14, React, TypeScript, Solidity, and Base Sepolia. Privy is the core of the wallet and security layer: we use Privy Server Wallets for programmatic transaction signing, Privy Policy Engine to enforce spending and destination rules, and Privy Embedded Auth for user authentication. The AI agent uses a tool-based execution flow to understand user intents and prepare blockchain actions. Viem and ethers.js handle EVM interactions, while our AgentVault smart contract manages the on-chain DeFi logic. We also built a Red-Team simulator to demonstrate how the policy layer blocks unauthorized transactions