Example Flow
Custom webhook deployments accept the request and process it asynchronously. If the orchestrator needs the result, have the Duckie agent call a fixed callback API with a correlation ID rather than expecting the webhook response to include the final answer.When to Use This Pattern
Use Duckie as an external subagent when:- You already have a primary orchestration agent outside Duckie.
- Duckie should own a narrow support capability, not the whole customer journey.
- The task benefits from Duckie knowledge search, runbooks, guidelines, guardrails, or support tools.
- Your orchestrator can continue after receiving an async callback from Duckie.
- Search internal support docs and return a sourced answer.
- Classify a customer request into your support taxonomy.
- Summarize a ticket, conversation, or account record.
- Draft a customer-facing response for the orchestrator to review or send.
- Check policy eligibility and return a recommendation.
What to Build
| Component | Purpose |
|---|---|
| Customer-owned orchestration agent | Owns the parent workflow and decides when Duckie should be called. |
| Custom webhook deployment | Receives the task payload and starts the Duckie agent. |
| Focused Duckie agent | Performs one narrow task, such as search or classification. |
| Custom callback tool | Sends the final result back to your orchestrator API. |
| Correlation ID | Connects the Duckie result to the parent orchestration task. |
Request Shape
Send the task to a Duckie custom webhook as JSON.| Duckie field | Example mapping |
|---|---|
| Event ID | $.event.id |
| Ticket ID | $.task.id |
| Ticket Title | Duckie subagent task {{task.id}} |
| Message Body | {{task.question}} |
| Run Metadata | task_id: $.task.id, task_type: $.task.type, customer_id: $.context.customer_id, plan: $.context.plan, region: $.context.region |
Agent Setup
Create an autonomous agent with a narrow name and description, such as External Knowledge Search Agent. Example instructions:Callback Tool
Create a custom tool that posts the result back to your orchestrator API.| Parameter | Source |
|---|---|
correlation_id | Fixed value from {{context.task_id}} or another run metadata field |
status | AI-generated enum-style string, such as complete, needs_review, or failed |
answer | AI-generated result text |
sources | AI-generated array of source references |
confidence | AI-generated string, such as high, medium, or low |
notes | AI-generated caveats or missing information |
Result Shape
The callback response to your orchestrator can look like this:Testing
- Create the webhook deployment in Testing mode.
- Send a representative task payload with a correlation ID.
- Open Analyze > Runs and verify the message, metadata, searched knowledge, and tool calls.
- Confirm your callback API receives one result for the task.
- Test missing context, low-confidence answers, and callback failures before switching the deployment to Live.
Related Docs
Custom Webhooks
Trigger Duckie from your orchestration system.
Custom Tools
Send the subagent result back to your API.
Autonomous Agents
Configure the focused Duckie agent.
Run History
Review the Duckie run, tool calls, and callback result.