Contextual AI /agents/{id}/query API

The /agents/{id}/query API from Contextual AI — 5 operation(s) for /agents/{id}/query.

GitHub OpenAPI

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /agents/{agent_id}/query/acl Query an agent with an ACL path · Query #
Ask an LLM
“Can I query an agent through the /query/acl path and get its response?”
“Is there an ACL endpoint for agent queries?”
Tell an agent
Query agent {agent_id} through the /query/acl path with messages {messages}.
Send a /query/acl request to agent {agent_id} with {messages} and include retrieval content text {include_retrieval_content_text}.
POST /agents/{agent_id}/query Query an agent · Query #
Ask an LLM
“How do I start a conversation with an agent and get its generated response?”
“Can I filter which documents an agent retrieves when I query it?”
Tell an agent
Query agent {agent_id} with messages {messages}.
Ask agent {agent_id} a question with {messages} using model {llm_model_id}.
GET /agents/{agent_id}/query/{message_id}/retrieval/info Get retrieval metadata for a message · Get Retrieval Info #
Ask an LLM
“Which documents did an agent use to answer a particular message?”
“Can I see the metadata of the content behind a generated response?”
Tell an agent
Get retrieval info for message {message_id} on agent {agent_id} for content {content_ids}.
Show the content metadata agent {agent_id} used to answer message {message_id}.
POST /agents/{agent_id}/feedback Give feedback on an agent's generation or retrieval · Provide Feedback #
Ask an LLM
“How do I rate an agent's answer or the documents it retrieved?”
“Can I explain why I gave a particular feedback rating?”
Tell an agent
Give feedback {feedback} on message {message_id} of agent {agent_id}.
Rate retrieval {content_id} from agent {agent_id} as {feedback} with explanation {explanation}.
GET /agents/{agent_id}/metrics Get usage and feedback metrics for an agent · Get Metrics #
Ask an LLM
“How many queries has an agent handled and what feedback has it received?”
“Can I filter an agent's metrics by user or date range?”
Tell an agent
Get metrics for agent {agent_id}.
Show agent {agent_id}'s usage and feedback metrics for users {user_emails}.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contextual-ai:contextual-ai-agents-id-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contextual-ai-agents-id-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Endpoints /agents/{id}/query API
  version: '1.0'
servers:
- url: https://api.contextual.ai/v1
security:
- BearerAuth: []
tags:


# --- truncated at 32 KB (44 KB total) ---
# Full source: https://artifacts.apis.io/contextual-ai/openapi/contextual-ai-agents-id-query-api-openapi.yml