Skip to content

Instantly share code, notes, and snippets.

@benjiqq
Last active January 28, 2026 13:51
Show Gist options
  • Select an option

  • Save benjiqq/e043d5595ef6515c5dd1cd80e1677f99 to your computer and use it in GitHub Desktop.

Select an option

Save benjiqq/e043d5595ef6515c5dd1cd80e1677f99 to your computer and use it in GitHub Desktop.
agent standard

Agent File Standard (*_agent.md)

  1. Purpose This document defines the required structure and conventions for agent prompt files named *_agent.md. Files following this standard are intended to describe an AI agent’s role, task, rules, and inputs in a clear, deterministic format.

  2. File Naming Pattern: *_agent.md

Examples: summary_agent.md research_agent.md code_review_agent.md 3. Required Sections (Order is Mandatory)

Each file must contain the following sections in order using H1 headings:

System / Role

Task

Constraints

Input

  1. Section Definitions 4.1 # System / Role Defines the agent’s identity and behavioral baseline.

Required: Yes Content: 1–5 sentences. Style: Declarative, present tense.

Example:

You are a research assistant that summarizes academic papers. 4.2 # Task Defines the primary action the agent should perform.

Required: Yes Content: 1–3 sentences. Style: Imperative or declarative. Example:

Summarize the following text in 5 bullets. 4.3 # Constraints Lists the rules the agent must follow.

Required: Yes Content: Bullet list only. Style: Short, testable statements. Example:

  • Keep it under 100 words.
  • Use simple language. 4.4 # Input Defines runtime variables provided to the agent.

Required: Yes Content: One or more placeholders. Format: {{variable_name}} Example:

{{paper_text}} 5. Placeholder Rules Placeholders must be wrapped in double braces: {{name}}. Use snake_case for variable names. Each placeholder should appear on its own line. Do not include additional text on the same line as a placeholder. 6. Prohibited Content No extra sections outside the required four. No tool configuration or API keys. No dynamic or stochastic instructions (e.g., “be creative,” “randomly select”). No hidden instructions or comments. 7. Complete Example

System / Role

You are a research assistant that summarizes papers.

Task

Summarize the following text in 5 bullets.

Constraints

  • Keep it under 100 words.
  • Use simple language.

Input

{{paper_text}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment