Analytics in under 5 minutes:

4 simple steps:

  1. Import AgentOps
  2. Initialize AgentOps
  3. Patch APIs/Decorate functions
  4. End Session
import openai # Make sure openai is imported before instantiating an AgentOps client.
import agentops

# Beginning of program (i.e. main.py, **init**.py)

ao_client = agentops.Client(<INSERT YOUR API KEY HERE>)

...

# (optional: record specific functions)

@ao_client.record_action('sample function being record')
def sample_function(...):
...

...

# End of program

ao_client.end_session('Success')

# Woohoo You're done 🎉

AgentOps is now set and ready to use. Every OpenAI call you make will now be recorded to the dashboard. Finally, before ending your agent you will need to close your session. end_session can be Success, Fail, or Indeterminate. We suggest setting session state depending on how your agent exits or whether your agent succeeded or not.

We have 2 additional mechanisms for recording data. Namely, function decorators and discrete function calls. We suggest liberal usage of the record_action decorator to get the most out of your sessions.

Get an API key

You can retrieve an API from your account page.

Install the SDK

pip install agentops

Add the AgentOps SDK to your agent in 3 easy steps

That’s all you need to get started! Check out the documentation below to see how you can record other events. AgentOps is a lot more powerful this way!

Explore our more advanced functionality!

Analytics in under 5 minutes:

4 simple steps:

  1. Import AgentOps
  2. Initialize AgentOps
  3. Patch APIs/Decorate functions
  4. End Session
import openai # Make sure openai is imported before instantiating an AgentOps client.
import agentops

# Beginning of program (i.e. main.py, **init**.py)

ao_client = agentops.Client(<INSERT YOUR API KEY HERE>)

...

# (optional: record specific functions)

@ao_client.record_action('sample function being record')
def sample_function(...):
...

...

# End of program

ao_client.end_session('Success')

# Woohoo You're done 🎉

AgentOps is now set and ready to use. Every OpenAI call you make will now be recorded to the dashboard. Finally, before ending your agent you will need to close your session. end_session can be Success, Fail, or Indeterminate. We suggest setting session state depending on how your agent exits or whether your agent succeeded or not.

We have 2 additional mechanisms for recording data. Namely, function decorators and discrete function calls. We suggest liberal usage of the record_action decorator to get the most out of your sessions.

Get an API key

You can retrieve an API from your account page.

Install the SDK

pip install agentops

Add the AgentOps SDK to your agent in 3 easy steps

That’s all you need to get started! Check out the documentation below to see how you can record other events. AgentOps is a lot more powerful this way!

Explore our more advanced functionality!