> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get agent activity client settings

> **Prototype.** Returns how a client that reports agent activity (today, the Claude Code hook kit on a developer's machine) should send batched events for this organization: the minimum gap between two sends from one machine, the most events and bytes one request to `/agent-activity` may carry, the request rate to stay under, and how long the answer may be cached.

The rate is derived from the organization's own rate limit for `POST /agent-activity`, which every client in the organization shares: the clients that asked for these settings in the last cache period or two share half of it evenly, and the checks before tool calls keep the other half. A check before a tool call is not batched and should not be held back by this rate. A client is counted by its `X-Opal-Host` and `X-Opal-Actor` headers, so it should send the same ones it sends to `/agent-activity`.

A client should ask for these at most once per `cache_seconds`, and keep using its last answer, or its own defaults, when it cannot get one.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /agent-activity/client-settings
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: agent-activity
    description: Operations related to agent activity telemetry
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: campaigns
    description: Operations related to access review campaigns
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: event-streams
    description: Operations related to event streaming connections
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: opal-queries
    description: Operations related to OpalQuery
  - name: opal-scripts
    description: Operations related to OpalScripts
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: role-assignments
    description: >-
      Operations related to role assignments (general grants between an entity
      and a principal)
  - name: paladin
    description: Operations related to Paladin
  - name: service-users
    description: Operations related to service users (non-human identities owned by a team)
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs. Deprecated in favor of the `campaigns` API.
  - name: users
    description: Operations related to users
paths:
  /agent-activity/client-settings:
    get:
      tags:
        - agent-activity
      summary: Get agent activity client settings
      description: >-
        **Prototype.** Returns how a client that reports agent activity (today,
        the Claude Code hook kit on a developer's machine) should send batched
        events for this organization: the minimum gap between two sends from one
        machine, the most events and bytes one request to `/agent-activity` may
        carry, the request rate to stay under, and how long the answer may be
        cached.


        The rate is derived from the organization's own rate limit for `POST
        /agent-activity`, which every client in the organization shares: the
        clients that asked for these settings in the last cache period or two
        share half of it evenly, and the checks before tool calls keep the other
        half. A check before a tool call is not batched and should not be held
        back by this rate. A client is counted by its `X-Opal-Host` and
        `X-Opal-Actor` headers, so it should send the same ones it sends to
        `/agent-activity`.


        A client should ask for these at most once per `cache_seconds`, and keep
        using its last answer, or its own defaults, when it cannot get one.
      operationId: getAgentActivityClientSettings
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentActivityClientSettings'
          description: The settings for this organization.
        '403':
          description: Agent activity ingest is not enabled for this organization.
      security:
        - BearerAuth: []
components:
  schemas:
    AgentActivityClientSettings:
      description: |-
        # AgentActivityClientSettings Object
        ### Description
        How a client should send batched agent activity for this organization.
      properties:
        batch_wait_seconds:
          description: >-
            The minimum gap between two sends from one machine. Send at once
            when the last send was at least this long ago; otherwise wait until
            this long after the last send, and send what arrived meanwhile as
            one request. Between 0 and 300.
          format: double
          type: number
        max_events_per_request:
          description: The most events one request to `/agent-activity` may carry.
          type: integer
        max_bytes_per_request:
          description: >-
            The largest body, in bytes, `/agent-activity` accepts for a request
            with more than one event. A request with one event may be up to 1
            MiB.
          format: int64
          type: integer
        max_requests_per_second:
          description: >-
            The rate of batched requests one client should stay under. Can be
            below 1.
          format: double
          type: number
        burst_requests:
          description: >-
            How many batched requests a client may send at once before the rate
            applies. At least 1.
          type: integer
        cache_seconds:
          description: How long these settings may be kept before asking again.
          type: integer
      required:
        - batch_wait_seconds
        - max_events_per_request
        - max_bytes_per_request
        - max_requests_per_second
        - burst_requests
        - cache_seconds
      type: object
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.