prompt

Sets or extends the prompt that the next llm command sends. Prompts live in the conversation, so the next run remembers what the previous run said.

Fields

FieldTypeDefaultDescription
namestring"default"Agents can use several prompts, each kept in the conversation. Leave unset unless the agent uses more than one.
profileprofile nameAn existing prompt profile.
systemdynamic stringThe system prompt. Usually set once per conversation.
userdynamic stringThe user prompt. Can be set multiple times; values set before an LLM call are merged into a single string.

How prompts accumulate

A prompt has a system part and a history of user turns, assistant answers and tool results. system replaces the system part. user is appended to the current user turn. Several prompt commands before one llm call are merged into a single user message. After the LLM answers, the answer is appended too, so a follow-up query in the same conversation carries the whole exchange.

A prompt profile supplies the system and user text from the configuration. Values given on the command override the profile's values. The two differ in kind: system and user on the command are dynamic strings, evaluated at runtime and stored in plain form with the agent, while a profile's prompts are static text stored encrypted. A prompt that must stay confidential belongs in a profile; a prompt that changes at runtime belongs on the command.

Example

"prompt": {
  "system": "You are a weather assistant. Answer in under 200 words.",
  "user": "{ f'I live in {location['city_name']}. The forecast: {' '.join(lines)}' }"
},
"prompt.query": {
  "user": "{ sys.query }"
},
"llm": { "profile": "gpt5_mini" }

Images

user may also be a content part, or a list of content parts. An image reaches a vision model as a content part:

"prompt": {
  "user": "{ [ {'contentType': 'image', 'contentBase64': sys.inputs['photo'], 'mimeType': 'image/png'}, {'contentType': 'text', 'text': 'What is in this picture?'} ] }"
}

Rules

  • Leave name unset unless the agent needs more than one prompt, for example one prompt for classification and another for the answer. An llm command names the prompt to use in its prompt field.
  • Set the system prompt once, typically on the first run of a conversation. A common pattern is an if on an agent variable that marks initialization as done.
  • A prompt that an llm command is using cannot be used by a nested agent or a tool function at the same time. Those are worth giving their own prompt name.