Skip to main content

forgesight-registry

Declared agent ownership auto-stamped onto every run — plus offline chargeback and catalogue rollups — for ForgeSight. The last mile from per-run cost to org-level FinOps: declare an agent once instead of tagging it every run, everywhere, inconsistently.

pip install forgesight-registry
# agents.yaml — one source of truth
agents:
  - name: invoice-parser
    version: "2.3.0"
    owner: "fin-platform@acme.com"
    team: "finance-platform"
    repo: "acme/invoice-agents"
    lifecycle: "ga"
    sla_tier: "tier-1"
  - name: nightly-summariser
    version: "*"
    owner: "growth@acme.com"
    team: "growth"
    lifecycle: "beta"
import forgesight
from forgesight_registry import Registry

reg = Registry.from_file("agents.yaml")
forgesight.configure(run_metadata_provider=reg.ownership_metadata)  # stamp ownership at run start

# Agent author writes nothing extra — every run now carries team/owner/repo/... on the
# root span and every child (FR-5):
with forgesight.telemetry.agent_run("invoice-parser", version="2.3.0") as run:
    ...

How it works

  • Stamp at run start. The registry resolves (name, version) — exact → "*" wildcard → unmatched — and merges the agent's ownership fields into the run's metadata. Caller-set keys win (a one-off environment=staging survives). Undeclared agents are counted (on_unmatched = warn | ignore | error), so the registry doubles as a "what's running but undeclared" detector.
  • Chargeback is a group-by. ChargebackReport.from_records(records, dimensions=["team", "environment"]) sums cost_usd / tokens / runs / failures per group — clean, because the dimensions were stamped at source. An absent dimension groups under <unattributed> so cost never vanishes.
  • Catalogue = declared ∪ observed. AgentCatalogue.from_records(records, registry=reg, now_unix_nanos=…) joins the declared registry (owner / lifecycle / SLA) with observed telemetry (last-seen / run count / windowed cost), surfacing declared-but-silent and active-but-undeclared agents.

Configuration

registry:
  enabled: true              # master switch (default false — install does nothing until on)
  source: "file"             # file | http | <custom>
  path: "agents.yaml"
  on_unmatched: "warn"       # warn | ignore | error
  stamp:
    fields: ["team", "owner", "repo", "lifecycle", "sla_tier"]
    prefix: ""               # e.g. "org." → org.team, org.owner

Non-blocking: stamping is an in-memory dict merge (P6). No vendor SDK (P1) — the HTTP source uses stdlib urllib. Attribution, not control — budget enforcement on these same dimensions is forgesight-governance (feat-020).

License

Apache-2.0

Metadata

Release files for forgesight-registry 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forgesight-registry 0.1.1
File Size Uploaded
forgesight_registry-0.1.1.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forgesight-registry 0.1.1
File Interpreter ABI Platform
forgesight_registry-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / forgesight_registry-0.1.1.tar.gz

Download URL forgesight_registry-0.1.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0212e21df1520eef3c3c2f847744c5c8e0809fb688da4c6d057b4cc8cfd341b4
BLAKE2b-256 checksum
How to use checksums
655f9e8fb475f1cd21b0950c9e33adbe647ab835a47d989907197db1324dc7f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / forgesight_registry-0.1.1-py3-none-any.whl

Download URL forgesight_registry-0.1.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b8a252305b47dd2897d45927ac886df1ac0a5a2f36afb04be4abe24f30977fb
BLAKE2b-256 checksum
How to use checksums
a7ab046bec1b99d248e13c467fe8070e1f6d698a26c7923ac8bf32fadfdbcf13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page