We just opened up the Giza SDK for builders. Here's how you can go from zero to a running financial agent. 🧵
Initialize the client. One instance, reused across your entire app.
The first thing you do for any new user is create a smart account. This provisions an ERC-4337 smart account via ZeroDev. A few things worth understanding here: • It's deterministic: the same origin wallet always generates the same smart account address. No state to store on your end. • It's self-custodial: the user owns the account. Giza never holds their funds. • This address is where your user sends their deposit. Nothing is locked or committed yet.
Once your user has deposited, activate their agent. Activation does several things under the hood: • It allocates the deposited capital across the selected protocols • Grants a session key so the agent can execute future rebalances without user signatures • And starts the continuous optimization loop From this point, the agent runs 24/7 without any further input from you or your user.
Constraint your user’s agent to your risk profile. These constraints define the risk envelope your agent operates within — and they're enforced at every rebalance cycle, not just at activation. As a builder, this is how you express your risk policy. You set the rules. The agent cannot violate them.
Once active, monitor everything in real time. These endpoints give you everything you need to build a meaningful performance dashboard for your users: Live APR, current allocation across protocols, and a full historical value curve.
Withdrawals are straightforward. No lock-ups, no delays beyond the on-chain transaction. Users can exit fully or partially at any time. Partial withdrawals don't interrupt the agent, it continues optimizing whatever remains.
The session key model is what makes all of this safe to run autonomously. When a user activates their agent, they grant a session key with specific, limited permissions. That session key can: • Move capital between approved DeFi protocols • Execute rebalancing transactions • Pay gas on the user's behalf That session key explicitly cannot: • Withdraw funds to any external address • Interact with unapproved contracts • Act beyond the constraints you defined Permissions are time-bound and revocable. Every transaction is on-chain and auditable. The agent does the work, the user keeps control.
174