appInstructions() at the start of your model’s system prompt. Your model then describes what Agentcard can do in Agentcard’s own words, and sends every shopping request to the buy tool.
agent.ts
Pass the instructions to your model
Use the string as your system prompt, with the buy tool beside it.buy is the tool you build for the shopper, as the quickstart shows. Its sendLink hands your app each link: a step the shopper opens, such as the one to add a card, and each product or store card, where a flight option carries no URL. Sending each link shows every kind:
agent.ts
appInstructions() tells the model what Agentcard can do for the shopper and how to write.
Say how your app shows text
Passmarkdown: true when your app shows the model’s words as Markdown. A shopper who asks for a table then gets a table. Leave it out when your app shows plain text, such as an SMS chat: the model writes no Markdown and starts each list line with • .
Pass textingStyle: true when your app is a chat that writes in lowercase, the way a person texts. Pass the same value you pass to buyTool, so the model’s words and Agentcard’s read alike.
agent.ts
Add your own lines
Write your own lines after Agentcard’s, and keep them about your app, such as its name or the current date.agent.ts
appInstructions() covers both, and its text changes with each SDK release.
A line of your own that says “no markdown” or “most online stores” contradicts Agentcard’s instructions. The shopper then reads two different answers in one chat.
See what your model reads
Print the string to read it. The block below shows the first lines of a call withmarkdown: true and textingStyle: true.
APP_INSTRUCTIONS_VERSION names the version of the text you run. Log it with each conversation to know which instructions your model had.