Sub topic 4
Configuration and system settings
This chapter assumes you have read the anatomy chapter and know that an Agent Script file is made of named blocks. It also assumes you can read indentation-based syntax such as YAML. Here you look at the two blocks that apply to the whole agent: the configuration block and the system block.
Two blocks, two jobs
Topics and variables describe what the agent does and remembers. The configuration and system blocks describe the agent itself.
- The configuration block holds facts about the agent as a deployable thing, such as its name and the user identity it runs as.
- The system block holds the agent-wide prompt text. This includes the base instructions the model sees in every topic and the fixed messages the agent says at set moments.
Neither block contains conversation logic. Nothing in them branches on state or routes a request. That work belongs to topics, conditions and transitions.
A sketch of both blocks
The sketch below shows the usual shape. Key names can differ between Agent Script releases, so check them against the current documentation before you copy them.
# Illustrative sketch: agent-wide settings.
config:
agent_name: "OrderSupportAgent"
description: "Answers questions about existing customer orders"
system:
instructions: "You are a support agent for order questions. Be concise and polite."
messages:
welcome: "Hi, I can help with your order. What do you need?"
error: "Sorry, something went wrong. Please try again."Read the sketch in two parts.
configidentifies the agent. The name and description are metadata about the agent. They do not change how the agent answers a question.systemcarries text.instructionsis the base prompt, andmessagesholds lines the agent says at fixed moments.
What the system block really controls
The system instructions are still prompt text, and the model still reads them probabilistically. The system block is not a place to enforce rules. A line such as "Never refund more than 100 dollars" is a request to the model, not a guarantee.
Use the system block for things that are true in every topic:
- The agent's role and tone.
- The scope of the whole agent, such as "only discuss orders".
- Language or formatting preferences.
Put anything that must hold at a specific step in that topic's instructions, guarded by a condition. Put anything that must hold every time in logic the script runs, not in prose.
The fixed messages are more reliable than the base instructions. The welcome and error messages are written by you. The model does not compose them, so the customer sees the same words every time.
Common mistakes
| Mistake | Effect | Fix |
|---|---|---|
| Putting topic-specific rules in `system` | Every topic receives text that only fits one of them, which dilutes the prompt | Move the rule into that topic's instructions |
| Writing a long policy in `system` and treating it as enforced | The model may skip it in some conversations | Check the condition in script logic |
| Treating `config` values as prompt text | Changing the name or description does not change the agent's answers | Change behaviour through `system` or topics |
| Copying key names from an old example | The script may fail to load | Verify against current documentation |
Keeping the system block small
A short system block works better than a long one. Each topic adds its own instructions to the base text, so a long base prompt competes with them. A good test is to read each sentence and ask whether it is true in every topic. If it is not, move it.
Exercise
A teammate puts "Always ask for the order number before answering" in the system instructions. Why is this a weak place for that rule, and where should it go instead?
Show answer
System instructions are prompt text the model may ignore, and they apply to every topic, including ones that never need an order number. The rule should go in the order topic's instructions as a condition, such as an if/else on the order number variable, so the script decides whether the model is told to ask.