Forum Discussion
Can we create local and global variable in the new copilot studio
Hi Allen,
You’re not missing a setting. In the current new Copilot Studio experience, there isn’t a direct equivalent to the topic-scoped and global variables available in the classic experience.
The new experience uses a different architecture based on agent instructions, skills, tools, and the enhanced orchestration runtime rather than explicit topics and node-based conversation logic. Skills are reusable sets of instructions and behavior, but they aren’t currently exposed as state containers where you can define and reference named local or global variables.
The agent can use the context of the current conversation when reasoning and selecting skills or tools. However, this conversational context shouldn’t be treated as a deterministic replacement for a global variable, especially when a specific value must always be reused or passed to another component.
For values that must be reliably reused across skills and tools, the recommended pattern would currently be to manage the state explicitly through a tool or workflow:
- Collect the required information from the user.
- Store it through an agent flow, connector, API, Dataverse table, or another external data store.
- Use a conversation or user identifier as the key.
- Retrieve the value when another skill or tool requires it.
- Define clear tool inputs and outputs so the orchestrator knows when the stored context should be used.
If your scenario requires deterministic conversation logic and named variables that persist throughout a session, the classic Copilot Studio experience still supports topic and global variables. Global variables in the classic experience are available across all topics and persist for the duration of the user session.
Since the new experience is still in preview and Microsoft notes that some classic capabilities aren’t yet available, this may change as the feature set develops.