> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getraya.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getraya.app/_mcp/server.

# Get agent

GET https://v1.getraya.app/api/agent/{id}

Retrieves detailed information about an agent using its UUID.

Reference: https://docs.getraya.app/api-reference/agents/get-agent

## Authentication

- `X-API-Key` header (required) — API key for authentication. Example: raya_ABCD1234567890abcdef

## Request

### Path parameters

- `id` (string, required) — The UUID of the agent

## Response

### 200

Agent details retrieved successfully

- `uuid` (string, optional) — Unique identifier of the agent
- `name` (string, optional) — Name of the agent
- `instructions` (string, optional) — Agent instructions
- `output_instructions` (string, optional) — Instructions for how to populate output_fields after a call.
- `output_fields` (list of AgentDetailsResponseOutputFieldsItems, optional) — Array of key-description pairs. Each item has key and description only (no extra properties).
- `agent_args` (map from string to any, optional) — Agent arguments as a JSON object (e.g. \{"contact\_name": "John", "order\_id": "123"}). Not an array.
- `required_silence_after_speech` (double, optional, nullable) — Required silence after speech in seconds
- `allowed_silence_before_nudge` (double, optional, nullable) — Allowed silence before nudge in seconds
- `allowed_speech_before_nudge` (double, optional, nullable) — Allowed speech before nudge in seconds
- `out_did` (double, optional, nullable) — Outbound DID number
- `in_did` (double, optional, nullable) — Inbound DID number (read-only; for reference)
- `webhook_url` (string, optional, nullable) — Webhook URL for callbacks (sent on call completed or call failure). See [Webhooks](/voice-agents/core-concepts#webhooks) for payload format.
- `allow_call_transfer` (boolean, optional) — When true, the voice agent may use live call transfer to a human (India only). Default true.
- `transfer_destination_phone` (string, optional, nullable) — India mobile, 10 digits, no country code. Null or omit if not using transfer.
- `language_id` (string, optional, nullable) — Call language UUID. See /documentation/agent-language-options.
- `voice_id` (string, optional, nullable) — Voice UUID. See /documentation/agent-voice-options.
- `languages` (list of string, optional) — Languages the agent speaks (ISO 639-1); the first is the starting language. Empty for a single-language agent.
- `stt_language_mode` (enum, optional) — How the caller's language is detected: auto (every turn), lock (first detected language, code-mix on) or handoff (lock, code-mix off).
  - Allowed values: `auto`, `lock`, `handoff`
- `default_voice_id` (string, optional, nullable) — Starting voice of a composite `voice_id`, or null.
- `tools` (AgentDetailsResponseTools, optional) — Function tools (`{ "llm_tools": [...] }`). Empty array when none configured.
- `allow_interruption` (boolean, optional) — Whether the user may interrupt the agent while speaking.
- `min_user_speech_to_interrupt` (double, optional, nullable) — Minimum user speech duration (seconds) before interruption is allowed.
- `max_call_duration_mins` (double, optional, nullable) — Maximum call duration in minutes.
- `say_hello` (boolean, optional) — Whether the agent says hello at call start.
- `voicemail_msg` (string, optional, nullable) — Message played when voicemail is detected.
- `call_duration_exceed_message` (string, optional, nullable) — Message played when the maximum call duration is reached.
- `messages` (list of string, optional) — Notes about the request, present only when there are any: an inbound number moved from another agent, or more than 4 `languages`. The change itself was applied.

## Errors

### 400 Bad Request Error

Validation error

- `error` (string, optional)
- `message` (string, optional)

### 401 Unauthorized Error

Unauthorized - Invalid or missing API key

- `error` (string, optional)
- `message` (string, optional)

### 404 Not Found Error

Agent not found

- `error` (string, optional)
- `message` (string, optional)

### 500 Internal Server Error

Internal server error

- `error` (string, optional)
- `message` (string, optional)

## Types

### AgentDetailsResponseOutputFieldsItems

- `key` (string, required) — Field name (e.g. visit_scheduled)
- `description` (string, optional, default: ) — Description of what to extract

### AgentDetailsResponseTools

Function tools (`{ "llm_tools": [...] }`). Empty array when none configured.

- `llm_tools` (list of map from string to any, optional)

## Examples

**Response**

```json
{
  "uuid": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Customer Support Agent",
  "instructions": "You are a helpful customer support agent. Be professional and friendly. Ask follow-up questions when needed. Take notes on the customer's responses.",
  "output_instructions": "Extract all customer information accurately. Ensure dates are in YYYY-MM-DD format.",
  "output_fields": [
    {
      "key": "visit_scheduled",
      "description": "Yes or No values"
    },
    {
      "key": "interested_plan",
      "description": "Plan selected from Pro, Enterprise, Basic"
    }
  ],
  "agent_args": {},
  "required_silence_after_speech": 0.4,
  "allowed_silence_before_nudge": 20,
  "allowed_speech_before_nudge": 30,
  "out_did": 918040582331,
  "in_did": 918040582331,
  "webhook_url": "https://example.com/webhook",
  "allow_call_transfer": true,
  "transfer_destination_phone": "9876543210",
  "language_id": "string",
  "voice_id": "string",
  "languages": [
    "string"
  ],
  "stt_language_mode": "auto",
  "default_voice_id": "string",
  "tools": {
    "llm_tools": [
      {}
    ]
  },
  "allow_interruption": true,
  "min_user_speech_to_interrupt": 1.1,
  "max_call_duration_mins": 1.1,
  "say_hello": true,
  "voicemail_msg": "string",
  "call_duration_exceed_message": "string",
  "messages": [
    "string"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000"

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000';
const options = {method: 'GET', headers: {'X-API-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://v1.getraya.app/api/agent/123e4567-e89b-12d3-a456-426614174000")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```