When developing agents in Copilot, we often need the agent to be aware of certain information before a conversation even begins.

For example:

  • Knowing which application is invoking it.
  • Identifying the client using the system.
  • Receiving a user identifier.
  • Adapting behavior based on language or environment.

A very practical way to achieve this is by passing variables directly via the URL.

This functionality can open many possibilities for creating much more dynamic experiences.

How does it work?

The idea is simple: when invoking our agent, we add parameters to the URL.

For example:

https://miagente.com?user=123&company=contoso&language=es

In this case, we are sending three parameters to the agent:

  • user
  • company
  • language

These values can be used within the conversational flow to personalize the experience.

To allow the agent to receive these values, we must create the parameters as global variables and select the option to allow them to be modified externally.

A simple way to send context to your Copilot agent: URL parameters Axazure

What are the advantages?

Personalization from the first moment

The agent receives context before the user types anything, allowing responses to be adapted immediately

Reuse the same agent

Instead of creating multiple agents for different scenarios, we can use one and modify its behavior based on the received parameters.

Example

Let’s imagine an internal support portal featuring an agent, where we want the agent propose different support options depending on the authenticated user.

We could generate the URL by passing parameters such as:

https://miagente.com?departmento=IT&nivel=premium

When the agent starts, it already knows the context it is in and can adjust the conversation by offering various functionalities.

A simple way to send context to your Copilot agent: URL parameters Axazure

Do you want to share?