mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-04 10:52:17 +02:00
docs: restructure & add mintilify pages for tool
This commit is contained in:
parent
7532c75661
commit
793dee182d
8 changed files with 121 additions and 25 deletions
57
docs/voice-agent/tools/call-transfer.mdx
Normal file
57
docs/voice-agent/tools/call-transfer.mdx
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
title: "Call Transfer"
|
||||
description: "Enable your AI agent to transfer calls to phone numbers or SIP endpoints with built-in call transfer functionality."
|
||||
---
|
||||
|
||||
The Call Transfer tool enables your AI agent to transfer active calls to phone numbers or SIP endpoints. When configured, your agent can seamlessly transfer callers to human operators, departments, or other systems while maintaining a professional experience.
|
||||
|
||||
## Supported Providers
|
||||
|
||||
Call transfer is available for telephony calls using Twilio or Asterisk ARI providers. Web calls do not support transfer functionality.
|
||||
|
||||
## How It Works
|
||||
|
||||
The Call Transfer tool performs **blind transfers** where no call context is shared with the destination. Here's what happens:
|
||||
|
||||
1. **Agent Decision**: Your AI agent determines a transfer is needed and calls the transfer function
|
||||
2. **Pre-transfer Message**: (Optional) Agent plays a custom message like "Let me transfer you to our sales team"
|
||||
3. **Hold Experience**: Caller hears hold music while the transfer is processed
|
||||
4. **Connection**: Once the destination answers, the caller is connected directly
|
||||
5. **Agent Handoff**: The AI agent ends its involvement in the call
|
||||
|
||||
## Configuration
|
||||
|
||||
### Basic Settings
|
||||
|
||||
- **Destination**: Phone number or SIP endpoint (see formats below)
|
||||
- **Timeout**: How long to wait for destination to answer (default 30 seconds)
|
||||
- **Pre-transfer Message**: Optional custom message played before transfer
|
||||
|
||||
### Destination Formats
|
||||
|
||||
**For Twilio:**
|
||||
- **Phone numbers**: E.164 format: `+1234567890`
|
||||
- Must be a valid reachable phone number
|
||||
|
||||
**For Asterisk ARI:**
|
||||
- **SIP endpoints only**: `PJSIP/extension` or `SIP/endpoint`
|
||||
- **Examples**: `PJSIP/sales-queue`, `SIP/1001`, `PJSIP/conference-room`
|
||||
|
||||
<Warning>
|
||||
Asterisk ARI transfers only work with SIP endpoints configured on your Asterisk server. External phone numbers require additional PSTN trunk configuration.
|
||||
</Warning>
|
||||
|
||||
## Setup Requirements
|
||||
|
||||
1. **Organization Setup**: Ensure your organization has a supported telephony provider configured
|
||||
2. **Tool Enablement**: Add the Call Transfer tool to your agent's available tools
|
||||
3. **Destination Validation**:
|
||||
- **Twilio**: Verify phone numbers are reachable
|
||||
- **ARI**: Verify SIP endpoints exist on your Asterisk server
|
||||
4. **Testing**: Test transfers in your specific provider environment
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **Destination not reachable**: Verify destination number/endpoint is valid and reachable
|
||||
- **Tool not available**: Check that Call Transfer tool is added to the correct agent node
|
||||
- **Transfer failures**: Handle transfer failure scenarios within your agent prompts
|
||||
37
docs/voice-agent/tools/end-call.mdx
Normal file
37
docs/voice-agent/tools/end-call.mdx
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: "End Call"
|
||||
description: "Allow your AI agent to terminate calls when conversations reach a natural conclusion or specific conditions are met."
|
||||
---
|
||||
|
||||
The End Call tool enables your AI agent to terminate calls programmatically when conversations reach a natural conclusion, specific conditions are met, or when instructed by the caller.
|
||||
|
||||
## How It Works
|
||||
|
||||
The End Call tool provides a clean way to terminate conversations:
|
||||
|
||||
1. **Agent Decision**: Your AI agent determines the call should end based on conversation context
|
||||
2. **Optional Message**: Agent can provide a closing message before ending the call
|
||||
3. **Clean Termination**: Call is terminated gracefully through the telephony provider
|
||||
4. **Call Disposition**: Call disposition is updated in the system
|
||||
|
||||
## Configuration
|
||||
|
||||
### Basic Settings
|
||||
|
||||
- **End Message**: Optional closing message played before termination
|
||||
- **Reason**: Optional reason code for call termination tracking
|
||||
|
||||
## Agent Usage
|
||||
|
||||
Your AI agent can end calls during conversations:
|
||||
|
||||
```
|
||||
end_call(message="Thank you for calling. Have a great day!", reason="conversation_complete")
|
||||
```
|
||||
|
||||
Common scenarios:
|
||||
- Conversation has reached natural conclusion
|
||||
- User explicitly requests to end the call
|
||||
- Agent has completed all requested tasks
|
||||
- Call timeout or error conditions
|
||||
|
||||
158
docs/voice-agent/tools/http-api.mdx
Normal file
158
docs/voice-agent/tools/http-api.mdx
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
---
|
||||
title: "HTTP API"
|
||||
description: "Create REST API tools that your AI agent can invoke during conversations to integrate with external systems."
|
||||
---
|
||||
|
||||
HTTP API tools allow you to attach extrernal REST API calls directly to workflow nodes, enabling your voice agents to call any internal or external system during live conversations based on LLM judgment and your prompts. This works similar to function calling on any agentic platform and is 100% open source and fully customizable.
|
||||
|
||||
## Video Tutorial
|
||||
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube.com/embed/er-YTX5Eocs?si=5tw9rWfaWp2DOSIv"
|
||||
title="YouTube video player"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
referrerPolicy="strict-origin-when-cross-origin"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
## What is an HTTP API Tool?
|
||||
|
||||
An HTTP API Tool is a REST API definition that the LLM can invoke at runtime.
|
||||
|
||||
**Typical use cases:**
|
||||
- Call your own backend endpoints
|
||||
- Trigger n8n automations
|
||||
- Sync data with a CRM
|
||||
- Fetch data from external APIs (weather, pricing, availability, etc.)
|
||||
- Write/update/read data using Rest API
|
||||
|
||||
**The LLM decides:**
|
||||
- which tool to call
|
||||
- when to call it
|
||||
- what parameters to send
|
||||
|
||||
**All based on:**
|
||||
- Your prompts: node-level instructions in simple english (or any language)
|
||||
- Tool name
|
||||
- Tool description
|
||||
- Parameter definitions
|
||||
|
||||
<br/>
|
||||
<div style={{ borderBottom: '2px solid #e5e5e5', margin: '20px 0' }}></div>
|
||||
|
||||
## Defining an HTTP API Tool
|
||||
|
||||
### 1. Tool Name
|
||||
|
||||
- Must be clear and action-oriented.
|
||||
|
||||
- **Examples:** `capture_lead_interest`, `fetch_weather`, 'create_crm_contact', etc
|
||||
|
||||
### 2. Tool Description
|
||||
|
||||
|
||||
- Extremely important
|
||||
- This is how the LLM decides **when** to use the tool.
|
||||
- Write it in plain, explicit English.
|
||||
|
||||
**Bad:**
|
||||
"API to capture data"
|
||||
|
||||
**Good:**
|
||||
"This tool is to capture interest. Use this tool when the user clearly expresses interest in the product or wants to be contacted"
|
||||
|
||||

|
||||
|
||||
### 3. Endpoint Configuration
|
||||
|
||||
- Full URL (**must include `http://` or `https://`**)
|
||||
- Supports **REST** methods
|
||||
|
||||
<Note>Common mistake: forgetting https:// in the URL.</Note>
|
||||
|
||||
<br/>
|
||||
<div style={{ borderBottom: '2px solid #e5e5e5', margin: '20px 0' }}></div>
|
||||
|
||||
### 4. Authentication & Headers
|
||||
|
||||
- Add custom authentication
|
||||
- Add custom headers
|
||||
- Works with internal services and third-party APIs
|
||||
|
||||
<br/>
|
||||
<div style={{ borderBottom: '2px solid #e5e5e5', margin: '20px 0' }}></div>
|
||||
|
||||
### 5. Parameters
|
||||
|
||||
Each parameter must have:
|
||||
- Name
|
||||
- Type
|
||||
- Description
|
||||
- Required/Optional flag
|
||||
|
||||
**Parameter descriptions matter more than types.**
|
||||
|
||||
Guidelines:
|
||||
- Start with string parameters when possible
|
||||
- Be explicit in what the value represents
|
||||
- Mark only truly mandatory fields as required
|
||||
|
||||
Example:
|
||||
- interest (string):
|
||||
"Set to true if the user clearly shows intent to buy or wants follow-up. Otherwise false."
|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
<div style={{ borderBottom: '2px solid #e5e5e5', margin: '20px 0' }}></div>
|
||||
|
||||
## Attaching Tools to Workflow Nodes
|
||||
|
||||
- You can attach **multiple tools to a single node**
|
||||
- All the tools that you have created will be available for selection in the node
|
||||
- Tools are only callable when attached to that node
|
||||
- The LLM will choose which one to call
|
||||
|
||||
Inside the node, guide the LLM using **simple English instructions**.
|
||||
|
||||
Example:
|
||||
|
||||
"If the user shows interest in speaking to sales or wants a callback, immediately call the capture_lead_interest tool and set interest to true."
|
||||
This instruction is often the deciding factor for correct tool usage.
|
||||
|
||||
This instruction is often the **deciding factor** for correct tool usage.
|
||||
|
||||

|
||||
<br/>
|
||||
<div style={{ borderBottom: '2px solid #e5e5e5', margin: '20px 0' }}></div>
|
||||
|
||||
## Tool Invocation Logic (How the LLM Thinks)
|
||||
|
||||
The LLM considers:
|
||||
- User's spoken intent
|
||||
- Node prompt instructions
|
||||
- Tool name and description
|
||||
- Parameter descriptions
|
||||
|
||||
If these align clearly, the tool is called automatically.
|
||||
|
||||
Poor naming or vague descriptions lead to:
|
||||
- Missed tool calls
|
||||
- Wrong parameters
|
||||
- Hallucinated values
|
||||
|
||||
<br/>
|
||||
<div style={{ borderBottom: '2px solid #e5e5e5', margin: '20px 0' }}></div>
|
||||
|
||||
## Key Best Practices
|
||||
- Name tools clearly
|
||||
- Write detailed, action-based descriptions
|
||||
- Keep parameters simple at first
|
||||
- Always include http/https in URLs
|
||||
- Use plain English in node instructions
|
||||
- Attach only relevant tools to each node
|
||||
|
||||
**Well-defined tools + clear prompts = reliable, production-grade voice agents.**
|
||||
Loading…
Add table
Add a link
Reference in a new issue