Skip to main content

agentforge-langfuse

Langfuse trace dashboard hook for the AgentForge framework.

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

Installation

pip install agentforge-langfuse[langfuse]

The [langfuse] extra pulls in the langfuse>=2.0 SDK. Without it, the production factory raises ModuleError with pip remediation.

Usage

from agentforge import Agent
from agentforge_langfuse import LangfuseHook

hook = LangfuseHook.from_config(
    public_key="pk-lf-...",
    secret_key="sk-lf-...",
    host="https://cloud.langfuse.com",
    trace_name_prefix="agentforge.pr-reviewer",
)

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

Trace shape

  • One trace per run, opened on the first step (keyed by run_id).
  • One span per step (name = "step:<kind>").
  • A nested span per tool_call (name = "tool:<name>").
  • Two scores on finish: cost_usd and duration_ms.
  • The trace is flush()-ed at finish so it lands in the dashboard without waiting for the SDK's batch interval.

License

Apache-2.0.

Metadata

Release files for agentforge-langfuse 0.4.0

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

Source distribution (sdist)

Source distribution for agentforge-langfuse 0.4.0
File Size Uploaded Provenance Actions
agentforge_langfuse-0.4.0.tar.gz 11.0 kB With provenance Details for agentforge_langfuse-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentforge-langfuse 0.4.0
File Interpreter ABI Platform Actions
agentforge_langfuse-0.4.0-py3-none-any.whl Python 3 none any Details for agentforge_langfuse-0.4.0-py3-none-any.whl

Total release size: 22.1 kB

Release files / agentforge_langfuse-0.4.0.tar.gz

Download URL agentforge_langfuse-0.4.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3d40e7189b015c40069b110a12804e0f0d11fb45ffaa549c286ee498d3b6f371
BLAKE2b-256 checksum
How to use checksums
d7a92231a896eeacbfbec7b4d28bb338ede9a54fb3c393a26d9cde0884c29139
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / agentforge_langfuse-0.4.0-py3-none-any.whl

Download URL agentforge_langfuse-0.4.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82ef3873066a6347655f9568296a77d9353d38d64355b7e2b582f792570b319d
BLAKE2b-256 checksum
How to use checksums
3a77d6c5668e49f554e3dafdd3b9afc987d58f63685c16ca0d404b8a7911f2f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Security for agentforge-langfuse 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentforge_langfuse-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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