Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

What protection modes does AgentGuard support? How to configure them?

2025-08-19 206

AgentGuard supports three protection modes that can be initialized with the mode Parameter Configuration:

  • throw: Error thrown on overrun, for cases where manual handling is required. Developers can catch errors with try-catch and customize the handling logic.
  • notify: Sends notifications when overruns occur (e.g., via a configured webhook), but does not terminate the process. Ideal for scenarios where you need to keep running but need to be reminded.
  • kill: Direct process termination in case of cost overruns, suitable for environments with strict budget control.

Configuration example:const guard = await agentGuard.init({ limit: 100, mode: 'throw', webhook: 'https://hooks.slack.com/...' });. Additionally, the protection model and budget cap can be used by guard.setLimit() Dynamic adjustment.

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish