Skip to main content
The Answers API is a closed grounded completion — question in, evidence-backed answer out, no knobs. That shape is exactly what an outer agent wants in a tool: your agent (running on any model, any framework) keeps orchestration and delegates “what do this user’s real health records say?” to Mirobody. When to prefer this over the Agent API: you already have an agent and need grounded health answers as one capability inside it. When you want Mirobody to be the agent (and call your tools), use the Agent API instead.

openai-agents SDK

Your outer agent runs on OpenAI (or any Responses-compatible backend); the tool body calls Mirobody:
The outer model decides when health data is needed; Mirobody’s agent does the record search, trend math, and evidence citation inside a single tool call.

LangChain

Tips

  • Thread the Subject id. The user param 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 / citations extensions in the tool’s return value (serialize them alongside content).
  • 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-flash is the right default inside a tool; reserve mirobody-expert for deep report interpretation. See Models.

See also