ExercisesSolve 6 real-world hook, rule, and bounded-autonomy scenarios.1. Your on_tool_call callback was defined as def log(name, args): and raised TypeError when the agent called a tool. How do you fix it? Accept a single event parameter def log(event): and read event.tool_name and event.arguments Pass on_tool_call as a list of strings instead of a function Disable tools on the AgentSubmit AnswerShow AnswerTry Again2. An agent must never issue refunds over $100 even if a user tries prompt injection. Where must that rule live? Enforced deterministically in Python tool/middleware code, not only in prompt text Only in the agent's welcome greeting In a markdown comment inside README.mdSubmit AnswerShow AnswerTry Again3. You want one callback to fire whenever ANY task in a 4-agent PraisonAIAgents team starts or completes. Which config class do you use? MultiAgentHooksConfig(on_task_start=…, on_task_complete=…) RulesConfig(char_budget=…) CachingConfig(enabled=True)Submit AnswerShow AnswerTry Again4. Why does RulesConfig accept a char_budget parameter? To cap how much of the context window rule files can consume To limit the number of words in the user's question To set the maximum API billing limit in dollarsSubmit AnswerShow AnswerTry Again5. An autonomous agent keeps calling the exact same failing tool with identical arguments. Which AutonomyConfig field stops this pattern? doom_loop_threshold char_budget scheduleSubmit AnswerShow AnswerTry Again6. You schedule a Heartbeat watchdog every 5 minutes (288 runs/day). What is essential to configure on the watchdog agent? A tight per-tick ExecutionConfig(max_iter=…, max_budget=…) and a fast, low-cost model Removing all retry limits and budget caps Setting max_criteria=50 on GoalEngineerSubmit AnswerShow AnswerTry AgainBack to the Hooks and autonomy tutorial