microsoft / microsoft/agent-framework

.NET: [Feature]: OpenAI Hosting Responses API fully compatible

Open
#3,971 0 comments 0 reactions 1 assignee View on GitHub

@ReubenBond is already working on this.

Since Feb 17, 2026.

.NET hosting
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

### Description

Currently, we cannot use the hosting with OpenAI Responses in stateful mode where the server hosting the agent keeps track of the conversation (with an AgentSession or something else).
There is an in-memory conversation storage that is write-only. The content of the conversation is not added if we use the same conversationId. (Please correct me if I'm wrong)

However, if we want to use the responses api in a stateless mode, where we send the complete history each time. We must keep track of the `function_call`, `function_call_output`, and `reasoning` items.
We can have these events in the client to construct the chat history.

Currently, [InputMessage](https://github.com/microsoft/agent-framework/blob/1e350ea22febed59fba9bbe6c5111815a12c1233/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Responses/Models/InputMessage.cs) doesn't accept items that don't contain `role` or `content` properties, or with a type other than "message" ([source](https://github.com/microsoft/agent-framework/blob/1e350ea22febed59fba9bbe6c5111815a12c1233/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Responses/Models/InputMessage.cs#L30-L34)).

A workaround is to not include these items, but it reduces the agent's efficiency. For each follow-up question on the same topic, the agent needs to do another tool call because it lost the previous one.

If we can create an InputMessage with a valid Output, we could have a fully stateless implementation of the Responses API.

This issue may be related: #3967, because if we lose the `function_call` and `function_call_output` in the response, it will be impossible to have a stateless mode. But it might be fine if we can use the responses api in a stateful mode.

### Code Sample

```markdown

```

### Language/SDK

.NET

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.