# _introspect

URL: /pounce/api/_introspect/
Section: api
Description: Built-in ``/_pounce/info`` introspection endpoint (Sprint 5).

Disabled by default. When ``ServerConfig.introspection_enabled`` is True,
the worker dispatches GET requests at ``introspection_path`` to
`build_introspect_response`() before the request reaches the ASGI
application.

The response body is a JSON object with three sections:

- **runtime**: Pounce and operator build identity, Python build and GIL state,
  configured worker mode, resolved worker model, and server uptime.
- **worker**: per-worker identity (``worker_id``) and live counters
  (``active_connections``).
- **config**: the `redacted_config_view`() of
  the active `ServerConfig` — fail-closed via
  ``INFO_ALLOWLIST``.

See ``docs/troubleshooting.md#POUNCE_CONFIG_INTROSPECTION_PUBLIC`` for the
warning emitted when the endpoint is bound non-loopback.

---

> For a complete page index, fetch /pounce/llms.txt.

Open LLM text
(/pounce/api/_introspect/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_introspect%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_introspect%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_introspect%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_introspect%2Findex.txt)

Module

#
`_introspect`

Built-in`/_pounce/info`introspection endpoint (Sprint 5).

Disabled by default. When`ServerConfig.introspection_enabled`is True,
the worker dispatches GET requests at`introspection_path`to
`build_introspect_response`() before the request reaches the ASGI
application.

The response body is a JSON object with three sections:

- runtime: Pounce and operator build identity, Python build and GIL state,
configured worker mode, resolved worker model, and server uptime.

- worker: per-worker identity (`worker_id`) and live counters
(`active_connections`).

- config: the`redacted_config_view`() of
the active`ServerConfig`— fail-closed via
`INFO_ALLOWLIST`.

See`docs/troubleshooting.md#POUNCE_CONFIG_INTROSPECTION_PUBLIC`for the
warning emitted when the endpoint is bound non-loopback.

3Functions

## Functions

`_python_build_identity`

0

`dict[str, str | bool]`

▼

Return non-sensitive fields that identify the running Python build.

`def _python_build_identity() -> dict[str, str | bool]`

##### Returns

`dict[str, str | bool]`

`_operator_build_id`

0

`str | None`

▼

Return the explicitly public operator identity, or ``None`` when unset.

`def _operator_build_id() -> str | None`

##### Returns

`str | None`

`build_introspect_response`

3

`tuple[int, list[tuple[by…`

▼

Build the ``/_pounce/info`` JSON response.

`def build_introspect_response(*, config: ServerConfig, worker_id: int, active_connections: int) -> tuple[int, list[tuple[bytes, bytes]], bytes]`

##### Parameters

Name
Type
Description

`config`
`ServerConfig (/pounce/api/config/#ServerConfig)`

`worker_id`
`int`

`active_connections`
`int`

##### Returns

`tuple[int, list[tuple[bytes, bytes]], bytes]`
