- inherit routing and prompt defaults from a dashboard preset
- return strict structured output
- pause risky cases for human review
- keep gateway failures visible in logs instead of hiding them inside agent code
1. Start with a preset
Create a preset such assupport-triage that owns:
- the default routed model or router target
- provider preferences
- the support-system prompt
- stable decoding parameters
2. Define a narrow triage contract
3. Create the preset-driven agent
preset: "support-triage" to the gateway alias form @support-triage.
4. Configure the gateway-backed adapter
Use adapter defaults for the parts that should stay fixed across every triage run:5. Run the workflow with bounded retries
6. Treat gateway failures as operational events
Do not hide failures by swallowing them inside the agent callback chain. Instead, catchAgentGatewayError explicitly:
- let the runtime persist
failedrun and step state - inspect
loaded.run.errorDetailsorloaded.steps[n].errorDetailson later recovery paths when the original exception is no longer in memory - inspect the request details for:
- guardrail enforcement
- routing details
- plugin execution
- request ids and provider data
- a guardrail blocks the request
- the preset allowlist rejects the requested model
- provider credentials or enablement filters remove the routed candidate set
- response healing fails to recover schema-valid JSON
7. What to verify
After one successful run and one intentionally risky run, confirm:- the request detail view shows the preset-driven request target
- high-risk cases pause in
waiting_for_human - retrying model steps persist
modelAttempts - guardrail or preset failures remain visible in request details, not hidden inside agent exceptions