Agent Events, Explained: The Runtime Contract Behind Reliable AI Agents

Built for Speed: ~10ms Latency, Even Under Load
Blazingly fast way to build, track and deploy your models!
- Handles 350+ RPS on just 1 vCPU — no tuning needed
- Production-ready with full enterprise support
An agent’s final answer tells you what the user saw. Its events tell your application what happened, what is still happening, what needs a human, and how to recover when the connection breaks.
1. Why a final-answer API is too small for agents
A conventional model call has a reassuring shape: send input, receive output. Even when the response streams, the application is usually reconstructing one answer. Agent execution is different. A run can make several model calls, request tools, wait for approval, authenticate to an MCP server, create a sandbox, delegate to subagents, and resume in a later request.
If the runtime exposes only the last text response, the application loses the structure it needs to operate that workflow. It cannot reliably answer basic questions:
- Is the agent thinking, invoking a tool, waiting for a human, or finished?
- Which model message proposed this tool call?
- Which events belong to a subagent rather than the root agent?
- Which fragments have already been rendered?
- After a disconnect, should the client reconnect to the live run or rebuild from persisted state?
This is why events matter. They are the interface between hidden execution and everything that must respond to it: the user interface, approval service, operations console, debugger, and evaluator.
2. What “event” means in TrueForge
TrueForge organizes execution as Agent → Session → Turn → Event → Delta. Each level answers a different question:
The agent is a definition, not a continuously running process. A session persists context across turns. A turn represents one request cycle, and only one turn runs at a time within a session. Events are the typed records produced inside that turn. Some events—most visibly model messages—can be incrementally assembled through deltas.

This hierarchy prevents two common design mistakes. First, session history should not be treated as one unbounded transcript: turns provide natural execution boundaries. Second, a streamed delta should not be stored or evaluated as if it were the final semantic event.
3. The event taxonomy is the runtime state machine
TrueForge’s documented event union covers several categories. The point is not the number of event types; it is that each category implies a different application behavior.
TrueFoundry AI Gateway delivers ~3–4 ms latency, handles 350+ RPS on 1 vCPU, scales horizontally with ease, and is production-ready, while LiteLLM suffers from high latency, struggles beyond moderate RPS, lacks built-in scaling, and is best for light or prototype workloads.
















.webp)
.webp)






.webp)
.webp)






