Warp documentation
  • Getting Started
    • Quickstart Guide
    • What is Warp?
    • Supported Shells
    • Migrate to Warp
    • Keyboard Shortcuts
    • Changelog
  • Agents
    • Warp AI
    • Using Agents
      • Agent Conversations
      • Agent Context
      • Model Choice
    • Autonomy
      • Agent Permissions
      • Run to completion
    • Code
      • Codebase Context
      • Reviewing Agent Code
    • Active AI
    • Generate
    • Voice
    • AI FAQs
  • Terminal
    • Appearance
      • Themes
      • Custom Themes
      • Prompt
      • Input Position
      • Text, Fonts, & Cursor
      • Size, Opacity, & Blurring
      • Pane Dimming & Focus
      • Blocks Behavior
      • Tabs Behavior
      • App Icons
    • Blocks
      • Block Basics
      • Block Actions
      • Block Sharing
      • Block Find
      • Block Filtering
      • Background Blocks
      • Sticky Command Header
    • Modern Text Editing
      • Alias Expansion
      • Command Inspector
      • Syntax & Error Highlighting
      • Vim Keybindings
    • Command Entry
      • Command Corrections
      • Command Search
      • Command History
      • Synchronized Inputs
      • YAML Workflows
    • Command Completions
      • Completions
      • Autosuggestions
    • Command Palette
    • Session Management
      • Launch Configurations
      • Session Navigation
      • Session Restoration
    • Window Management
      • Global Hotkey
      • Tabs
      • Split Panes
    • Warpify
      • Subshells
      • SSH
      • SSH Legacy
    • More Features
      • Accessibility
      • Files, Links, & Scripts
      • Markdown Viewer
      • Working Directory
      • Smart-Select
      • Full-screen Apps
      • Notifications & Audible Bell
      • Settings Sync (Beta)
      • Quit Warning
      • URI Scheme
      • Linux
    • Comparisons
      • Performance
      • Terminal features
    • Integrations
  • Knowledge & Collaboration
    • Warp Drive
      • Notebooks
      • Workflows
      • Prompts
      • Environment Variables
      • Warp Drive on the Web
      • Warp Drive as Agent Mode Context
    • Model Context Protocol
    • Rules
    • Teams
    • Session Sharing
  • Privacy
    • Privacy
    • Secret Redaction
    • Network Log
  • Community
    • Refer a Friend & Earn Rewards
    • Warp Preview & Alpha Program
  • Support & Billing
    • Sending Feedback & Logs
    • Plans & Pricing
    • Updating Warp
    • Using Warp Offline
    • Logging out & Uninstalling
    • Known Issues
    • Troubleshooting Login Issues
    • Open Source Licenses
Powered by GitBook
On this page
  • Attaching blocks as context
  • Attaching images as context
  • Model behavior and image handling
  • Referencing files and code using @
  • Referencing websites via URLs

Was this helpful?

  1. Agents
  2. Using Agents

Agent Context

How to attach blocks, images, files, and URLs directly to the agent as context within a prompt.

PreviousAgent ConversationsNextModel Choice

Last updated 18 hours ago

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.

Attaching blocks as context

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.

When using "Pin to the top" Input Position, the direction for attaching or detaching is reversed (i.e. CMD-DOWN attaches blocks to context, while CMD-UP clears blocks from context).

Attach a previous block

  • To attach blocks to a query, you can use CTRL-UP to attach the previous block as context to the query. While holding CTRL, you can then use your UP/DOWN keys to pick another block to attach.

    • You may also use your mouse to select blocks in your session. Hold CTRL as you click on other blocks to extend your block selection.

Clear a previous block

  • To clear blocks from a query, you can use CTRL-DOWN until the blocks are removed from context.

    • You may also use your mouse to clear blocks in your session. Hold CTRL as you click on an attached block to clear it.

When using "Pin to the top" Input Position, the direction for attaching or detaching is reversed (i.e. CTRL-DOWN attaches blocks to context, while CTRL-UP clears blocks from context).

Attach a previous block

  • To attach blocks to a query, you can use CTRL-UP to attach the previous block as context to the query. While holding CTRL, you can then use your UP/DOWN keys to pick another block to attach.

    • You may also use your mouse to select blocks in your session. Hold CTRL as you click on other blocks to extend your block selection.

Clear a previous block

  • To clear blocks from a query, you can use CTRL-DOWN until the blocks are removed from context.

    • You may also use your mouse to clear blocks in your session. Hold CTRL as you click on an attached block to clear it.

When using "Pin to the top" Input Position, the direction for attaching or detaching is reversed (i.e. CTRL-DOWN attaches blocks to context, while CTRL-UP clears blocks from context).

Attaching images as context

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:

Warp accepts the following image formats: .jpg , .jpeg , .png , and .gif

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.

Model behavior and image handling

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.


Referencing files and code using @

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.


Referencing websites via URLs

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.

From a block of output, attach the block and ask Agent Mode to remove all untracked files.
Attaching 5 images on the new "Universal" input (bottom left toolbelt)
Attaching 4 images on the "Classic" input (bottom right)
Using the @ symbol to search for and attach a file or folder from the project root.
Filtering files using @app to locate files containing “app” in their name or path.
Referencing a folder or all files within it by typing @styles.