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

python
def llm_request(agent_name: str, messages_count: int, tokens_used: int, tokens_budget: int, model: Optional[str], messages: Optional[List[Dict[str, Any]]]) -> None

Parameters

ParamField str

Name of the agent making the request

ParamField int

Number of messages in the request

ParamField int

Estimated tokens used

ParamField int

Token budget available

ParamField Optional[str]

Model being used

ParamField Optional

Optional full messages array for context replay

Source

View on GitHub

praisonaiagents/trace/context_events.py at line 993


Related Documentation