Multion Examples
Tracking Multion usage with AgentOps
View All Notebooks on Github
MultiOn Tracking Web Browse Actions
Agents using MultiOn can launch and control remote or local web browsers to perform actions and retrieve context using natural language commands. With AgentOps, MultiOn evens such as browse, retrieve, and step are automatically tracked.
Furthermore, events and LLM calls in your Python program will be tracked as well.
First let’s install the required packages
Then import them
Next, we’ll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.
-
Create an environment variable in a .env file or other method. By default, the AgentOps
init()
function will look for an environment variable namedAGENTOPS_API_KEY
. Or… -
Replace
<your_agentops_key>
below and pass in the optionalapi_key
parameter to the AgentOpsinit(api_key=...)
function. Remember not to commit your API key to a public repo!
Tracking MultiOn events with AgentOps
When an agentops_api_key
is provided, MultiOn will automatically start an AgentOps session and record events.
Linking MultiOn events to an existing AgentOps session
When running agentops.init()
, be sure to set auto_start_session=False
. MultiOn will automatically launch AgentOps sessions by default, but by setting auto start to false, you can configure your AgentOps client independently.
Now, we can launch a MultiOn browse event. This event will automatically get added to your AgentOps session.
Let’s use OpenAI to summarize our output
Check your session
Check your session on AgentOps. This session should include the MultiOn browse action and the OpenAI call.