agentleFS
ServiceStackServiceStack/llms/docs/AGENTS.md

llms

AGENTS.md629 starsChanged 28 days agoBSD-3-ClauseView on GitHub

The Agents Extension allows you to configure specialized AI agent profiles within your environment. Each agent is defined as a profile that can have its own system prompt, default LLM model, UI theme, allowed tools, allowed skills, default avatar, and custom footer action buttons. Agents are parsed from directory profiles. The application searches for agent profiles in the following order: 1. Built-in Agent Profiles: llms/extensions/agents/profiles/ Includes default profiles like chat, coder, and planner. 2. Global Custom Profiles: {userdatapath}/profiles/ (e.g. ~/.llms/profiles/)

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a SYSTEM.md file in the agent profile directory.

    line 86
  2. Distinctive:

    When a template is used, the system compiles the prompt using Python string formatting:

    line 91
  3. Distinctive:

    If no avatar image is found in the profile directory, the application falls back to the default SVG agent avatar.

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent Profiles & Customization

The Agents Extension allows you to configure specialized AI agent profiles within your environment. Each agent is defined as a profile that can have its own system prompt, default LLM model, UI theme, allowed tools, allowed skills, default avatar, and custom footer action buttons.


Agent Profile Storage Directories

Agents are parsed from directory profiles. The application searches for agent profiles in the following order:

  1. Built-in Agent Profiles: llms/extensions/agents/profiles/ Includes default profiles like chat, coder, and planner.
  2. Global Custom Profiles: {user_data_path}/profiles/ (e.g. ~/.llms/profiles/)
  3. User-Specific Custom Profiles: {user_data_path}/user/{username}/profiles/ (e.g. ~/.llms/user/admin/profiles/assistant)

[!NOTE] Custom agent profiles override built-in profiles of the same name. This allows you to customize default behaviors by redefining standard profiles in your user-specific directory.


Profile Folder Structure

An agent profile is a subdirectory containing the following configuration and prompt files:

my-agent/
├── config.json          # Required: Defines agent preferences, tools, and actions
├── SYSTEM.md            # Required (or SYSTEM.template): Defines the system prompt
├── SYSTEM.template      # Optional: Text template for composite system prompts
├── avatar.png           # Optional: Agent's profile image (supports .png, .webp, .jpg, .jpeg, .svg)
└── memory/              # Optional: Directory for dynamic prompt context (e.g., date-stamped memory files)

Agent Configuration (config.json)

The config.json file controls the default preferences and restrictions of the agent.

Example Configuration

{
  "theme": "dark",
  "model": "Kimi K2.6",
  "onlyTools": [
    "get_current_time",
    "calc",
    "run_bash",
    "skill"
  ],
  "onlySkills": [],
  "actions": {
    "Execute Plan": {
      "profile": "coder"
    }
  }
}

Configuration Schema

FieldTypeRequiredDescription
namestringNoA custom display name for the agent (defaults to the folder name capitalized).
enabledbooleanNoDefaults to true. Set to false to disable loading of the agent.
themestringNoThe UI color scheme/theme to load when this agent is active (e.g. nord, dark, light_slate).
modelstringNoThe default LLM model to select when starting conversations with this agent.
onlyToolsarrayNoRestricts the tools the agent is permitted to use to the listed tool names. Set to [] to exclude all tools. If omitted (or null), all tools are allowed.
onlySkillsarrayNoRestricts the skills the agent is permitted to use to the listed skill names. Set to [] to exclude all skills. If omitted (or null), all skills are allowed.
injectPromptbooleanNoDefaults to true. If set to false, the agent's system prompt will not be automatically prepended to the chat request.
actionsobjectNoMaps action names to buttons that appear in the chat footer under the assistant's responses (see Footer Actions below).

Defining System Prompts

Agents support two methods for defining system prompts: simple prompts and composite templates.

1. Simple System Prompt (SYSTEM.md)

Create a SYSTEM.md file in the agent profile directory. The contents of this file are loaded directly as the system prompt.

2. Composite Prompt (SYSTEM.template)

For complex agents that benefit from dividing prompt logic across multiple files, use a SYSTEM.template file.

When a template is used, the system compiles the prompt using Python string formatting:

  • Markdown Variables: Any .md file placed inside the profile directory is read, and its content is mapped to a variable named after the file (without the .md extension). For example, if you place CODER.md in the directory, you can reference it as {CODER} in SYSTEM.template.
  • Dynamic Memory ({MEMORY_LATEST}): If a memory/ subdirectory exists, the system scans for .md files, sorts them in reverse order (newest first, e.g. using ISO-date filenames like 2026-06-13.md), and reads the latest file. Its content is injected as the {MEMORY_LATEST} variable. If no memory files exist, {MEMORY_LATEST} defaults to an empty string.

Example SYSTEM.template

You are a helpful software engineering assistant.

{CODER}

Here is the latest shared context from memory:
{MEMORY_LATEST}

Footer Actions

You can configure context-aware helper buttons to appear at the bottom of the chat view when the last message is from the assistant.

1. Send Message Action

Prompts the user to send a preset message instantly to the active agent.

"actions": {
  "Proceed": {
    "message": "Proceed with the execution"
  }
}

2. Switch Profile and Execute Action

Transitions the conversation to a different agent. When clicked:

  • The selected agent switches to the designated profile (e.g., coder).
  • The system starts a new thread titled Execute Plan {parent_thread_title} using the target agent's system prompt.
  • A user message with the action's key (e.g., Execute Plan) is automatically posted to trigger the new agent.
"actions": {
  "Execute Plan": {
    "profile": "coder"
  }
}

Agent Avatars

To customize your agent's visual avatar, place an image file named avatar in the agent's folder. The system automatically checks for the following extensions in order:

  • avatar.png
  • avatar.webp
  • avatar.jpg
  • avatar.jpeg
  • avatar.svg

If no avatar image is found in the profile directory, the application falls back to the default SVG agent avatar.

Download now (ZIP)

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.