Skip to main content

README

Agent Runtimes


Agent Runtimes / hooks/useToolApprovals

hooks/useToolApprovals

Agent tool approval hooks (WebSocket-only).

All tool-approval interactions flow over the AI Agents websocket stream. There are no REST endpoints — the server publishes approval snapshots and tool_approval_* events, and the client sends tool_approval_decision messages to approve/reject pending requests.

Consumers use the familiar React Query-style API below. Internally the hooks:

  • subscribe to the shared AI Agents WS once per component tree
  • seed/update the ['tool-approvals', filters] query cache from events
  • send decision messages over the same socket for mutations

Type Aliases

Functions