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

Conçu pour la vitesse : latence d'environ 10 ms, même en cas de charge
Une méthode incroyablement rapide pour créer, suivre et déployer vos modèles !
- Gère plus de 350 RPS sur un seul processeur virtuel, aucun réglage n'est nécessaire
- Prêt pour la production avec un support complet pour les entreprises
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 offre une latence d'environ 3 à 4 ms, gère plus de 350 RPS sur 1 processeur virtuel, évolue horizontalement facilement et est prête pour la production, tandis que LiteLM souffre d'une latence élevée, peine à dépasser un RPS modéré, ne dispose pas d'une mise à l'échelle intégrée et convient parfaitement aux charges de travail légères ou aux prototypes.
















.webp)
.webp)






.webp)
.webp)






