> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agentplatform-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Inbuilt tool - transfer_to_agent

<Badge icon="arrow-left" color="gray">[Back to Inbuilt tools](/agent-platform/inbuilt-tools/index#available-tools)</Badge>

The `transfer_to_agent` tool transfers the conversation to a human agent through an agent desktop provider, such as Kore SmartAssist.

## When to use

Use `transfer_to_agent` when the user asks to speak with a human, or when the issue cannot be resolved by the AI agent and you want the conversation handed to a contact-center agent with the conversation context.

To move a voice call to a SIP or PSTN number without involving an agent desktop, use [call\_transfer](/agent-platform/inbuilt-tools/call-transfer). To create a tracked human task with SLA and queueing, use `ESCALATE`.

## Declare the tool

```yaml theme={null}
TOOLS:
  transfer_to_agent(
      provider: string,
      skills?: string[],
      queueId?: string,
      priority?: number,
      postAgentAction?: string
  ) -> object
```

Declare only the fields you use.

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `provider` | Yes | The agent desktop provider to transfer to. |
| `skills` | No | Agent skills required for routing. Up to 50. |
| `queueId` | No | Target queue ID. |
| `priority` | No | Priority from 0 to 10. |
| `subType` | No | SmartAssist conversation subtype for contact-center routing. |
| `namedAgents` | No | Specific agent IDs to route to. Up to 50. |
| `namedAgentOptions` | No | Named-agent routing options: `waitForAgent` (boolean) and `waitDurationSeconds` (0–86400). |
| `agentMatchingConditions` | No | Matching conditions: `skills`, `skillGroups`, and `agentGroups` (each up to 50). |
| `metadata` | No | Additional metadata to pass to the provider. Must not exceed 16 KB. |
| `postAgentAction` | No | What happens when the human agent disconnects: `return` (back to the AI agent) or `end`. |
| `providerConfig` | No | Provider-specific configuration overrides. |

## Voice channels

On voice, the transfer works only on gateways that can move the caller's call leg: Kore Voice Gateway, Genesys SAVG, and AudioCodes. On other voice surfaces, such as Twilio, LiveKit, VXML, and Genesys Audio Connector, the tool fails instead of reporting a handoff that did not happen.

## Example

```yaml theme={null}
TOOLS:
  transfer_to_agent(provider: string, queueId?: string, priority?: number) -> object

FLOW:
  hand_to_human:
    RESPOND: "Let me connect you with a specialist."
    CALL:
      transfer_to_agent(provider: "kore", queueId: "billing", priority: 5)
    THEN: COMPLETE
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.