Skip to main content
GET
/
agents
/
{agent_id}
Python
from datagrid_ai import Datagrid

client = Datagrid(
    api_key="My API Key",
)
agent = client.agents.retrieve(
    "agent_id",
)
print(agent.id)
{
  "object": "agent",
  "id": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "agent_model": "magpie-1.1",
  "llm_model": "gemini-2.5-pro",
  "knowledge_ids": [
    "<string>"
  ],
  "tools": [
    {
      "name": "data_analysis",
      "connection_id": "<string>"
    }
  ],
  "system_prompt": "<string>",
  "custom_prompt": "<string>",
  "planning_prompt": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string
required

The ID of the agent to retrieve

Response

Agent details

object
enum<string>
required

The object type, always 'agent'

Available options:
agent
id
string
required

Unique identifier for the agent

name
string
required

The name of the agent

created_at
string<date-time>
required

The ISO string for when the agent was created

agent_model
enum<string> | null
default:magpie-1.1
required

The version of Datagrid's agent brain.

  • magpie-1.1 is the default and most powerful model.
  • magpie-1.1-flash is a faster model useful for RAG usecases, it currently only supports semantic_search tool. Structured outputs are not supported with this model.
Available options:
magpie-1.1,
magpie-1.1-flash,
magpie-1
llm_model
default:gemini-2.5-flash
required

The LLM used to generate responses.

Available options:
gemini-2.5-pro,
gemini-2.5-pro-preview-05-06,
gemini-2.5-flash,
gemini-2.5-flash-preview-04-17,
gemini-2.5-flash-lite,
gpt-5,
gemini-2.0-flash-001,
gemini-2.0-flash,
gemini-1.5-pro-001,
gemini-1.5-pro-002,
gemini-1.5-flash-002,
gemini-1.5-flash-001,
chatgpt-4o-latest,
gpt-4o,
gpt-4,
gpt-4-turbo,
gpt-4o-mini
knowledge_ids
string[] | null
required

Array of Knowledge IDs the agent should use during the converse. When ommited, all knowledge is used.

tools
object[]
required

Tools that this agent can use.

system_prompt
string | null
required

Directs your AI Agent's operational behavior.

custom_prompt
string | null
required

Use custom prompt to instruct the style and formatting of the agent's response

planning_prompt
string | null
required

Define the planning strategy your AI Agent should use when breaking down tasks and solving problems

I