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.
| Hook | When it is called | The dict holds |
|---|---|---|
beforeLlmCallBefore an LLM call | Before 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 call | After each response from a language model. | The same keys, with response in place of request. |
beforeApiCallBefore an API call | Before 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. |

