AGENTS.md: File-Based Instructions
AGENTS.md is a file-based approach to configuring assistant instructions. Instead of typing instructions into form fields, you create an AGENTS.md file in the assistant's file panel. This mirrors the pattern used by tools like Claude Code's CLAUDE.md, giving you version-controllable, composable agent configuration.
How It Works
When an assistant processes a request, Orchestra checks for an AGENTS.md file in two places:
- Agent mode: If the assistant has an
AGENTS.mdfile in its attached files, that file's content becomes the assistant's instructions. - Thread mode: If there's no assistant selected but the thread's files contain
AGENTS.md, its content is injected as instructions for that conversation.
When AGENTS.md is detected, it takes priority over any legacy instructions or system_prompt fields. The default system prompt (with metadata like timezone and language) is still appended automatically.
Creating AGENTS.md via the Web Interface
For a New Assistant
- Navigate to Assistants in the sidebar and click Create New Assistant
- Fill in the assistant Name and select a Model
- Switch to the Editor view using the toggle in the file panel
- Click Create File and name it
AGENTS.md - Write your instructions in Markdown format
- Click Save to create the assistant
For a detailed walkthrough with screenshots, see the AGENTS.md Workflow Guide.
For an Existing Assistant
- Open the assistant for editing
- Switch to the Editor view in the file panel
- Create or edit the
AGENTS.mdfile - Click Save to apply changes
Migrating from Legacy Instructions
If you have an existing assistant that uses the legacy instructions or system_prompt fields, the edit form displays a migration card with your current instructions content.
To migrate:
- Open the assistant for editing
- You'll see an amber Legacy Instructions card showing your current instructions
- Click Migrate to AGENTS.md — this creates an
AGENTS.mdfile with your existing instructions content - Review and edit the newly created file if needed
- Click Save
After migration, the AGENTS.md file takes priority. Your assistant will continue to work exactly as before.
Existing assistants with legacy instructions or system_prompt fields continue to work unchanged. Migration is optional — AGENTS.md only takes effect when the file is present.
AGENTS.md in Agent Mode vs Thread Mode
Agent Mode (With an Assistant)
When you select an assistant for a conversation, Orchestra checks the assistant's attached files for AGENTS.md:
- If found, the file content replaces the assistant's
instructionsfield - The
system_promptis reset so the default system prompt applies - All other assistant configuration (model, tools, metadata) remains unchanged
Thread Mode (No Assistant)
When chatting without a selected assistant, you can still use AGENTS.md by adding it to the thread's files:
- Upload or create
AGENTS.mdin the thread file panel - Its content is injected as instructions for that thread
- Supports three content formats: plain string, dictionary with
contentkey, or list (joined with newlines) - Empty content is ignored
Writing Effective AGENTS.md
Structure your AGENTS.md like any good Markdown document:
# Sales Assistant
You are a professional sales assistant for Acme Corp.
## Role
- Answer product questions accurately
- Guide customers toward the right solution
- Always be helpful, never pushy
## Product Knowledge
- Widget Pro: $99/mo, best for small teams
- Widget Enterprise: $299/mo, best for organizations
- All plans include 24/7 support
## Rules
- Never discuss competitor products negatively
- Always offer to connect with a human agent for complex issues
- Use the customer's name when available
Because AGENTS.md is a file, you can maintain it in version control, generate it from templates, or share it across teams. This makes agent configuration reproducible and auditable.
API Usage
Creating an Assistant with AGENTS.md
Pass the AGENTS.md content in the files dictionary when creating an assistant:
curl -X 'POST' \
'https://chat.ruska.ai/api/assistant' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Sales Assistant",
"model": "anthropic:claude-sonnet-4-5",
"tools": ["search"],
"files": {
"AGENTS.md": "# Sales Assistant\n\nYou are a professional sales assistant...\n\n## Rules\n- Always be helpful\n- Never discuss competitors negatively"
}
}'
The instructions field is no longer required — AGENTS.md in files takes its place.
Thread-Level AGENTS.md via API
You can also inject AGENTS.md at the thread level for conversations without a dedicated assistant:
curl -X 'POST' \
'https://chat.ruska.ai/api/thread' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"query": "Help me draft a proposal",
"files": {
"AGENTS.md": "You are a proposal writing assistant. Use formal business language and structure proposals with Executive Summary, Scope, Timeline, and Pricing sections."
},
"metadata": {
"current_utc": "2025-01-16T14:30:00Z",
"timezone": "America/New_York",
"language": "en-US"
}
}'
Updating an Assistant's AGENTS.md
curl -X 'PATCH' \
'https://chat.ruska.ai/api/assistant/asst_abc123' \
-H 'Content-Type: application/json' \
-d '{
"files": {
"AGENTS.md": "# Updated Instructions\n\nNew instructions content here..."
}
}'
Priority and Precedence
When processing a request, Orchestra resolves instructions in this order:
- AGENTS.md in assistant files (highest priority in agent mode)
- AGENTS.md in thread files (highest priority in thread mode)
- Legacy
instructionsfield (used when no AGENTS.md is present) - Default system prompt (always appended with metadata)
Best Practices
Organize your AGENTS.md with headings, lists, and sections. Clear structure helps the AI model follow your instructions more reliably.
Store your AGENTS.md files in Git alongside your project code. This gives you a history of instruction changes and enables team review of agent configurations.
Write instructions that are specific to the assistant's purpose. Avoid overly broad instructions — targeted guidance produces better results.
The file must be named exactly AGENTS.md (case-sensitive). Files like agents.md, AGENTS.txt, or Agents.md will not be detected.
Related Documentation
- Assistants: Full assistant configuration guide
- Threads: Conversation management
- Tools: Available tool integrations