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
- Start with a basic
Agentsetup. You’ll need anAgentLOP and a way to send it a prompt (e.g., anAdd MessageLOP). - Insert the
Context Grabber. Place theContext GrabberLOP between your input(s) and theAgentLOP. - Connect Your Context Sources. You can connect multiple sources to the
Context Grabber’s inputs:- Images: Connect an
ImageTOP to theContext Grabber. - Text Documents: Connect a
TextDAT to theContext Grabber. - User Prompts: Connect an
Add MessageLOP to theContext Grabber.
- Images: Connect an
- Label Your Inputs. For each input you connect, the
Context Grabberwill create a new parameter section. In each section, you can specify aLabel. This is a short description of what the input is (e.g., “user_request”, “image_to_analyze”, “reference_document”). - 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_analyzeand, using thereference_document, describe it in the style of the author. Address your response to theuser_request.”
By using the Context Grabber and labeling your inputs, you can create sophisticated, context-aware agents that can handle much more complex tasks.