Use this recipe when one agent workflow should:Documentation Index
Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt
Use this file to discover all available pages before exploring further.
- run through the TypeScript Agent SDK
- rely on managed web search
- return strict structured JSON
- recover near-valid malformed JSON deterministically
1. Install the SDKs
2. Define one narrow output contract
Keep the first research output small enough that operators can inspect it easily in logs.3. Create the agent
UseparseOutput so the runtime returns typed data instead of raw text.
4. Configure the gateway-backed adapter once
This is the important part:responseFormatkeeps the output schema explicitpluginsenables response healing for near-valid JSONgatewayToolsexposes managed web search to the modeltoolChoiceforces the search tool when this workflow should always ground itself
5. Run the workflow
6. What to verify in logs
After one successful run, inspect the request detail view and confirm:requested native web search toolsor managed search activity is present- search results and citations were persisted
- plugin execution shows
response-healingonly when recovery was needed - the final output matches the JSON schema you asked for
7. When to use this pattern
Use this recipe when:- the workflow is mostly one-shot research, not a deep local-tool loop
- the model should ground itself before answering
- downstream callers want typed JSON instead of prose
- the workflow already knows the exact URLs and
gateway:web_fetchis enough - the agent needs rich local tools more than upstream-native tools
- the output contract is loose enough that strict JSON adds more overhead than value