By default, AgentOps is compatible with agents using LangChain with our LLM Instrumentor as long as they’re using supported models. As an alternative to instrumenting, the LangChain Callback Handler is available.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.
Constructor
api_key(Optional, string): API Key for AgentOps services. If not provided, the key will be read from theAGENTOPS_API_KEYenvironment variable.endpoint(Optional, string): The endpoint for the AgentOps service. Defaults to ‘https://api.agentops.ai’.max_wait_time(Optional, int): The maximum time to wait in milliseconds before flushing the queue. Defaults to 30,000 (30 seconds).max_queue_size(Optional, int): The maximum size of the event queue. Defaults to 100.tags(Optional, List[string]): Tags for the sessions for grouping or sorting (e.g., [“GPT-4”]).
Usage
Install Dependencies
Disable Instrumentation
The Handler and our automatic instrumentation both accomplish the same tasks. To use the Handler, first disable instrumentation. When calling.init(), pass in the proper parameter.
agentops.init(instrument_llm_calls=False)
If you are building an Agent framework or other SDK and adding support for AgentOps, you cannot guarantee that your end user will
properly include instrument_llm_calls=False.

