LLM Request • AI Agent SDK
llm_request: Emit LLM request event.
llm_request
Method
</div>
This is a method of the ContextTraceEmitter class in the context_events module.
Emit LLM request event.
Signature
def llm_request(agent_name: str, messages_count: int, tokens_used: int, tokens_budget: int, model: Optional[str], messages: Optional[List[Dict[str, Any]]]) -> NoneParameters
ParamField
strName of the agent making the request
ParamField
intNumber of messages in the request
ParamField
intEstimated tokens used
ParamField
intToken budget available
ParamField
Optional[str]Model being used
ParamField
OptionalOptional full messages array for context replay
Source
View on GitHubpraisonaiagents/trace/context_events.py at line 993