Feature Request: Add a dedicated event role to Chat Completions
I would like to request a new first-class message role for externally generated application events, such as event or system_event, in the Chat Completions API.
Problem
Today, an application may have more sources of context than just a human user, the assistant, or a tool call.
For example, consider an inventory-management application:
- A user is chatting with an inventory-management agent.
- A background service continuously monitors inventory.
- The service detects that a product has fallen below its minimum stock level.
- The application wants to wake up the agent and have the agent proactively notify the user.
The event is not actually a user message, and it is not a developer instruction.
For example:
{
"type": "inventory_low",
"product": "iPhone 15",
"current_stock": 2,
"minimum_stock": 10
}
Currently, an application might represent this as:
{
"role": "user",
"content": "Inventory alert: iPhone 15 has only 2 units remaining. Minimum stock is 10."
}
But semantically, this is misleading. The user never said this. It came from an autonomous background service.
Proposed solution
Add a dedicated role such as:
{
"role": "event",
"content": {
"type": "inventory_low",
"product": "iPhone 15",
"current_stock": 2,
"minimum_stock": 10
}
}
The model could then understand the distinction between:
user→ something explicitly provided by the humanassistant→ something previously generated by the modeldeveloper/system→ application-level instructions and behaviortool→ results from a tool invocationevent→ an externally generated application event that may require the agent to react
Why this would be useful
This pattern is not limited to inventory systems. Many agentic applications have asynchronous events such as:
inventory.low_stockorder.shippedpayment.faileddelivery.delayedsubscription.expiringsecurity.alertcalendar.event_startingmonitoring.threshold_exceededcustomer.status_changed
These events are fundamentally different from user messages.
A dedicated role would allow developers to maintain a much more semantically accurate conversation history and would make event-driven agents easier to build.
Desired behavior
For example:
User:
How much stock do we have for iPhone 15?
Assistant:
You currently have 15 units.
Event:
iPhone 15 stock has dropped to 2 units.
Minimum stock is 10 units.
Assistant:
The iPhone 15 inventory is now low. There are only 2 units remaining, while the minimum required stock is 10 units.
The key point is that the Event should be understood as external application state, not as something the user said.
Alternative
If introducing a new top-level role is undesirable, another possibility would be a first-class message type/source field, for example:
{
"role": "user",
"source": "application_event",
"event_type": "inventory_low",
"content": "..."
}
However, I believe a dedicated event role would provide the clearest semantic model for event-driven and proactive agents.
This would be especially valuable for applications where background services need to trigger an agent without pretending that the human user initiated the interaction.