Agent Context
How to attach blocks, images, files, and URLs directly to the agent as context within a prompt.
Last updated
Was this helpful?
How to attach blocks, images, files, and URLs directly to the agent as context within a prompt.
Last updated
Was this helpful?
In Warp, you can pass different types of input directly to the agent to guide its behavior and improve response quality. This includes blocks from your terminal output, images, files, code, and public websites.
These inputs are known as agent context: ad hoc pieces of information you manually supply during a session.
This is distinct from other persistent or automatic sources of context, such as Rules, Warp Drive as Agent Mode Context, and Model Context Protocol, which the agent also uses when available.
Warp can gather context from your terminal sessions and tailor every command to your session and environment.
You can supply a block of context to your conversation with Agent Mode as part of your query. From the block in the terminal, click the AI sparkles icon to "Attach as Agent Mode context."
The most common use case is to ask the AI to fix an error. You can attach the error in a query to Agent Mode and type "fix it."
If you're already in Agent Mode, use the following ways to attach or clear context from your query:
Attach a previous block
To attach blocks to a query, you can use CMD-UP
to attach the previous block as context to the query. While holding CMD
, you can then use your UP/DOWN
keys to pick another block to attach.
You may also use your mouse to attach blocks in your session. Hold CMD
as you click on other blocks to extend your block selection.
Clear a previous block
To clear blocks from a query, you can use CMD-DOWN
until the blocks are removed from context.
You may also use your mouse to clear blocks in your session. Hold CMD
as you click on an attached block to clear it.
To provide visual context, you can attach images directly to an agent prompt. This is useful for including screenshots, diagrams, or other visual references alongside your query.
To attach images, use the image upload button found on the toolbelt (either on the bottom left or right), depending on which input mode you're using:
You can attach up to 5 images per request, and up to 20 images across a single conversation. Each image is sent to the model provider and immediately discarded — nothing is stored on Warp's servers.
All supported models listed in Model Choice can interpret image input.
Attaching images will consume additional requests, proportional to the number of images added. To stay within model limits, Warp will intelligently resize images before passing it as context, minimizing token usage and respecting the model's maximum image dimensions.
At this time, all images must be selected from your device; URL attachments, copy-paste, and drag-and-drop are currently not supported but are on the roadmap.
You can attach specific files or folders as context to a prompt using the @ symbol. When you’re inside a Git repository, typing @ opens a context menu that allows you to search for and select files or directories to include.
Attaching context with @ works in both natural language prompts (when interacting with Agents) and classic terminal commands for referencing file paths.
Note that search is always relative to the root of the Git repository, even when you're working in a subdirectory. This means you can reference any file or folder tracked in the repo, regardless of the current working directory.
Additionally, no codebase indexing (via Codebase Context) is required — file search is available immediately in any Git-initialized directory. The search also respects .gitignore
rules and will exclude ignored files from the results.
You can attach a public URL to a prompt to provide website content as context. When a URL is included, the agent will scrape the page and extract relevant information to inform its response.
This feature only works with publicly accessible pages. The full text of the page is sent to the model, which may increase AI request usage depending on the length of the content.
Note: this is not a search feature—the agent does not currently have browsing capabilities or access to real-time web search. Only the specific page you link will be used as context.