Skip to main content

LlamaIndex callback handlers for the Grafana Agent Observability Python SDK

Project description

Sigil Python Framework Module: LlamaIndex

agento11y-llamaindex provides callback handlers that map LlamaIndex workflow/agent events into Sigil generation recorder lifecycles.

Installation

pip install agento11y agento11y-llamaindex
pip install llama-index

Quickstart

from agento11y import Client
from agento11y_llamaindex import with_agento11y_llamaindex_callbacks

client = Client()
config = with_agento11y_llamaindex_callbacks(None, client=client, provider_resolver="auto")
# query_engine = index.as_query_engine(callback_manager=config["callback_manager"])

Native callback manager wiring

from agento11y import Client
from agento11y_llamaindex import with_agento11y_llamaindex_callbacks

client = Client()
config = with_agento11y_llamaindex_callbacks(None, client=client, provider_resolver="auto")
# query_engine = index.as_query_engine(callback_manager=config["callback_manager"])

Conversation mapping

Conversation ID precedence:

  1. conversation_id / session_id / group_id
  2. thread_id
  3. fallback agento11y:framework:llamaindex:<run_id>

Metadata and lineage

  • Required: agento11y.framework.run_type
  • Optional lineage: agento11y.framework.run_id, agento11y.framework.thread_id, agento11y.framework.parent_run_id, agento11y.framework.component_name, agento11y.framework.retry_attempt, agento11y.framework.event_id

Provider resolver

Model prefix inference:

  • gpt-/o1/o3/o4 -> openai
  • claude- -> anthropic
  • gemini- -> gemini
  • fallback custom

Troubleshooting

  • Reuse stable workflow/session IDs to keep conversation grouping stable.
  • Keep capture_inputs/capture_outputs enabled while validating mappings.
  • Call client.flush() at checkpoints and client.shutdown() on exit.

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

agento11y_llamaindex-0.10.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

agento11y_llamaindex-0.10.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file agento11y_llamaindex-0.10.0.tar.gz.

File metadata

  • Download URL: agento11y_llamaindex-0.10.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for agento11y_llamaindex-0.10.0.tar.gz
Algorithm Hash digest
SHA256 bc2ec29fdd32c57225a9245c31cbeebea4db34407512365713a7bd63cbe3fae6
MD5 d259bec931bf029e47b5e1e3b9502582
BLAKE2b-256 22644e069320e12c8ac017e6456ce0e707befbc6e35c0d27d5b47642fa64844f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agento11y_llamaindex-0.10.0.tar.gz:

Publisher: python-sdks-publish.yml on grafana/agento11y

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

File details

Details for the file agento11y_llamaindex-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agento11y_llamaindex-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a6b3ed3fc4baf5176836b61a8a934aab376b7510377914099258f756e334ded
MD5 9dd0c523932bad3261c1e0bb810f4a71
BLAKE2b-256 f1a97b05b0b61470275036b900aeb91dfa0b9a70871cdd46675d6daca3028ea3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agento11y_llamaindex-0.10.0-py3-none-any.whl:

Publisher: python-sdks-publish.yml on grafana/agento11y

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