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
Release history Release notifications | RSS feed
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 agentforge_statsd-0.2.3.tar.gz.
File metadata
- Download URL: agentforge_statsd-0.2.3.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c39c70af3b86842f40ff8e308d2c478f630055cdae24565fbbc0ad40f1ee7f6
|
|
| MD5 |
b2a98688e8bd3bbf01e1a0c74cbb2818
|
|
| BLAKE2b-256 |
1b411dd1436a309146121cba8968fcbffbb922c443e8ec768dd87f353cbfc38a
|
File details
Details for the file agentforge_statsd-0.2.3-py3-none-any.whl.
File metadata
- Download URL: agentforge_statsd-0.2.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ddb39228400e298a054b9e34e7709eaed51028ef903c678c547e8f52e6953c2
|
|
| MD5 |
150a5809304c0de5b8a5b06ad5ccc4ad
|
|
| BLAKE2b-256 |
bc3f3e7a9a015d2a584910355074c0fb2cb4269c73d606caf9fba50a7cd63ac5
|