Using the built-in @request variable

Last updated: July 29, 2026

Overview

Every custom agent has a special, built-in variable called @instance. It automatically points to whichever request or workflow instance the agent is currently running in, so you can pull in that request's context without any manual setup.

How it behaves

  • @instance is present by default in every agent. It shows up in the Variables panel on the Build tab with a lock icon — it can't be deleted or overridden by a variable you create with the same name.
  • It also appears in the @ picker under Variables, so you can insert it into your instructions.
  • When the agent runs as a step inside a workflow, @instance automatically resolves to that request.
  • When the agent is run standalone (outside a workflow, e.g. from Copilot), you'll be prompted to supply a request ID before it runs.

Referencing it

@instance does not support dot notation — you can't reference a specific field like @instance.organization. Instead, call it out in plain language within your instructions and let the agent reason over its contents, for example:

  • “Summarize all comments in @instance.”
  • “Summarize the approvals on @instance.”