Agent settings define the agent’s identity and behavioral rules.
They live in agent_settings/ and are made up of persona and rules resources.
The persona is platform-provisioned — update onlyThe persona resource is created automatically by the platform when a project is created. It always exists on any Agent Studio project and can be updated with
poly push, but cannot be created from scratch via the ADK. If persona.txt appears in a project directory without a matching entry in .agent_studio_config — for example, after copying a directory from another project — the push will fail with a “Create operation not supported” error. Always start a new project with poly init and poly pull rather than copying an existing directory.Location
Agent settings live under:What agent settings control
Persona
Describes who the agent is, in free text.
Rules
Provides plain-text instructions the agent should follow on every turn.
Guardrails
Platform and custom checks that constrain agent behavior at runtime.
Languages
Configures the default language and any additional languages the agent supports.
Safety filters
Project-level content safety filtering across four categories.
Experimental config
Optional advanced feature flags and tuning.
Persona
Thepersona.txt file is a free-text description of who the agent is. It is the single field that defines the agent’s identity, and it is what the Role field in Agent Studio edits.
Supported references
These are the same two the personality and role settings accepted, so the persona can vary per variant or per call. Behavioral references such as
{{fn:}} and {{ho:}} belong in rules.txt.
Example
Derived personas
A project that predates the persona and has never had one authored still pulls apersona.txt: the platform derives its content from the project’s old personality and role settings, without storing it. Because poly push only sends resources whose contents have changed, an untouched file is never pushed back.
Editing persona.txt and pushing authors a real persona. From that point the content is fixed and no longer derived.
Rules
Therules.txt file contains plain-text behavioral instructions that the agent should follow on every turn.
This is one of the most important files for shaping agent behavior.
Supported references
The rules file supports the following references:Example
Writing effective rules
Rules are most useful when they are:- concise
- explicit
- actionable
- stable across turns
What not to put in rules
Avoid putting deterministic branching logic intorules.txt.
Avoid
- long conditional logic chains
- step-by-step routing logic
- hard-coded values that should come from references
Prefer
- references such as
{{fn:...}},{{attr:...}}, and{{vrbl:...}} - concise instructions that apply broadly
- deterministic logic handled in code or flow transitions
Guardrails
The optionalguardrails.yaml file configures platform and custom guardrails — runtime checks that constrain what the agent can say or do.
See the Guardrails reference for full field descriptions, validation rules, and examples.
Languages
The optionallanguages.yaml file configures which languages the agent supports. When present, it defines the default language and any additional languages.
See the Languages reference for full field descriptions, validation rules, and examples.
Safety filters
Thesafety_filters.yaml file configures project-level content safety filtering. It controls whether harmful content is filtered across all channels by default.
See the Safety filters reference for field descriptions, schema, and examples.
Best practices
- keep rules concise and actionable
- use references instead of hard-coded values
- keep the persona focused on who the agent is, and leave what it should do to the rules
- treat rules as a global behavioral layer, not a place for detailed flow logic
Related pages
Functions
Learn how referenced global functions are defined and used.
Guardrails
Configure platform and custom guardrails that constrain agent behavior.
Languages
Configure default and additional language settings for the agent.
Translations
Define localized text strings per language.
Safety filters
Configure content safety filtering at the project and channel level.
Experimental config
Configure optional advanced features and runtime overrides.

