Skip to main content

StatsD metrics emitter hook for AgentForge

Project description

agentforge-statsd

StatsD metrics emitter for the AgentForge framework.

Implements the StepHook + FinishHook contracts on the existing agentforge.hooks entry-point so installing the package makes name: statsd available in modules.observability config blocks.

Installation

pip install agentforge-statsd[statsd]

The [statsd] extra pulls in the statsd>=4.0 Python client. Without the extra, the package is importable but the production factory raises ModuleError with pip remediation.

Usage

from agentforge import Agent
from agentforge_statsd import StatsdHook

hook = StatsdHook.from_config(
    host="statsd.internal",
    port=8125,
    prefix="agentforge.pr-reviewer",
)

agent = Agent(
    model="bedrock:...",
    on_step=hook,
    on_finish=hook,
)

Metrics emitted

Metric Type When
<prefix>.step.<kind> counter +1 every step
<prefix>.step.duration_ms timing every step with duration_ms > 0
<prefix>.tool.<name> counter +1 every step with tool_call
<prefix>.run.finish.<reason> counter +1 on run finish
<prefix>.run.duration_ms timing on run finish
<prefix>.run.cost_usd gauge on run finish
<prefix>.run.tokens_in gauge on run finish
<prefix>.run.tokens_out gauge on run finish

License

Apache-2.0.

Project details


Download files

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

Source Distribution

agentforge_statsd-0.4.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

agentforge_statsd-0.4.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file agentforge_statsd-0.4.0.tar.gz.

File metadata

  • Download URL: agentforge_statsd-0.4.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentforge_statsd-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e3686b432e34f16ba6205a2cb5952a7c92575e313a9798b89d427bd94dd51e40
MD5 1ac6b7ec04f0890870225cd894254561
BLAKE2b-256 c4bd8a94bee238fae11fd9148500a98a15b6f0fc9e79c188faec1c8e5c8684b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_statsd-0.4.0.tar.gz:

Publisher: release.yml on Scaffoldic/agentforge-py

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

File details

Details for the file agentforge_statsd-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentforge_statsd-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a1c8584d0122761d846b5b4a4bc3439f62862499f22e11eed20e498aed2d3eb
MD5 3c640f51bad8e9baaddff730c5c975fd
BLAKE2b-256 40d1506e50adbfb3d75b5711ee38c482a56b406d10f3ff8e1a94eedd49209df0

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_statsd-0.4.0-py3-none-any.whl:

Publisher: release.yml on Scaffoldic/agentforge-py

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

Supported by

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