Questions

Docs · Questions

LOPsUsage

How do I use the `Context Grabber` LOP to give multiple inputs to an agent?

Goal

This guide explains how to use the Context Grabber LOP to provide complex, multi-modal context to an agent.

Core Concept

The Context Grabber allows you to bundle various sources of information (images, text from DATs, separate typed messages) into a single, structured input for an agent. This is useful when you want the agent to consider multiple pieces of information at once.

Step-by-Step Walkthrough

  1. Start with a basic Agent setup. You’ll need an Agent LOP and a way to send it a prompt (e.g., an Add Message LOP).
  2. Insert the Context Grabber. Place the Context Grabber LOP between your input(s) and the Agent LOP.
  3. Connect Your Context Sources. You can connect multiple sources to the Context Grabber’s inputs:
    • Images: Connect an Image TOP to the Context Grabber.
    • Text Documents: Connect a Text DAT to the Context Grabber.
    • User Prompts: Connect an Add Message LOP to the Context Grabber.
  4. Label Your Inputs. For each input you connect, the Context Grabber will create a new parameter section. In each section, you can specify a Label. This is a short description of what the input is (e.g., “user_request”, “image_to_analyze”, “reference_document”).
  5. Prompt the Agent. Now, you can write a prompt that instructs the agent to use the labeled context. For example:

    “Analyze the provided image_to_analyze and, using the reference_document, describe it in the style of the author. Address your response to the user_request.”

By using the Context Grabber and labeling your inputs, you can create sophisticated, context-aware agents that can handle much more complex tasks.