Skip to main content

Evidently AI metrics + drift hook for AgentForge

Project description

agentforge-evidently

Evidently AI agent metrics + drift hook for the AgentForge framework.

Implements the StepHook + FinishHook contracts and registers as agentforge.hooks:evidently.

Installation

pip install agentforge-evidently[evidently]

Usage

from agentforge import Agent
from agentforge_evidently import EvidentlyHook

hook = EvidentlyHook.from_config(
    project="my-agent",
    report_dir="./evidently-reports",
)

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

What gets reported

Per-step records (one row per Step):

Column Source
run_id bound RunContext.run_id
iteration step.iteration
kind step.kind
cost_usd step.cost_usd
tokens_in / tokens_out step.tokens_in / step.tokens_out
duration_ms step.duration_ms
has_tool_call step.tool_call is not None

At finish, the hook appends a run-level row and writes an Evidently Report JSON to <report_dir>/<run_id>.json. The report carries the buffered rows + RunResult.finish_reason + RunResult.cost_usd so an offline analysis pipeline can compute drift / quality metrics across runs.

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_evidently-0.2.4.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

agentforge_evidently-0.2.4-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file agentforge_evidently-0.2.4.tar.gz.

File metadata

  • Download URL: agentforge_evidently-0.2.4.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentforge_evidently-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e08b3e0caeaf76b3064a0dc56b450dfcde62b0321db359685423088f0c5bb318
MD5 4e81d5fac2b45c2fac20964590a241b1
BLAKE2b-256 4bbc96481164aa9160b717fbf8b59b4fad4fad5c6c637ffebd4f69853554ff8f

See more details on using hashes here.

File details

Details for the file agentforge_evidently-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for agentforge_evidently-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2dc63d39c4896d8bf103b6ee85c55b44d8cb062504b4e2e025c492d4523ddeee
MD5 6e1e6e8b86f1af20a7f33b57a8c5e10e
BLAKE2b-256 286b6417df4fa91e3677ea93ddfd71a8c5f2714c99816b244bae88000cee2705

See more details on using hashes here.

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