Items & Events
Complete reference for all item shapes and streaming events, aligned with the OpenResponses specification.
Open Responses Compliance
Noetic's output item types are direct type aliases of the @openrouter/sdk types (e.g., ResponsesOutputMessage, ResponsesOutputItemFunctionCall). There is no hand-rolled ItemBase or conversion layer -- the SDK types provide id, type, and status fields natively.
This means:
- Any Open Responses-compatible client can consume Noetic's item log directly.
- Items round-trip cleanly: output items from the SDK are used as-is; framework items (
InputMessageItem,FunctionCallOutputItem) follow the same shape conventions. - The
typediscriminant on every item matches the Open Responsestypefield exactly.
Content Parts
Content part types used within message and reasoning items.
OutputTextPart
Model-generated text content with optional annotations and logprobs. Type alias for ResponseOutputText from @openrouter/sdk.
type OutputTextPart = ResponseOutputText;
// { type: 'output_text'; text: string; annotations?: ...; logprobs?: ... }RefusalPart
Model refusal content. Type alias for OpenAIResponsesRefusalContent from @openrouter/sdk.
type RefusalPart = OpenAIResponsesRefusalContent;
// { type: 'refusal'; refusal: string }InputTextPart
User/developer input text, created by the framework (not from the SDK).
interface InputTextPart {
readonly type: 'input_text';
readonly text: string;
}ReasoningTextPart
Reasoning trace content within ReasoningItem. Type alias for ReasoningTextContent from @openrouter/sdk.
type ReasoningTextPart = ReasoningTextContent;
// { type: 'reasoning_text'; text: string }SummaryTextPart
Reasoning summary content within ReasoningItem. Type alias for ReasoningSummaryText from @openrouter/sdk.
type SummaryTextPart = ReasoningSummaryText;
// { type: 'summary_text'; text: string }ContentPart
Union of content parts used in message items:
type ContentPart = OutputTextPart | RefusalPart | InputTextPart;| Variant | Fields | Description |
|---|---|---|
output_text | text: string | Text generated by the model |
input_text | text: string | Text provided by the user or system |
refusal | refusal: string | Model refusal message |
Output Items (from the model)
These are type aliases of the @openrouter/sdk types. The SDK provides id, type, and status fields on each item.
MessageItem
Assistant message output item. Type alias for ResponsesOutputMessage.
type MessageItem = ResponsesOutputMessage;| Field | Type | Description |
|---|---|---|
type | 'message' | Discriminant |
role | 'assistant' | Always assistant for output messages |
content | ContentPart[] | Message content segments |
FunctionCallItem
A tool/function invocation requested by the model. Type alias for ResponsesOutputItemFunctionCall.
type FunctionCallItem = ResponsesOutputItemFunctionCall;| Field | Type | Description |
|---|---|---|
type | 'function_call' | Discriminant |
callId | string | Unique call identifier, used to match with the output |
name | string | Function name |
arguments | string | JSON-encoded arguments |
ReasoningItem
Internal reasoning trace emitted by reasoning-capable models. Type alias for ResponsesOutputItemReasoning. Uses ReasoningTextPart and SummaryTextPart content types (not OutputTextPart).
type ReasoningItem = ResponsesOutputItemReasoning;| Field | Type | Description |
|---|---|---|
type | 'reasoning' | Discriminant |
content | ReasoningTextPart[] | Reasoning text content (reasoning_text type) |
summary | SummaryTextPart[] | Summary of the reasoning (summary_text type) |
encryptedContent | string | Optional encrypted reasoning (provider-specific) |
WebSearchItem
Web search call result. Type alias for ResponsesWebSearchCallOutput.
type WebSearchItem = ResponsesWebSearchCallOutput;| Field | Type | Description |
|---|---|---|
type | 'web_search_call' | Discriminant |
id | string | Unique item identifier |
action | Action | The search action: search, open_page, or find_in_page |
status | string | Lifecycle status |
FileSearchItem
File search call result. Type alias for ResponsesOutputItemFileSearchCall.
type FileSearchItem = ResponsesOutputItemFileSearchCall;| Field | Type | Description |
|---|---|---|
type | 'file_search_call' | Discriminant |
id | string | Unique item identifier |
queries | string[] | Search queries |
status | string | Lifecycle status |
ImageGenerationItem
Image generation call result. Type alias for ResponsesImageGenerationCall.
type ImageGenerationItem = ResponsesImageGenerationCall;| Field | Type | Description |
|---|---|---|
type | 'image_generation_call' | Discriminant |
id | string | Unique item identifier |
result | string | null | Generated image data |
status | string | Lifecycle status |
ServerToolItem
Server tool output with a vendor-prefixed type (e.g., openrouter:datetime). Based on ResponsesServerToolOutput with the type field constrained to ${string}:${string} for discriminant narrowing.
type ServerToolItem = Omit<ResponsesServerToolOutput, 'type'> & {
readonly type: `${string}:${string}`;
};| Field | Type | Description |
|---|---|---|
type | `${string}:${string}` | Namespaced type. The prefix identifies the vendor or domain, the name identifies the item kind. |
The prefix identifies the vendor or domain (e.g., openrouter, noetic, myapp) and the name identifies the specific item kind. None of the standard item types contain a colon, so the presence of : in the type string cleanly distinguishes server tool outputs from standard items.
OutputItem Union
All output item types from the model:
type OutputItem =
| MessageItem
| FunctionCallItem
| ReasoningItem
| WebSearchItem
| FileSearchItem
| ImageGenerationItem
| ServerToolItem;Framework Items (created by Noetic)
These item types are Noetic-owned interfaces for items created by the framework, not the model.
InputMessageItem
Input message created by the framework for user, system, or developer roles.
interface InputMessageItem {
readonly id: string;
readonly type: 'message';
readonly role: 'user' | 'system' | 'developer';
readonly status: 'in_progress' | 'completed' | 'incomplete' | 'failed';
readonly content: InputTextPart[];
}| Field | Type | Description |
|---|---|---|
type | 'message' | Discriminant |
role | 'user' | 'system' | 'developer' | Message author. developer is used for framework-injected context (e.g., from memory layers), distinct from system (agent instructions). |
content | InputTextPart[] | Input text content segments |
status | string | Lifecycle status. Includes failed as a Noetic extension beyond the Open Responses spec. |
FunctionCallOutputItem
Tool execution output created by the harness during the tool loop. This is an input-only item type in Open Responses (sent by the developer, not the model).
interface FunctionCallOutputItem {
readonly id: string;
readonly type: 'function_call_output';
readonly status: 'in_progress' | 'completed' | 'incomplete' | 'failed';
readonly callId: string;
readonly output: string;
}| Field | Type | Description |
|---|---|---|
type | 'function_call_output' | Discriminant |
callId | string | Matches the callId from the corresponding FunctionCallItem |
output | string | JSON-encoded tool output |
status | string | Lifecycle status. Includes failed as a Noetic extension. |
Item Union
All item types that can appear in an ItemLog:
type Item = OutputItem | InputMessageItem | FunctionCallOutputItem;Streaming Events
When using the OpenResponses streaming API, the server emits a sequence of typed events. Each event has a type field using a dot-separated hierarchy and a sequenceNumber for ordering.
Response Lifecycle (Standard)
These events bracket the entire response.
| Event | Description | Key Payload |
|---|---|---|
response.created | Response object initialized | response |
response.in_progress | Generation has started | response |
response.completed | Successful completion | response |
response.incomplete | Truncated (e.g., max tokens) | response |
response.failed | Error occurred | response |
Output Items (Standard)
Emitted as output items are added and completed.
| Event | Description | Key Payload |
|---|---|---|
response.output_item.added | New output item started | item, outputIndex |
response.output_item.done | Output item complete | item, outputIndex |
Content Parts (Standard)
Emitted as content parts within an output item are added and completed.
| Event | Description | Key Payload |
|---|---|---|
response.content_part.added | New content part started | part, outputIndex, contentIndex |
response.content_part.done | Content part complete | part, outputIndex, contentIndex |
Text Streaming (Standard)
Delta events for streaming text output.
| Event | Description | Key Payload |
|---|---|---|
response.output_text.delta | Text chunk received | delta, logprobs |
response.output_text.done | Text generation complete | text, logprobs |
response.output_text.annotation.added | Annotation added to text | annotation |
Refusal (Standard)
Delta events when the model refuses a request.
| Event | Description | Key Payload |
|---|---|---|
response.refusal.delta | Refusal chunk | delta |
response.refusal.done | Refusal complete | refusal |
Function Call Arguments (Standard)
Delta events for streaming function call arguments.
| Event | Description | Key Payload |
|---|---|---|
response.function_call_arguments.delta | Argument chunk | delta, name |
response.function_call_arguments.done | Arguments complete | arguments, name |
Reasoning (Standard)
Delta events for reasoning model output (e.g., o1, o3).
| Event | Description | Key Payload |
|---|---|---|
response.reasoning.delta | Reasoning chunk | delta |
response.reasoning.done | Reasoning complete | text |
response.reasoning_summary_part.added | Summary part started | part |
response.reasoning_summary_part.done | Summary part complete | part |
response.reasoning_summary_text.delta | Summary text chunk | delta |
response.reasoning_summary_text.done | Summary text complete | text |
Web Search Events (Built-in Extension)
Emitted when the model uses the built-in web search capability. These are officially part of the OpenResponses specification.
| Event | Description |
|---|---|
response.web_search_call.in_progress | Search started |
response.web_search_call.searching | Actively searching |
response.web_search_call.completed | Search results ready |
Image Generation Events (Built-in Extension)
Emitted when the model uses the built-in image generation capability. These are officially part of the OpenResponses specification.
| Event | Description |
|---|---|
response.image_gen_call.in_progress | Generation started |
response.image_gen_call.generating | Actively generating |
response.image_gen_call.partial_image | Partial result available |
response.image_gen_call.completed | Image ready |
How Items Flow in Noetic
Noetic's adapter layer bridges the framework's Item types and the OpenResponses wire format. Here is the lifecycle of items through a single LLM call:
┌─────────────────────────────────────────────────┐
│ ItemLog │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ message │ │ fn_call │ │ fn_call_output │ │
│ │ (user) │ │ │ │ │ │
│ └──────────┘ └──────────┘ └──────────────────┘ │
└────────────────────┬────────────────────────────┘
│
extractSystemInstruction()
itemsToInput()
│
▼
┌───────────────────────┐
│ OpenRouter SDK │
│ callModel() │
└───────────┬───────────┘
│
responseToNoeticItems()
extractUsage()
│
▼
┌─────────────────────────────────────────────────┐
│ ItemLog (updated) │
│ ... + ┌──────────┐ ┌──────────────────┐ │
│ │ message │ │ function_call │ │
│ │ (asst) │ │ (if tools used) │ │
│ └──────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────┘- Items in → SDK input:
extractSystemInstruction()pulls system messages out as theinstructionsparameter.itemsToInput()converts remaining Noetic Items into the OpenResponses input format. - SDK calls model: The OpenRouter SDK sends the request and handles the response.
- SDK response → Items out:
responseToNoeticItems()converts output items back to Noetic Items.extractUsage()pulls token counts and cost. - Items appended: New items are appended to the
ItemLog. The Projector reads the full ItemLog when assembling the View for the next LLM call.
Server tool items and reasoning items are skipped during input conversion (they are internal metadata). The adapter converts all output item types (message, function_call, reasoning, web_search_call, file_search_call, image_generation_call, and server tool outputs) into their corresponding Noetic Item variants.
Framework Events
In addition to OpenResponses streaming events, Noetic emits framework-level events during execution. These events use the harness config.name as a prefix and have source: 'framework'.
| Event | Description | Key Payload |
|---|---|---|
{name}:step_started | Before each step executes | stepId, kind |
{name}:step_completed | After each step completes | stepId, kind |
{name}:tool_round_started | Before a tool execution round | round, toolCount |
{name}:tool_call_started | Before each tool call | name, callId |
{name}:tool_call_completed | After each tool call | name, callId, error |
{name}:tool_round_completed | After all tool calls in a round | round, toolCount |
Framework events are available through harness.execute(input).getFullStream() alongside SDK events. They can be distinguished by the source field:
for await (const event of harness.execute('Hello').getFullStream()) {
if (event.source === 'sdk') {
// OpenResponses SSE event
}
if (event.source === 'framework') {
// Noetic lifecycle event, e.g. 'myagent:step_started'
}
}Related Pages
- Context & Event Log -- the
ItemLoginterface and usage. - Context Types -- type definitions for all item variants.
- Adapter Types -- the OpenRouter adapter and
LlmProviderConfig. - AgentHarness -- how the harness orchestrates the item flow.