Documentation Index
Fetch the complete documentation index at: https://docs.ixo.world/llms.txt
Use this file to discover all available pages before exploring further.
Overview
@ixo/oracles-client-sdk is the official React client for a QiForge oracle. It wraps:
- The streaming chat endpoint over SSE.
- The WebSocket event channel (tool calls, render components, browser tools, reasoning, AG-UI actions).
- UCAN delegation handling (refreshing Matrix access tokens, signing).
- Browser-side tool registration (so the agent can call DOM/UI actions on the user’s tab).
Install
useChat
The primary hook. Provides the message thread, the send function, and the SSE/WS event stream.messages— current thread history, including pending streamed tokens.sendMessage(text)— submit a user message. Triggers a streaming response.isStreaming—truewhile the agent is generating.events— typed event stream (tool calls, render components, browser tool calls, reasoning, …).
Browser tools
Browser tools let the agent call DOM/UI actions on the user’s tab. Register them once on mount:state.browserTools is non-empty (declared via registration).
Events you can render
| Event | What you render |
|---|---|
toolCall | ”Agent called <tool>” with args/result. |
actionCall | An AG-UI action invocation. |
renderComponent | A structured UI component the agent wants displayed (table, chart, form). |
reasoning | Intermediate reasoning text the agent emitted. |
browserToolCall | A tool call to a browser-side tool you registered. |
router | Routing decision between agents/sub-agents. |
messageCacheInvalidation | Hint to drop a cached message. |
Auth lifecycle
The SDK handles:- Refreshing the Matrix access token before it expires.
- Signing UCAN delegations from the user’s session key.
- Re-establishing the WebSocket on reconnect.
getDelegation() function that returns a fresh UCAN delegation when called — the SDK calls it on connect and on reconnect.
Where to read next
API endpoints
The HTTP / WebSocket protocol the SDK speaks.
Identity and auth
UCAN delegation and the per-request auth headers.