GET
/
agents
/
{agent_id}
/
metadata
curl --request GET \
  --url https://api.contextual.ai/v1/agents/{agent_id}/metadata \
  --header 'Authorization: Bearer <token>'
{
  "name": "<string>",
  "description": "<string>",
  "datastore_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "system_prompt": "<string>",
  "filter_prompt": "<string>",
  "no_retrieval_system_prompt": "<string>",
  "llm_model_id": "<string>",
  "suggested_queries": [
    "<string>"
  ],
  "agent_configs": {
    "retrieval_config": {
      "top_k_retrieved_chunks": 123,
      "lexical_alpha": 123,
      "semantic_alpha": 123
    },
    "filter_and_rerank_config": {
      "top_k_reranked_chunks": 123,
      "reranker_score_filter_threshold": 123,
      "rerank_instructions": "<string>"
    },
    "generate_response_config": {
      "max_new_tokens": 123,
      "temperature": 123,
      "top_p": 123,
      "frequency_penalty": 123,
      "seed": 123,
      "calculate_groundedness": true,
      "avoid_commentary": false
    },
    "global_config": {
      "enable_rerank": true,
      "enable_filter": true,
      "enable_multi_turn": true
    }
  },
  "agent_usages_and_limits": {
    "query": [
      "<any>"
    ],
    "tune": [
      "<any>"
    ],
    "eval": [
      "<any>"
    ]
  }
}

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

ID of the agent for which to retrieve details

Response

200
application/json
Successful Response

Response to GET Agent request

name
string
required

Name of the agent

datastore_ids
string[]
required

The IDs of the datastore(s) associated with the agent

description
string

Description of the agent

system_prompt
string

Instructions that your agent references when generating responses. Note that we do not guarantee that the system will follow these instructions exactly.

filter_prompt
string

The prompt to an LLM which determines whether retrieved chunks are relevant to a given query and filters out irrelevant chunks. This prompt is applied per chunk.

no_retrieval_system_prompt
string

Instructions on how the agent should respond when there are no relevant retrievals that can be used to answer a query.

llm_model_id
string

The model ID to use for generation. Tuned models can only be used for the agents on which they were tuned. If no model is specified, the default model is used. Set to default to switch from a tuned model to the default model.

suggested_queries
string[]

These queries will show up as suggestions in the Contextual UI when users load the agent. We recommend including common queries that users will ask, as well as complex queries so users understand the types of complex queries the system can handle. The max length of all the suggested queries is 1000.

agent_configs
object

The following advanced parameters are experimental and subject to change.

agent_usages_and_limits
object | null

Agent usages in the current billing period with limits.