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 emitterFeature(thekestrel_sovereign.featuresentry point). It attaches anObservabilityHookto the agent's hook system; every lifecycle event is emitted as an OpenTelemetry span (a sessionrun_spanwith childtool_spans) viaKestrelTracer, exported over OTLP/HTTP to whateverOTEL_EXPORTER_OTLP_ENDPOINTpoints at (e.g. a host-supervised Phoenix). No DB — this is what every agent gets. Prometheus metrics emit through the SDK's shared registry, so a single/metricsscrape stays coherent across the framework + every feature package. - Host extra (
kestrel-feature-observability[fleet]) — enables theFleetObservabilityHostFeature(thekestrel_sovereign.host_featuresentry point), which ships the single "Observability" console panel with a two-item sub-nav: Navigator (default) — the hierarchical fleet drill-down (Tenant → Fleet → Agent → Subagent → Session → Turn → Events) rendered kestrel-native as a lazily-expanding virtualized tree, a pure read-model over Phoenix's GraphQL through the same-origin/phoenix/graphqlproxy (no store, no new host routes) — and Phoenix, the curated thin embed of the host-supervised Phoenix UI, which the navigator's per-trace "open in Phoenix" links deep-link into. The HostFeature lives in thekestrel_feature_observability.fleetsubpackage. Since the custom store/entities were retired,fleet/feature.pyimports only theHostFeature/UIContributionscontract fromkestrel_sdk, so the host role is gated by the SDK version, not by an extra-only importable module: the[fleet]extra tightens the SDK pin (>=0.30.0,<0.31) to the range that exports that contract. The import/entry point stays guarded — if the resolved SDK is too old to export the contract, it degrades toNone(with a warning logged) and the host skips the panel instead of crashing the feature scan.
This package supersedes the separate
kestrel-feature-observability-fleetpackage, which is deprecated.
Installation
uv pip install kestrel-feature-observability
For real Prometheus output:
uv pip install 'kestrel-feature-observability[metrics]'
For the fleet host role (the Phoenix-embed console panel):
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 emits OpenTelemetry spans via KestrelTracer
(kestrel_feature_observability.tracing), exported over OTLP/HTTP. Endpoint
discovery is OTel-standard:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT— a full traces endpoint (used as-is), orOTEL_EXPORTER_OTLP_ENDPOINT— a base endpoint (the exporter appends/v1/traces), e.g. the host-supervised local Phoenix.OTEL_EXPORTER_OTLP_HEADERS— honored for auth.KESTREL_OTEL_PROJECT— the Phoenix project spans land in, stamped as theopeninference.project.nameResource attribute. Defaults tokestrel-fleet, which the fleet console's curated Observability panel deep-links to — so per-agent hook traces show up there instead of Phoenix's "default" project.
When no OTLP endpoint is configured the tracer is a no-op — no provider, no
exporter, no network — so the emit path costs nothing and the agent runs
unaffected (Prometheus counters still fire locally). A session run_span is
opened lazily on the first lifecycle event and closed on Stop/AgentTerminate;
each PostToolUse emits a child tool_span carrying tool name, real duration,
and success. orchestrator is the agent itself when self-driven, else inherited.
Privacy
The hook is observational — it never blocks, denies, or modifies. User-message content is not recorded (never stamped on any span); 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— baseFeature,Hook, and sharedmetricsmodulehttpx>=0.27.0— lightweight HTTP client (OTLP/HTTP export transport)opentelemetry-sdk+opentelemetry-exporter-otlp-proto-http+openinference-semantic-conventions— the OTel span builders + OTLP export- Optional
[metrics]extra →kestrel-sovereign-sdk[metrics]→prometheus-client - Optional
[fleet]extra →kestrel-sovereign-sdk>=0.30.0,<0.31(the HostFeature contract for the Phoenix-embed console panel). No DB.
The base emitter has no runtime dependency on kestrel-sovereign (or any
fleet package); it emits OTel spans over OTLP/HTTP. The [fleet] extra adds only
the host SDK contract for the embed panel, 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kestrel_feature_observability-0.16.0.tar.gz.
File metadata
- Download URL: kestrel_feature_observability-0.16.0.tar.gz
- Upload date:
- Size: 61.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96640c548752233cbca68fc7f012567c3fa37c399898c6854502f65cf9c3860e
|
|
| MD5 |
cf89fff1d92d69baaf414a7ffa2926c9
|
|
| BLAKE2b-256 |
452c4a4d29be5abd1c858dc3b2b1895d17c59d5e4e4c3710a65a7704a224a997
|
Provenance
The following attestation bundles were made for kestrel_feature_observability-0.16.0.tar.gz:
Publisher:
publish.yml on KestrelSovereignAI/kestrel-feature-observability
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kestrel_feature_observability-0.16.0.tar.gz -
Subject digest:
96640c548752233cbca68fc7f012567c3fa37c399898c6854502f65cf9c3860e - Sigstore transparency entry: 2218213319
- Sigstore integration time:
-
Permalink:
KestrelSovereignAI/kestrel-feature-observability@32a73ba023cbd3a135b976065afa7fb72d7dca68 -
Branch / Tag:
refs/tags/v0.16.0 - Owner: https://github.com/KestrelSovereignAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32a73ba023cbd3a135b976065afa7fb72d7dca68 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kestrel_feature_observability-0.16.0-py3-none-any.whl.
File metadata
- Download URL: kestrel_feature_observability-0.16.0-py3-none-any.whl
- Upload date:
- Size: 68.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a748af5af69a399cd36574de65261352c35e570e4b261621deb57518e04cb9a2
|
|
| MD5 |
df9400457a5ee3240480e3b3a36b3521
|
|
| BLAKE2b-256 |
76c32a877f67594796ee10d8113de69d40dc23cb56bced9d465406a34fd9a791
|
Provenance
The following attestation bundles were made for kestrel_feature_observability-0.16.0-py3-none-any.whl:
Publisher:
publish.yml on KestrelSovereignAI/kestrel-feature-observability
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kestrel_feature_observability-0.16.0-py3-none-any.whl -
Subject digest:
a748af5af69a399cd36574de65261352c35e570e4b261621deb57518e04cb9a2 - Sigstore transparency entry: 2218213357
- Sigstore integration time:
-
Permalink:
KestrelSovereignAI/kestrel-feature-observability@32a73ba023cbd3a135b976065afa7fb72d7dca68 -
Branch / Tag:
refs/tags/v0.16.0 - Owner: https://github.com/KestrelSovereignAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32a73ba023cbd3a135b976065afa7fb72d7dca68 -
Trigger Event:
push
-
Statement type: