LLM and API calls

These hooks see every call and can refuse it; they cannot change it. A refused call stops the agent with the hook's message.

HookWhen it is calledThe dict holds
beforeLlmCallBefore an LLM callBefore each request is sent to a language model.convid, agentName, userEmail, profile, the LLM profile's name, isValidation and request, the request as JSON: the model, the prompt, the tools and the limits.
afterLlmCallAfter an LLM callAfter each response from a language model.The same keys, with response in place of request.
beforeApiCallBefore an API callBefore an api command sends its request. If it raises, the request is not sent.convid, agentName, userEmail, profile, the API profile's name, method, url, headers, queryParams, body and isValidation.