Files
9e3983e547 ยท 2026-04-15 11:33:15 -07:00
History
..
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00
2026-04-15 11:33:15 -07:00

Basic example of hosting an agent with the responses API

This agent only contains an instruction (personal). It's the most basic agent with an LLM and no tools.

Interacting with the agent

Send a POST request to the server with a JSON body containing a "message" field to interact with the agent. For example:

curl -X POST http://localhost:8088/responses -H "Content-Type: application/json" -d '{"input": "Hi"}'

Invoke with azd

azd ai agent invoke --local "Hi"

Multi-turn conversation

To have a multi-turn conversation with the agent, include the previous response id in the request body. For example:

curl -X POST http://localhost:8088/responses -H "Content-Type: application/json" -d '{"input": "How are you?", "previous_response_id": "REPLACE_WITH_PREVIOUS_RESPONSE_ID"}'

Invoke with azd:

azd ai agent invoke --local "Hi!" --conversation-id "my_conv"

azd ai agent invoke --local "How are you?" --conversation-id "my_conv"