All functions and classes exposed in the top layer of the SDK
import agentops
init()
api_key
(str, optional): API Key for AgentOps services. If not provided, the key will be read from the AGENTOPS_API_KEY
environment variable.endpoint
(str, optional): The endpoint for the AgentOps service. Defaults to ‘https://api.agentops.ai’.max_wait_time
(int, optional): The maximum time to wait in milliseconds before flushing the queue. Defaults to 30,000 (30 seconds).max_queue_size
(int, optional): The maximum size of the event queue. Defaults to 100.tags
(List[str], optional): Tags for the sessions for grouping or sorting (e.g., [“GPT-4”]).override
(bool, optional): [Deprecated] Use instrument_llm_calls
instead to decide whether to instrument LLM calls and emit LLMEvents.instrument_llm_calls
(bool): Whether to instrument LLM calls and emit LLMEvents.auto_start_session
(bool): Whether to start a session automatically when the client is created. You may wish to delay starting a session in order to do additional setup or starting a session on a child process.inherited_session_id
(str, optional): When creating the client, passing in this value will connect the client to an existing session. This is useful when having separate processes contribute to the same session.skip_auto_end_session
(bool, optional): If you are using a framework such as Crew, the framework can decide when to halt execution. Setting this parameter to true will not end your agentops session when this happens.start_session()
tags
(List[str], optional): Tags for the session.config
(Config, optional): Client configuration object.inherited_session_id
(str, optional): Session ID to continue from an existing session.end_session()
end_state
(str): The final state of the session. Options: Success, Fail, or Indeterminate.end_state_reason
(str, optional): The reason for ending the session.video
(str, optional): URL to a video recording of the session.record()
event
(Union[Event, ErrorEvent]): The event to record.get_api_key()
Config
api_key
(str, optional): API Key for AgentOps services. If not provided, the key will be read from the AGENTOPS_API_KEY
environment variable. If no key is found, a ConfigurationError
is raised.endpoint
(str, optional): The endpoint for the AgentOps service. If not provided, the endpoint will be read from the AGENTOPS_API_ENDPOINT
environment variable. Defaults to ‘https://api.agentops.ai’.max_wait_time
(int, optional): The maximum time to wait in milliseconds before flushing the queue. Defaults to 30000.max_queue_size
(int, optional): The maximum size of the event queue. Defaults to 100.LangchainCallbackHandler