> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity Monitor Lens

> Learn how to use the Activity Monitor lens with video files in the workbench.

The **Activity Monitor Lens** analyzes camera data to identify the activities, movements, or events occurring within a scene. Use the [Activity Monitor lens](/core-concepts/lenses/lens-templates/activity-monitor) to analyze objects, activities, and concepts through video data.

<Note>
  While the APIs work with both pre-recorded and live videos, the workbench only works with pre-recorded video files.
</Note>

## 1. Access the Workbench

<Steps>
  <Step title="Login to Console">
    Use your API key and log into the [Console](https://console.u1.archetypeai.app/workbench). Click on "Workbench" in the navigation bar.
  </Step>
</Steps>

<Info>
  Make sure you have an active API key for the Archetype platform, and you're able to log in to the console. If you have any problems, please contact [support@archetypeai.dev](mailto:support@archetypeai.dev).
</Info>

## 2. Select a Lens

In the Workbench, the Lens name appears at the bottom of the screen. Click the name to open a tray showing all lenses available to your organization.

<Steps>
  <Step title="Select the Lens">
    Select the lens named "Activity Monitor" from the lens tray.
  </Step>
</Steps>

## 3. Upload Your Video

The Workbench works with pre-recorded .mp4 video files for analysis.

<Steps>
  <Step title="Download Sample Video ">
    Download our sample dashcam video to follow along: [Ring\_Dashcam\_Traffic.mp4](https://drive.google.com/file/d/142EXjAriJq7_WVZlTVzvhVTv8aB8q_UQ/view?usp=drive_link). Or upload your own video file using the file selection in the top right of the input panel.
  </Step>
</Steps>

<Warning>
  Only MP4 video files under 255MB are currently supported. Other formats will not work.
</Warning>

## 4. Set Your Focus and Instructions

Configure how the Activity Monitor lens analyzes your video by setting focus and providing custom instructions.

<Steps>
  <Step title="Set Instructions" stepNumber={1}>
    In the instructions field, copy and paste these instructions for the Ring video analysis:

    ```
    You are an intelligent dashcam attached to the front of a car, looking for safety hazards
    to keep your driver safe. This includes reckless driving and debris in the road such as
    car parts. ONLY when you see something hazardous or unsafe, respond with a notification
    in the following format {Alert: Description of safety hazard}. Do not include brackets
    in your message. Respond in less than 8 words.
    ```

    You can also customize the Instructions to fit your use case—for example, by asking Newton to focus on specific aspects or answer targeted questions. For details on advanced parameters, see the [**Activity Monitor Lens**](https://docs.archetypeai.app/core-concepts/lenses/lens-templates/activity-monitor) section in Core Concepts.
  </Step>

  <Step title="Add Focus">
    Type your focus in the bottom input bar. **Focus** is a runtime control that allows you to narrow analysis to specific behaviors or conditions.

    For the Ring\_Dashcam\_Traffic video, try the focus of **"safety hazards".**

    <img src="https://mintcdn.com/archetypeai-bd6fb3cf/jd-q8G-hUHcB-oBu/images/focus_safety_hazards.png?fit=max&auto=format&n=jd-q8G-hUHcB-oBu&q=85&s=0d17cd18ce5101fd0eaf21e8a08bd75d" alt="Focus Safety Hazards" width="1262" height="324" data-path="images/focus_safety_hazards.png" />
  </Step>

  <Step title="Set Temporal Focus" stepNumber={3}>
    Temporal focus is a parameter in the workbench that controls frame sampling across time windows.

    **Change the temporal focus from 5 to 1**, which is the window in seconds for analysis. This determines how frequently the lens samples frames from your video for analysis.

    <img src="https://mintcdn.com/archetypeai-bd6fb3cf/40dQefON8sbDom55/images/temporal_focus_dashcam.png?fit=max&auto=format&n=40dQefON8sbDom55&q=85&s=a9f63c05bd6cc0c1bb388453425ee331" alt="Temporal Focus Dashcam" width="1228" height="232" data-path="images/temporal_focus_dashcam.png" />
  </Step>
</Steps>

## 5. Start Your Session and View Results

<Steps>
  <Step title="Run Session">
    Begin the analysis by clicking the arrow button in the bottom right of the screen to start the session. The session will begin processing your video with the selected lens and focus.
  </Step>

  <Step title="View Results">
    Once the session is running, you'll be able to see output from the lens within the output panel. Click a message to view its corresponding video segment. A pill expands with a looping playhead. Click the video to close the pill and return to the main view. The output text will look something like this:

    <CodeGroup>
      ```text Example Output theme={"system"}
      [00:00:06] No visible hazards detected. Safe driving ahead.
      [00:00:07] No visible hazards detected at this moment.
      [00:00:08] Alert: Tire on road ahead.
      ```
    </CodeGroup>
  </Step>
</Steps>

## Access Developer Logs (Optional)

For debugging and detailed analysis, you can view the log panel above the focus bar.

<img src="https://mintcdn.com/archetypeai-bd6fb3cf/r39eb2KSqHAM3IBc/images/session_logs.png?fit=max&auto=format&n=r39eb2KSqHAM3IBc&q=85&s=51cd952702ca2c7d99ce963ae170616e" alt="Session Logs" width="2888" height="430" data-path="images/session_logs.png" />

<Check>
  Congratulations! You've successfully run your first Workbench session without writing any code.
</Check>

## Optional: Try Variations

Using the same video (or a [starter video](https://drive.google.com/drive/folders/1iAT42EUpCEMj_sFvHvRAtJBTqSF_Jn-u?usp=drive_link)), experiment with how Lens parameters affect the output:

* **Change Focus** to `Vehicles` and observe the difference.
* **Edit Instructions** using the template below and see how behavior and output change (*A prompt best practices section is coming soon)*:

  ```
  Role:
  You are a smart camera monitoring a conveyor belt in a manufacturing facility.

  Objective:
  Detect complete work stoppages that require human intervention.

  Output:
  Return alerts in the following format:
  ALERT: <reason in 5–7 words>
  ```
* **Adjust Temporal Focus** to `2` or `20` to compare shorter vs. longer time windows.

Learn more in the [**Activity Monitor Lens**](https://docs.archetypeai.app/core-concepts/lenses/lens-templates/activity-monitor) section of Core Concepts.

## Learn More

<CardGroup cols={2}>
  <Card title="Quickstart" icon="terminal" href="/introduction/getting-started">
    Try a quickstart tutorial in the terminal to get started with video.
  </Card>

  <Card title="Lens API Reference" icon="code" href="/api-reference/lens">
    Ready to integrate Newton into your application? Explore the Lens API documentation
  </Card>
</CardGroup>
