> ## 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.

# MultiOn

> AgentOps and MultiOn have collaborated to simplify the monitoring of autonomous browser agents.

[MultiOn](https://www.multion.ai) is a platform for building autonomous agents.

## Adding AgentOps to MultiOn agents

<Steps>
  <Step title="Install MultiOn">
    <CodeGroup>
      ```bash pip theme={null}
      pip install -U multion
      ```

      ```bash poetry theme={null}
      poetry add multion
      ```
    </CodeGroup>
  </Step>

  <Step title="Create your API keys">
    * Create an [AgentOps API key](https://app.agentops.ai/settings/projects)
    * Create a [MultiOn API key](https://app.multion.ai/api-keys)
  </Step>

  <Step title="Create a MultiOn client with an AgentOps key">
    <Note>
      Make sure to call `agentops.init` before calling any `openai`, `cohere`, `crew`, etc models.
    </Note>

    <CodeGroup>
      ```python python theme={null}
      import multion
      from multion.client import MultiOn

      # Initialize MultiOn with both a MultiOn API key and an AgentOps API key
      multion = MultiOn(
      	api_key=<INSERT YOUR MULTION API KEY HERE>,
      	agentops_api_key=<INSERT YOUR AGENTOPS API KEY HERE>
      )

      browse_response = multion.browse(
      	cmd="what three things do i get with agentops",
      	url="https://www.agentops.ai/",
      	max_steps=4,
      	include_screenshot=True
      )

      	print(browse_response.message)
      ```
    </CodeGroup>

    <Tip>
      Set your API key as an `.env` variable for easy access.
    </Tip>
  </Step>

  <Step title="Run your agent">
    Execute your program and visit [app.agentops.ai/drilldown](https://app.agentops.ai/drilldown) to observe your MultiOn Agent! 🕵️

    <Tip>
      After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard
    </Tip>

    <div />

    <Frame type="glass" caption="Clickable link to session">
      <img height="200" src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/agentops-multion-browse.gif?raw=true" />
    </Frame>
  </Step>
</Steps>

## Full Examples

You can view several example notebooks [here](https://github.com/AgentOps-AI/agentops/tree/main/examples/multion):

* [Sample web browser agent using only MultiOn](https://github.com/AgentOps-AI/agentops/blob/main/examples/multion_examples/Autonomous_web_browsing.ipynb)
* [Combining a MultiOn agent with other LLMs calls](https://github.com/AgentOps-AI/agentops/blob/main/examples/multion_examples/Autonomous_web_browsing.ipynb)
* [Step-by-step tracking of browse events](https://github.com/AgentOps-AI/agentops/blob/main/examples/multion_examples/Step_by_step_web_browsing.ipynb)
* [Collecting data from a web page using the retrieve API](https://github.com/AgentOps-AI/agentops/blob/main/examples/multion_examples/Webpage_data_retrieval.ipynb)

<script type="module" src="/scripts/github_stars.js" />

<script type="module" src="/scripts/scroll-img-fadein-animation.js" />

<script type="module" src="/scripts/button_heartbeat_animation.js" />

<script type="css" src="/styles/styles.css" />

<script type="module" src="/scripts/adjust_api_dynamically.js" />
