| Tool Name: | agent_query |
| Asset Name: | Query Agent |
| Description: | Ask an agent a one-off question and return its answer directly. Uses the agent's configured transition, model, context and tools. An optional sessionId supplies a snapshot of that session's root conversation; omitting it starts with fresh context and creates no session. Neither the question nor the answer is appended to the session. Does not consume queued messages or tasks, update agent state or timeline, or wake its run loop. Tools execute normally and may have side effects; this is not a read-only sandbox. The query is an ordinary Job, with token usage on the Job record. Unknown sessions and suspended or terminated agents are rejected. |
| Adapter: | agent |
| Asset Hash: | 0xb19593da16acbaf1bbcbf98b19da04fbac626eee8989864d0a48211dc4a02f90 |
| Property | Type | Description |
|---|---|---|
sessionId | string | Optional existing session identifier (hex, with or without 0x). Reads a snapshot of its conversation and loaded context without updating it or taking over an active cycle. Pending inbox messages and unfinished child goals are not executed. |
includeSteps | boolean | If true, return {response, steps, tokens?} instead of the answer alone. Steps are this query's ordered model-call records: reply (including any provider-supplied thinking), tool calls and results, timings, and child-goal inferences. Includes the final reply. Does not copy the standing prompt or prior conversation. Defaults to false. |
message* | any | Question or message to present only for this query. May be any non-null JSON value. |
agentId* | string | Agent reference: a bare name for the caller's agent, g/<id>, /g/<id>, or <ownerDID>/g/<id>. Requires agent/message authority, including the target's admission policy. |
Type: object
Schema: <code>{ "description": "By default the agent's response value directly (text or structured output). With includeSteps=true: {response, steps, tokens?}. Each step has ts, ms, op, model?, reply or error, and calls? [{id?, name, ms, result?, isError?, frame?: {inferences: [nested steps]}}]; tool arguments are in reply.toolCalls. Steps contain only recorded provider/runtime output, not inferred reasoning; transitions without a cycle record return an empty steps array. Tokens are present only when measured. A transition error fails the query Job." }</code>
This tool can be called via the MCP (Model Context Protocol) endpoint. Here are examples of how to use it:
POST to https://venue-3.covia.ai/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "agent_query",
"arguments": {
"input": "your input here"
}
}
}curl -X POST https://venue-3.covia.ai/mcp \\
-H "Content-Type: application/json" \\
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "agent_query",
"arguments": {
"input": "your input here"
}
}
}'import requests
import json
url = "https://venue-3.covia.ai/mcp"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "agent_query",
"arguments": {
"input": "your input here"
}
}
}
response = requests.post(url, json=payload)
result = response.json()
print(result)const fetch = require('node-fetch');
const url = 'https://venue-3.covia.ai/mcp';
const payload = {
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'agent_query',
arguments: {
input: 'your input here'
}
}
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data));{
"name": "Query Agent",
"description": "Ask an agent a one-off question and return its answer directly. Uses the agent's configured transition, model, context and tools. An optional sessionId supplies a snapshot of that session's root conversation; omitting it starts with fresh context and creates no session. Neither the question nor the answer is appended to the session. Does not consume queued messages or tasks, update agent state or timeline, or wake its run loop. Tools execute normally and may have side effects; this is not a read-only sandbox. The query is an ordinary Job, with token usage on the Job record. Unknown sessions and suspended or terminated agents are rejected.",
"dateCreated": "2026-10-04T00:00:00Z",
"operation": {
"adapter": "agent:query",
"toolName": "agent_query",
"readOnly": false,
"internal": false,
"input": {
"type": "object",
"properties": {
"agentId": { "type": "string", "description": "Agent reference: a bare name for the caller's agent, g/<id>, /g/<id>, or <ownerDID>/g/<id>. Requires agent/message authority, including the target's admission policy." },
"message": { "description": "Question or message to present only for this query. May be any non-null JSON value." },
"sessionId": { "type": "string", "description": "Optional existing session identifier (hex, with or without 0x). Reads a snapshot of its conversation and loaded context without updating it or taking over an active cycle. Pending inbox messages and unfinished child goals are not executed." },
"includeSteps": { "type": "boolean", "description": "If true, return {response, steps, tokens?} instead of the answer alone. Steps are this query's ordered model-call records: reply (including any provider-supplied thinking), tool calls and results, timings, and child-goal inferences. Includes the final reply. Does not copy the standing prompt or prior conversation. Defaults to false." }
},
"required": ["agentId", "message"],
"additionalProperties": false
},
"output": {
"description": "By default the agent's response value directly (text or structured output). With includeSteps=true: {response, steps, tokens?}. Each step has ts, ms, op, model?, reply or error, and calls? [{id?, name, ms, result?, isError?, frame?: {inferences: [nested steps]}}]; tool arguments are in reply.toolCalls. Steps contain only recorded provider/runtime output, not inferred reasoning; transitions without a cycle record return an empty steps array. Tokens are present only when measured. A transition error fails the query Job."
}
}
}