Edit

Share via


Instruction keywords for an agent (preview)

[This article is prerelease documentation and is subject to change.]

Important

  • This is a preview feature.

  • Preview features aren't meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.

  • This article is primarily intended for product owners, domain experts, consultants, and developers who want to experiment with AI capabilities in Business Central using the Agent playground.

When writing instructions for your agent, you can use specific keywords and phrasing to help the agent understand how to utilize the tools available in the agent runtime effectively. These keywords guide the agent's behavior, ensuring it follows best practices and handles tasks as intended.

Learn more about what instructions and tasks are in Write effective instructions for an agent (preview).

Agent history

Similar to a chat completion API, the agent retains a history of all actions that took place in the current session. This history helps the agent understand the context of the conversation and make informed decisions based on previous interactions. The agent stores:

  • Every action performed by the agent.
  • Any search run on a list page, along with the results returned.

The agent doesn't store:

  • The state of every page it visited. To do this, you must explicitly instruct the agent to save the state.

Common instruction keywords

Here are some common keywords and phrases you can use in your agent's instructions:

Keyword/Phrase Description Example
Ask for assistance Instructs the agent to seek help if needed during task execution. "If you encounter an error, then ask for assistance."
Request a review Instructs the agent to ask for a review of its work before finalizing. The task will continue after the user confirms. "When the sales order is created, request a review before posting."
Reply Instructs the agent to respond to a message or query. Note: All outgoing messages require a review. "When the sales order is created, reply with the confirmation."
Write an email Instructs the agent to compose and send an email. All outgoing messages require a review. "When the sales order is created, write an email to the customer with the confirmation."
Memorize Instructs the agent to store specific values. These values can later be referenced. "Memorize the customer's credit limit for future reference."
Set field Instructs the agent to set a specific field value. "Set the 'Status' field to 'Approved'."
Use lookup Instructs the agent to use a specific lookup. "Use lookup to select the appropriate payment terms."
Invoke action Instructs the agent to invoke a specific action. "Invoke the 'Post' action to finalize the sales order."

Overview (preview)
Agent playground (preview)
Create and activate (preview)
Instruction keywords (preview)
Integrate with the Tasks AL API (preview)
Set up permissions and profiles (preview)
Run a playground agent (preview)
Iterate and manage (preview)
Best practices (preview)
Create a Sales Validation Agent (preview)
Transparency note: Business Central agent playground