pip install traceAI-portkey==0.1.4 Copy PIP instructions
This is a simple example of how to use TraceAI's Portkey Instrumentation.
pip install portkey_ai traceai_portkey Register a new project with the auto instrumentor with the Portkey client.
from dotenv import load_dotenv from portkey_ai import Portkey from traceai_portkey import PortkeyInstrumentor from fi_instrumentation import register from fi_instrumentation.fi_types import ProjectType, EvalTag, EvalTagType, EvalSpanKind, EvalName, ModelChoices # Load API keys from .env file load_dotenv() # --- Configure Future AGI Tracing Once --- tracer_provider = register( project_name="My-AI-App", eval_tags=[ EvalTag( type=EvalTagType.OBSERVATION_SPAN, value=EvalSpanKind.LLM, eval_name=EvalName.CONTEXT_ADHERENCE, custom_eval_name="Response_Quality" ) ] ) # Instrument the Portkey client PortkeyInstrumentor().instrument(tracer_provider=tracer_provider) # --- Your application logic remains the same! --- client = Portkey(virtual_key="your-portkey-virtual-key") completion = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Write a 6-word story about a robot who discovers music."}] ) print(completion.choices[0].message.content) Project links Data verified by PyPI on Nov 12, 2026 Data provided by the project maintainers, verified at the time the release was uploaded to PyPI. Changelog Issues Repository Documentation Homepage Key dates PyPI data Data sourced directly from PyPI's database. Released: Nov 12, 2026 Latest release Owner PyPI data Data sourced directly from PyPI's database. Future AGI Credits Author: Future AGI
Both files in this release have provenance metadata.
traceai futureagi opentelemetry tracing observability llm portkey
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




