Skip to main content
Resumes the agent’s automated operations by automatically restoring the protocol list. The SDK fetches all available protocols and filters them based on the user’s current chains and strategy.

Signature

Returns

A Promise that resolves to an UpdateUserProfileResponse containing the updated user configuration.

Return Type

Example

How it Works

The resumeAgent method performs the following logic internally:
  1. Fetches User Profile: Retrieves the user’s current chains and strategy (e.g., conservative).
  2. Discovery: Fetches the complete list of supported protocols from the Zyfai infrastructure.
  3. Filtering: Matches protocols that:
    • Operate on at least one of the user’s active chains.
    • Support the user’s selected strategy.
  4. Registration: Updates the user profile with the discovered protocolIds, re-enabling automated yield optimization.

Notes

  • Requires SIWE authentication (via connectAccount()).
  • This is the inverse of pauseAgent().
  • If no protocols match the current strategy/chain combination, the protocol list will remain empty.
  • To manually specify protocols, use updateUserProfile() instead.