The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →For most conversational Microsoft Foundry hosted agents, start with Responses: it uses an OpenAI-compatible request contract and provides platform-managed conversation history and streaming behavior. Choose Invocations when a caller needs a custom JSON contract, the work is not conversational, or your handler must control the payloads directly. A hosted agent can expose both protocols, so the choice does not have to lock out future integrations.
What the protocol choice controls
Responses and Invocations are endpoint contracts between Foundry and the hosted-agent container. They determine how callers send requests and receive results, and how conversation state and streaming are handled. They do not, by themselves, dictate which agent framework you use: Microsoft documents hosting integrations for its Agent Framework as well as adapters that can work with LangGraph and custom code. Microsoft’s hosted-agent overview and adapter guidance describe these choices.
As an Amazon Associate I earn from qualifying purchases.
How the two protocols differ
| Decision point | Responses | Invocations |
|---|---|---|
| Best fit | Conversational assistants, including multi-turn Q&A, RAG, and tool use | Webhooks, structured extraction or classification, batch work, and custom protocol bridges |
| Request contract | OpenAI-compatible Responses API shape | Arbitrary JSON defined by the handler |
| Container endpoint | POST /responses |
POST /invocations |
| Response format | JSON or server-sent events (SSE) | JSON or optional SSE, as implemented by the handler |
| Conversation history | Managed through the Responses adapter/platform flow | Not managed as conversation history by the platform; the application owns any needed state |
| Streaming | Uses the managed Responses event lifecycle | The handler controls any custom SSE format |
| Typical client | An OpenAI-compatible SDK can call the endpoint | A caller built to the agent’s custom contract |
These distinctions are documented in Microsoft’s hosted-agent protocol comparison and runtime contract.
Recommended Free Tools
Choose based on the caller and workload
Choose Responses for conversational integrations
Responses is the natural starting point when a client already sends the Responses API request shape, or when the agent needs multi-turn conversations, tool use, and platform-managed history and streaming. Microsoft identifies it as the default starting point for most conversational hosted agents. It reduces the amount of conversation lifecycle plumbing the handler has to own.
#1 Best Overall
- API Design Patterns
- ABIS BOOK
- Manning Publications
Choose Invocations for custom or non-chat requests
Invocations fits a webhook or existing service that sends its own JSON schema, especially when changing that caller to the Responses shape is impractical. It also suits structured or batch tasks such as extraction and classification. The handler defines the request and response behavior; if the operation needs continuity between calls, the application must manage that state itself.
Use both when callers have different needs
A hosted agent can support Responses and Invocations simultaneously. For example, a conversational client can use Responses while an internal webhook uses Invocations. Adding a second protocol lets the integration surface evolve without requiring a different agent core solely to serve another kind of caller. Microsoft’s hosted-agent guidance documents multi-protocol support.
Rank #2
How state and streaming differ in practice
Responses delegates history hydration and the streaming event lifecycle to its adapter/platform contract. This is useful when the application is a conversation and the caller expects a familiar Responses-style interaction.
Invocations does not turn a session identifier into platform-managed conversation history. In Microsoft Agent Framework’s example, the caller reuses the agent_session_id returned in a response header as a query parameter on a later request. That routes the request to the session; application logic remains responsible for any conversational state it needs. The handler can also implement SSE, but it controls the event format rather than relying on the managed Responses lifecycle. The Agent Framework hosting guide shows that session-routing example.
Rank #3
The same guide demonstrates continuing a Responses turn with previous_response_id. For hosted deployments where later turns also need the same hosted sandbox filesystem, it describes using an agent_session_id or a conversation ID. These are framework-specific examples; convenience APIs and session behavior should not be assumed identical across every adapter.
What the container must implement
A hosted-agent container must implement at least one protocol endpoint. Microsoft’s runtime contract specifies that it listens on port 8088, serves GET /readiness with 200 OK, consumes platform-provided environment variables, and shuts down gracefully on SIGTERM. The official protocol adapters handle contract plumbing such as HTTP setup, health checks, protocol parsing and formatting, Responses history hydration, SSE infrastructure, OpenTelemetry instrumentation, environment-variable consumption, and graceful shutdown. The agent author supplies the handler logic. See the hosted-agent runtime contract.
Microsoft’s runtime reference names these adapter packages:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →- Python:
azure-ai-agentserver-responsesandazure-ai-agentserver-invocations - .NET:
Azure.AI.AgentServer.ResponsesandAzure.AI.AgentServer.Invocations
Package versions and compatibility can change. Check the current adapter documentation before selecting versions or relying on SDK examples.
Quick Recap
Best Value
A practical decision checklist
- Inspect the caller’s contract. If it already speaks the OpenAI-compatible Responses shape, use Responses. If it emits a fixed custom schema, consider Invocations.
- Classify the work. Multi-turn chat, tools, and history point to Responses; discrete extraction, classification, batch jobs, or webhook handling point to Invocations.
- Assign ownership deliberately. Use Responses when the managed history and event lifecycle are useful. Use Invocations when your handler should define payloads and any application-owned state or SSE formatting.
- Keep the integration adaptable. If different callers need different contracts, expose both protocols rather than forcing every caller through one shape.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




