---
title: "Get Agent"
method: GET
path: "/api/v1/agent/{id}"
tags: ["Agents"]
---

# Get Agent

`GET /api/v1/agent/{id}`

## Path parameters

- `id` string, required

## Query parameters

- `populate` 'agent_documents' — When set to 'agent_documents', the response will include the 'agent_documents' property.

## Headers

- `CodeGPT-Org-Id` string

## Response `200`

Successful Response

- GetAgentData
  - `id` string — Agent id
  - `org_id` string — ID of the Organization the agent belongs to
  - `created_at` string, date-time — Date when the agent was created
  - `agent_type` 'qa' | 'other' — Type of the agent
  - `name` string, nullable — Name of the agent
  - `description` string, nullable — Description of the agent
  - `image` string, nullable — Image of the agent in chat
  - `prompt` string, nullable — Prompt of the agent
  - `topk` integer, nullable — Number of elements to retrieve from the documents
  - `temperature` number, nullable — Temperature of the agent
  - `model` string, nullable — Model of the agent
  - `welcome` string, nullable — Welcome message of the agent
  - `is_public` boolean — Whether the agent can be seen and used by any user or not
  - `pincode` string — Code required for using a shared agent
  - `agent_documents` string[] — List of document ids

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.dev/codegpt/apis/codegpt-api-beta.md) · [All operations](https://skmtc.dev/codegpt/apis/codegpt-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codegpt/codegpt-api-beta/revisions/0a70b3b0cec3/schema)
