curl -X GET "https://agent.api.lyzr.app/v2/agent/{agent_id}" \
     -H "Accept: application/json" \
     -H "content-type: application/json"\
     -H "x-api-key: your_Lyzr_API_Key_Here" 
{
  "env_id": "66e1820aaxxxxxxx",
  "system_prompt": "Hello, I am your virtual assistant.",
  "name": "Virtual Assistant",
  "agent_description": "An assistant for handling general queries and tasks."
}

Endpoint: GET /v2/agent/{agent_id}

This endpoint retrieves detailed information about a specific agent identified by its unique agent ID.

Parameters

agent_id
string
required

The unique identifier of the agent whose details are to be retrieved.

Curl
curl -X GET "https://agent.api.lyzr.app/v2/agent/{agent_id}" \
     -H "Accept: application/json" \
     -H "content-type: application/json"\
     -H "x-api-key: your_Lyzr_API_Key_Here" 
Python
import requests

agent_id = "60d0fe4f531xxxxxx"  # Replace with the actual agent ID

url = f"https://agent.api.lyzr.app/v2/agent/{agent_id}"

headers = {
    "Content-Type": "application/json",
    "x-api-key": "your_Lyzr_API_Key_Here"
}

response = requests.get(url, headers=headers)
{
  "env_id": "66e1820aaxxxxxxx",
  "system_prompt": "Hello, I am your virtual assistant.",
  "name": "Virtual Assistant",
  "agent_description": "An assistant for handling general queries and tasks."
}

Response Parameters

env_id
dict

Identifier for the agent’s environment.

system_prompt
dict

Initial prompt for agent behavior.

name
dict

Name of the agent.

agent_description
dict

Description of the agent’s purpose