Replies: 2 comments
-
|
To me, I would think that instructions added directly to the agent = AzureAIClient(
credential=DefaultAzureCredential(),
agent_name="MyAgent",
).as_agent(instructions="You are a helpful assistant.") # <- Agent definition
res = await agent.run("Hello.", options={"instructions": "Reply in uppercase."}) # <- System messageCurrently, the two instructions get concatenated into a single system message, while the agent's instructions in its definition is empty. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Adding @dmytrostruk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to create an agent from
AzureAIClientand pass instructions to the agent?When running the following code, I would expect an Azure AI agent to be created with instructions defined for the agent:
However, what actually happens is that the agent is not created with any instructions, and instead the "instructions" are passed as a system message when the agent is invoked. This has a downside that the same system message will be added on all subsequent invocations using the same thread.
It seems like it's possible to choose this if you use
AzureAIProjectAgentProviderbut not withAzureAIClient.Beta Was this translation helpful? Give feedback.
All reactions