Skip to main content

kestrel-feature-observability

The single observability package for Kestrel Sovereign — one repo, one version, one source of truth for the whole observability domain — with two roles selected by the two entry-point groups (package boundaries need not match process boundaries):

  • Base install (pip install kestrel-feature-observability) — the lightweight per-agent emitter Feature (the kestrel_sovereign.features entry point). It attaches an ObservabilityHook to the agent's hook system; every lifecycle event is POSTed to the fleet host's observability store (POST {KESTREL_OBSERVABILITY_URL}/api/host/observability/events). No entities, no DB — this is what every agent gets. Prometheus metrics emit through the SDK's shared registry, so a single /metrics scrape stays coherent across the framework + every feature package.
  • Host extra (kestrel-feature-observability[fleet]) — pulls kestrel-feature-entities and enables the FleetObservabilityHostFeature (tenant-scoped event store + query routes + orchestrator swimlane; the kestrel_sovereign.host_features entry point). The HostFeature lives in the kestrel_feature_observability.fleet subpackage and its import/entry point is guarded — on a base install (extra absent) it resolves to None and the host skips it, so the emitter path never imports entities.

This package supersedes the separate kestrel-feature-observability-fleet package, which is deprecated: its HostFeature, store, and swimlane now live here behind the [fleet] extra.

Installation

uv pip install kestrel-feature-observability

For real Prometheus output:

uv pip install 'kestrel-feature-observability[metrics]'

For the fleet host role (event store + swimlane):

uv pip install 'kestrel-feature-observability[fleet]'

Both features are auto-discovered by Kestrel Sovereign via their entry-point groups — install the base package alongside kestrel-sovereign and ObservabilityFeature registers itself into every agent; install with [fleet] on the host and FleetObservabilityHostFeature registers at host scope.

Emitter transport

The hook reads two frozen env vars (the same keys talon's emitter uses):

  • KESTREL_OBSERVABILITY_URL — the fleet host root. The hook POSTs to this URL plus the path /api/host/observability/events. When unset, the emit path is a no-op (the agent still runs; Prometheus counters still fire).
  • KESTREL_OBSERVABILITY_KEY — sent as the X-API-Key request header when set.

Delivery is lightweight and best-effort: an httpx.AsyncClient POST, fire-and-forget with a short (~2s) timeout, all failures swallowed, no buffering, no retry, no entities dependency. Each event payload carries orchestrator/session_id/tool_name/lineage and friends; orchestrator is the agent itself when self-driven, else null (rendered "Direct" by the fleet store).

Privacy

The hook is observational — it never blocks, denies, or modifies. User-message content is not sent (only length); tool errors are truncated to 200 chars; exceptions in the hook are swallowed so they cannot affect agent operation.

Dependencies

  • kestrel-sovereign-sdk>=0.14.1,<1 — base Feature, Hook, and shared metrics module
  • httpx>=0.27.0 — lightweight HTTP client for the emitter POST
  • Optional [metrics] extra → kestrel-sovereign-sdk[metrics]prometheus-client
  • Optional [fleet] extra → kestrel-sovereign-sdk>=0.29.2,<0.30 (the HostFeature contract) + kestrel-feature-entities (the tenant-scoped event store, pulling SQLAlchemy 2.0 async + Alembic). Only this extra pulls entities.

The base emitter has no runtime dependency on kestrel-sovereign (or any entities/fleet package); the hook talks to the fleet host purely over HTTP. The store's heavy dependencies live entirely behind the [fleet] extra, so agents stay lightweight.

Development

uv pip install -e '.[test]'
uv run pytest

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kestrel_feature_observability-0.12.0.tar.gz (49.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kestrel_feature_observability-0.12.0-py3-none-any.whl (61.0 kB view details)

Uploaded Python 3

File details

Details for the file kestrel_feature_observability-0.12.0.tar.gz.

File metadata

File hashes

Hashes for kestrel_feature_observability-0.12.0.tar.gz
Algorithm Hash digest
SHA256 1555a2bb7d70257567269e78acfd1ab43d64585c9b68d1346bfec15656abe7fd
MD5 5a218908b6bc3f60529777478ec7563d
BLAKE2b-256 1c8709e292d67abc7c52bd1b8669797cf6ad3668fca9970bc30b07379a1d6d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for kestrel_feature_observability-0.12.0.tar.gz:

Publisher: publish.yml on KestrelSovereignAI/kestrel-feature-observability

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kestrel_feature_observability-0.12.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kestrel_feature_observability-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d63879252da5eb18f0ff267a12b86b509d3a2fb3fbd8fe29ed3bf19ca5716485
MD5 13b5fc16b0388f6640b2c9b4da2d6004
BLAKE2b-256 d64a9aaf47dec2aea75d63d65fa721ba6e95b20862b8216d5f434ca74e6a9f3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for kestrel_feature_observability-0.12.0-py3-none-any.whl:

Publisher: publish.yml on KestrelSovereignAI/kestrel-feature-observability

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.17.13

2 files

0.17.12

2 files

0.17.11

2 files

0.17.10

2 files

0.17.9

2 files

0.17.8

2 files

0.17.7

2 files

0.17.6

2 files

0.17.5

2 files

0.17.4

2 files

0.17.3

2 files

0.17.2

2 files

0.17.1

2 files

0.17.0

2 files

0.16.2

2 files

0.16.1

2 files

0.16.0

2 files

0.15.1

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

This release

0.12.0 This release

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page