A Next.js project that provides an AI assistant for managing Safe accounts through a plugin interface.
Run the development server:
bun dev
Open http://localhost:3000 with your browser to access the API.
This agent provides an OpenAPI interface for managing Safe accounts with the following endpoints:
GET /api/tools/safe/deploy
Encodes a null transaction that triggers Safe deployment on a specified chain when executed. Requires:
chainId
: The network where the Safe will be deployed
GET /api/tools/safe/add_recovery
Adds a recovery address to an existing Safe using the addOwnerWithThreshold
function. Requires:
chainId
: Network where the Safe existsfrom
: The Safe addressrecoveryAddress
: Address to add as recovery
All successful transactions return a standard format:
{
transaction: {
method: "eth_sendTransaction",
chainId: number,
params: [{
to: string,
data: string,
value: string
}]
},
meta: {
safeUrl: string // URL to view the transaction in Safe UI
}
}
The agent includes an AI assistant configured to:
- Help users deploy new Safe accounts
- Guide users through adding recovery addresses
- Generate EVM transactions for Safe operations
- Provide Safe interface URLs for transaction verification
The assistant will proactively ask users if they want to add a recovery address during deployment flows.