oiq, a command line for asking the assistant, calling its tools, and reading incidents and logs from a terminal or a script.- An Agent2Agent (A2A) endpoint, so another agent can hand the assistant a question, follow the investigation and read the cited answer.
Create a token for the assistant
Under Settings → Access tokens, create a token, choose Choose scopes, and tick Use the AI assistant (assistant:run). It is never part of the
Read only or Read & write presets, because asking the assistant spends
your daily AI allowance. Add telemetry:read and alerts:read too if you will
use oiq logs search and oiq incidents list.
Your role must also read traces, logs and metrics, as for the assistant in the
dashboard. A member limited to their team’s services is refused, because an
investigation reads across every service.
What a token cannot do, whatever its scopes: approve a tool call the assistant
wants to make, undo a change, or share an investigation. Those stay with you,
signed in. An investigation waiting for an approval reports that it is waiting.
The oiq command line
oiq is a single Go program with no dependencies outside the standard library.
Build it from the repository:
OIQ_TOKEN (or pasted on standard input)
and saved, with the URL, in $XDG_CONFIG_HOME/oiq/config.json (by default
~/.config/oiq/config.json), readable only by you. oiq never prints the token.
OIQ_URL and OIQ_TOKEN override the saved values, which suits CI.
Ask the assistant
[E1], [E2]…) refers to
print to standard output, followed by the conversation (context) and task ids.
The assistant’s tools
The read-only tools the assistant itself uses, called directly:--arg key=value repeats; a value that is valid JSON (a number, true, an
array) is sent as that, anything else as text. The result is printed as JSON.
Incidents and logs
incidents list takes --status, --severity and --limit; logs search
takes --service, --from, --to and --limit (at most 200). Every command
takes --json for the API’s own response.
Exit codes
The A2A endpoint
The assistant speaks the Agent2Agent protocol, version 1.0, over its JSON-RPC 2.0 binding.Methods
Put the investigation mode in the request’s
metadata.mode. A message’s
messageId is its idempotency key: sending the same one again returns the same
task rather than starting a second investigation.
answer, with two parts: the answer as Markdown
text, and a JSON data part with its citations, the trust verdict and
confidence, the evidence the citations refer to and the rootCause.
States. An investigation that asks you a question is
TASK_STATE_INPUT_REQUIRED, with the question in the status message — answer it
with SendMessage naming the taskId. One waiting for a person to approve a tool
call is TASK_STATE_AUTH_REQUIRED: approve it in the dashboard; it cannot be
approved over this endpoint.
Errors use the JSON-RPC envelope with HTTP 200: -32700 parse error, -32600
invalid request, -32601 unknown method, -32602 invalid parameters, -32001
task not found, -32002 task not cancelable, -32003 push notifications (not
supported), -32004 unsupported operation, -32005 a non-text part, and
-32009 an A2A-Version other than 1.0. When the product refuses — the assistant
is switched off, your allowance is spent, too many investigations are running —
the code is -32000, with the product’s message and its HTTP status in data.
A task you may not read, including one from another organization or a
colleague’s private investigation, answers exactly as one that does not exist.
