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

Diseñado para la velocidad: ~ 10 ms de latencia, incluso bajo carga
¡Una forma increíblemente rápida de crear, rastrear e implementar sus modelos!
- Gestiona más de 350 RPS en solo 1 vCPU, sin necesidad de ajustes
- Listo para la producción con soporte empresarial completo
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 ofrece una latencia de entre 3 y 4 ms, gestiona más de 350 RPS en una vCPU, se escala horizontalmente con facilidad y está listo para la producción, mientras que LitellM presenta una latencia alta, tiene dificultades para superar un RPS moderado, carece de escalado integrado y es ideal para cargas de trabajo ligeras o de prototipos.
















.webp)
.webp)






.webp)
.webp)






