openai-agents SDK
Your outer agent runs on OpenAI (or any Responses-compatible backend); the tool body calls Mirobody:LangChain
Tips
- Thread the Subject id. The
userparam is the isolation key — if your framework supports per-call context injection, take it from your own auth context rather than letting the model free-type it. - Return evidence too. If your outer agent should show sources, include the response’s
health_records/citationsextensions in the tool’s return value (serialize them alongsidecontent). - Timeouts. A grounded answer runs a real agent turn (seconds, not milliseconds) — give the tool call a generous timeout and stream your outer agent’s narration meanwhile.
- Cost control.
mirobody-flashis the right default inside a tool; reservemirobody-expertfor deep report interpretation. See Models.
See also
- Answers API (Chat Completions) — the endpoint being wrapped.
- SDK Examples — the same call in curl, Python and Node.
- Choose Your API — when to reach for the Agent API instead.