AgentQueries
No description
type AgentQueries {
listAgents: [Agent!]
getAgent(
agentId: Long
publicId: String
): AgentData
listAgentRuns(
agentId: Long!
limit: Int
): [AgentRun!]
listOrgAgentRuns(
agentId: Long
status: String
triggerSource: String
from: String
to: String
limit: Int
offset: Int
): [AgentRun!]
listToolRunHistory(
toolId: Long!
from: String
to: String
limit: Int
offset: Int
): [AgentRun!]
getAgentRun(
agentRunId: Long!
): AgentRunDetail
getTestSession(
agentId: Long!
): TestSessionData
agentUsage(
days: Int
): AgentUsage
listBuiltinTools: [BuiltinToolGql!]
listNativeTools(
integrationId: Long!
): [NativeToolGql!]
}
Fields
AgentQueries.listAgents ● [Agent!] list object
List the organization's agents. Requires canRunAgents or canManageAgents.
AgentQueries.getAgent ● AgentData object
An agent with its editable draft and current release
AgentQueries.getAgent.agentId ● Long scalar
AgentQueries.getAgent.publicId ● String scalar
AgentQueries.listAgentRuns ● [AgentRun!] list object
Recent runs of an agent, newest first (bounded)
AgentQueries.listAgentRuns.agentId ● Long! non-null scalar
AgentQueries.listAgentRuns.limit ● Int scalar
AgentQueries.listOrgAgentRuns ● [AgentRun!] list object
Org-wide filterable run history (agent/status/source/date), newest first (bounded)
AgentQueries.listOrgAgentRuns.agentId ● Long scalar
Optional agent filter
AgentQueries.listOrgAgentRuns.status ● String scalar
Optional status filter
AgentQueries.listOrgAgentRuns.triggerSource ● String scalar
Optional trigger-source filter
AgentQueries.listOrgAgentRuns.from ● String scalar
Optional lower bound (ISO date or datetime, inclusive)
AgentQueries.listOrgAgentRuns.to ● String scalar
Optional upper bound (ISO date or datetime, inclusive)
AgentQueries.listOrgAgentRuns.limit ● Int scalar
Max runs, 1-100 (default 25)
AgentQueries.listOrgAgentRuns.offset ● Int scalar
Row offset for pagination (default 0)
AgentQueries.listToolRunHistory ● [AgentRun!] list object
Runs that invoked a given Agent tool, newest first (bounded)
AgentQueries.listToolRunHistory.toolId ● Long! non-null scalar
AgentQueries.listToolRunHistory.from ● String scalar
AgentQueries.listToolRunHistory.to ● String scalar
AgentQueries.listToolRunHistory.limit ● Int scalar
AgentQueries.listToolRunHistory.offset ● Int scalar
AgentQueries.getAgentRun ● AgentRunDetail object
One run with its per-step ledger
AgentQueries.getAgentRun.agentRunId ● Long! non-null scalar
AgentQueries.getTestSession ● TestSessionData object
The caller's active test-chat session with transcript and live run, if any
AgentQueries.getTestSession.agentId ● Long! non-null scalar
AgentQueries.agentUsage ● AgentUsage object
Server-side usage aggregates: daily buckets plus month-to-date budget consumption
AgentQueries.agentUsage.days ● Int scalar
Window in days for the daily buckets (1-90, default 30)
AgentQueries.listBuiltinTools ● [BuiltinToolGql!] list object
The built-in agent tools (web_search, web_fetch) with availability on this server
AgentQueries.listNativeTools ● [NativeToolGql!] list object
The native agent tools one integration brings with it, with their derived tool names
AgentQueries.listNativeTools.integrationId ● Long! non-null scalar
Returned By
agents query