instrument-python
Installation
SKILL.md
Instrument Python Agents
Prerequisite: pip install opik && opik configure (get API key)
1. Add @opik.track
import opik
@opik.track(entrypoint=True, name="my-agent")
def agent(query: str) -> str:
"""Run the agent.
Args:
query: The user's question.
"""
context = retrieve(query)
return generate(query, context)