OpenAI — Responses API
Plug in an OpenAI API key and Chamade runs your agent on the Responses + Conversations API — native server-side memory, no infra to host. Bring a model + a system prompt, or reference a published stored prompt.
What it is
An agent provider is the AI runtime that powers your agent. With OpenAI, Chamade calls api.openai.com/v1/responses on each event and delivers the reply. Conversation memory is kept natively by OpenAI's Conversations API (a conv_xxx per conversation), so follow-up turns keep context with no work on your side.
The same transport powers Microsoft Foundry and Azure OpenAI — only the endpoint shape differs. For Azure OpenAI, use the Custom (Responses) preset.
Setup
- Get an API key from platform.openai.com/api-keys — a project key (
sk-proj-…) is recommended for least-privilege scoping. - In your dashboard → an agent → pick the OpenAI preset.
- Endpoint is pre-filled (
https://api.openai.com/v1/responses) — leave it. Paste your API key, choose a model (gpt-4o-mini,gpt-5-mini,gpt-5, …). - The system prompt is pre-filled with Chamade's XML-action convention (edit freely). Create — a tiny probe validates the key.
Acting & reading
By default the model just replies. Chamade ships the output convention in the system prompt, so the model can act by emitting inline tags Chamade executes:
<write>— reply in the current DM/call ·<say>— speak (TTS) in a call ·<file>— attach ·<accept/>/<refuse/>/<leave/>.- Cross-target:
<dm platform="discord" to="…" account_id="discord:…">text</dm>. Each event carries an[agent context]line with your account ids, so no lookup is needed.
To let the agent read Chamade state mid-reasoning (transcripts, history, fresh state), Chamade auto-injects its hosted MCP (https://mcp.chamade.io/mcp/) into the request with a scoped bearer — nothing to wire. Rule of thumb: read with MCP, act with the XML tags (never both, or actions fire twice).
Pick an existing agent — stored prompts
Instead of typing a model + system prompt, you can reference a published OpenAI prompt (built in the OpenAI dashboard → Prompts, id pmpt_…, versioned — it carries model + instructions + tools). It's OpenAI's equivalent of a hosted agent: the persona lives in your OpenAI account, Chamade just folds in its action convention.
- In the form, open Stored prompt (OpenAI) → paste the
pmpt_…id; optionally pin a version (blank = production). - Chamade then sends
prompt: {id, version}and nomodel/ noinstructions(a request-level instruction would override the prompt's persona) — the convention rides ininputonly. - OpenAI platform only (not Azure). AgentKit workflows (
wf_…) are a different runtime and can't be driven server-side yet.
Memory & context
First turn of a conversation mints a conv_xxx via the Conversations API; follow-up turns reference it, so the model keeps full context server-side (first turn ~2–3s, later turns <1s). On a custom Responses-compatible host that lacks /v1/conversations, Chamade silently falls back to previous_response_id chaining.
Good to know
- The agent needs ≥1 platform account attached in Chamade, or its tools/actions reach nothing.
- Billing is standard OpenAI per-token; the conversation chain expands to full context billed as input tokens (server-side state doesn't change billing).
- Use a project key (
sk-proj-…) so you can scope and rotate it independently. - Azure OpenAI deployments → configure via the Custom (Responses) preset (same transport, different URL + headers).
