Overview
Monitoring methods let you inspect the current state of an agent and its historical performance. All methods are called on anAgent instance and are scoped to that agent’s smart-account wallet.
portfolio()
Return Type
Example
performance(options?)
Parameters
string
ISO date string to filter performance data from this date onward. Omit to get all available history.
Return Type
Portfolio is Record<string, AllocatedValue> mapping protocol names to their allocation details, and AccruedRewardsBySymbol is Record<string, AccruedRewardsWithValue> mapping reward token symbols to their locked/unlocked amounts.
Example
apr(options?)
Parameters
string
ISO date string for the start of the APR calculation period.
string
ISO date string for the end of the APR calculation period.
boolean
When
true, uses the exact end date instead of rounding to the nearest period boundary.Return Type
Example
aprByTokens(period?)
Parameters
Period
Time period for the APR calculation. Use
Period.ALL for the entire history or Period.DAY for daily.Return Type
Example
deposits()
Return Type
Example
Building a Dashboard
This example shows how to combine monitoring methods to build a portfolio dashboard view.Next Steps
Lifecycle
Activation, deactivation, and agent state management
Agent Overview
All Agent methods at a glance
Giza Client
Chain-level queries and agent factory methods