Overview
You can provide instructions to Poolside agents from one or more of these sources. Poolside applies them in the following order:| Source | Location | Use it to define |
|---|---|---|
| 1. Agent instructions | Saved managed agent in Poolside Console | What the agent does, including its role, tasks, and purpose |
2. AGENTS.md in the current directory | Current directory | How the agent works in this part of your codebase, including rules, constraints, and directory-specific context |
3. AGENTS.md in parent directories | Parent directories to repository root | How the agent works across broader parts of your codebase, including rules, constraints, and project context |
4. .poolside | Your machine | Personal preferences for all your projects |
AGENTS.md and .poolside files.
Because agent behavior is not deterministic, responses do not always reflect the order above perfectly.
How to set up instructions
For most teams, the best place to start is anAGENTS.md file at the root of the repository.
- Add an
AGENTS.mdfile at the root of your repository. Include a few clear rules about project structure, coding conventions, and common workflows. See Example AGENTS.md. - Add nested
AGENTS.mdfiles only when a subdirectory needs additional instructions. - Add a
.poolsidefile for personal preferences you want across projects. See Example .poolside. - Use agent instructions when you want reusable behavior for a saved managed agent. See Managed agents.
- Refine your instructions if the agent misses important context or behaves inconsistently.
Agent instructions
Agent instructions are configured in Poolside Console when you create or edit an agent. They define the agent’s role and the tasks it should perform, and apply every time the agent runs. Agent instructions apply to managed agents only. They take priority overAGENTS.md and .poolside files. To configure agent instructions, see Managed agents.
AGENTS.md
Use anAGENTS.md file to define rules, constraints, and project-specific context for the agent. Place one at the root of your repository for rules that apply everywhere, and add more AGENTS.md files in subdirectories to scope instructions to specific parts of the codebase.
Poolside combines all AGENTS.md files that apply to the directory the agent is working in. A file in a subdirectory takes precedence over a file in a parent directory.
AGENTS.md files apply when the agent works in app/ui/: app/ui/AGENTS.md, app/AGENTS.md, and the root AGENTS.md. The closest file takes priority, so app/ui/AGENTS.md takes precedence over app/AGENTS.md, which takes precedence over the root AGENTS.md.
Common uses include:
- Defining coding standards and conventions
- Setting constraints on agent behavior
- Providing context about your project’s structure or architecture
- Specifying workflows or required steps for common tasks
Example AGENTS.md
.poolside
Use a.poolside file to set personal preferences that apply across all your projects. It uses the same Markdown format as AGENTS.md.
Poolside reads .poolside after the applicable AGENTS.md files. Use .poolside for preferences that should follow you across projects, and use AGENTS.md for project-specific rules that take priority.
This Markdown file is separate from the .poolside/ directory that stores settings such as tool permissions.
By default, Poolside looks for your .poolside file at ~/.config/poolside/.poolside. To use a different location, set the XDG_CONFIG_HOME environment variable.
Example .poolside
Tips and caveats
- Keep instructions short and specific.
- Use Markdown headings to organize rules.
- Add a short example if the model struggles to follow a rule.
- Start with a few clear instructions and refine them over time.
- Use these files to control output format, such as verbosity or code-only responses.
- What you type in the session can override
AGENTS.mdguidance. - Empty
.poolsideandAGENTS.mdfiles are not sent to the model. - The model may not follow instructions consistently.