Documentation Index
Fetch the complete documentation index at: https://docs.agentops.ai/llms.txt
Use this file to discover all available pages before exploring further.
LiteLLM allows tracking 100+ LLMs with AgentOps. Checkout the providers supported by LiteLLM.
Visit the LiteLLM docs for more information.
Using AgentOps with LiteLLM
Install LiteLLM
AgentOps supports litellm>=1.3.1
Initialize AgentOps and use LiteLLM in your code
AgentOps requires a minor adjustment to how you call LiteLLM. This is because of other existing integrations that use the completion function.
import agentops
import litellm
agentops.init(<INSERT YOUR API KEY HERE>)
# Some code here...
response = litellm.completion(model="gpt-4o", messages=messages)
# Some code here...
agentops.end_session('Success')
Set your API key as an .env variable for easy access.
AGENTOPS_API_KEY=<YOUR API KEY>
Read more about environment variables in Advanced ConfigurationRun your Agent
Execute your program and visit app.agentops.ai/drilldown to observe your Agent! 🕵️After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard
Full Examples
An example notebook is available here.