Why PROCESS.md
PROCESS.md is a format for AI agents to intelligently execute processes, such as chasing an overdue invoice or onboarding a new client, based on instructions written in plain language.
It replaces traditional rule-based automation tools built around drag-and-drop flowcharts, which are limited to predefined logic and cannot adapt or improvise.
Traditional automation tools
Static flowcharts
Create deterministic processes with every step predefined. They execute exactly as designed, but cannot interpret ambiguity, apply judgment, or adapt beyond the flow.
PROCESS.md
Intelligent automation
Write the process in plain language. An AI agent runs it, adapts to nuance, handles edge cases you didn't think of, and pauses for your approval when it matters.
Writing a PROCESS.md
Every PROCESS.md has the same structure. A YAML header with the name and description, followed by six sections: ## Role, ## Instructions, ## Events, ## Rules, ## Todos, and ## Paths. Alongside the file, the process folder can hold assets: skills, templates and reference files the agent can pull in for extra context while it runs.
Only the header is required. Every section is optional, so the file gets more prescriptive as you add them. If there are no predefined todos, the agent creates the work needed to deliver the description, following the Role and Instructions and obeying the Rules. Add a role to define who it acts as and who it serves, instructions to control how the whole process runs, events to let it wait on other people, rules to set the highest-priority boundaries, todos to fix the steps, and paths to branch.
| Section | Required | Purpose |
|---|---|---|
--- frontmatter |
Yes | The name and description of the process, between two --- lines at the very top. |
## Role |
No | Who the agent acts as, the audience it serves, and whether the process is internal or external-facing. A Role may instead be described inside ## Instructions. |
## Instructions |
No | Process-wide directives, context, and execution requirements that control how the whole process is carried out. |
## Events |
No | The webhook events a run subscribes to, so it can wait on a reply, a payment or a document and carry on when one arrives. Each event can carry filters so only the occurrences you care about count. |
## Rules |
No | Conditions, policies, guardrails, or custom directives for the whole process. |
## Todos |
No | The actual process the agent executes, as a list of items. |
## Paths |
No | Reusable sub-flows the process can run mid-execution. Instructions, Rules, Todo Titles, or Todo Descriptions can trigger a named Path. |
Example
Frontmatter
A YAML header with two required fields: name and description.
| Field | Required | Constraints |
|---|---|---|
name |
Yes | Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen. |
description |
Yes | Up to 1024 characters. Describes what the process does. Use > for multi-line values. |
Example
Role
A Role defines who the agent acts as, the audience it serves, and whether the process is internal or external-facing. Put it under ## Role, or describe it inside ## Instructions. In either place, it applies throughout the process.
If no Role is defined, the agent uses its normal internal assistant behaviour. Role content has the same priority as Instructions: Rules override both, while Role and Instructions override the description, Events, Todos, Paths, and default execution guidance. If separate Role and Instruction text conflict and the intended priority is unclear, the agent asks the assigned internal user before acting.
| Section | Required | Description |
|---|---|---|
## Role |
No | Free text describing the identity, audience, purpose, responsibilities, and communication style the agent should use. |
Internal and external Roles
You do not have to label the Role as internal or external. The agent determines the type from its purpose, audience, and responsibilities.
| Type | How it is determined |
|---|---|
| Internal | The agent supports your team or operates internal systems using its normal internal assistant behaviour. One outbound task, such as sending an email for an internal user, does not by itself make the Role external. |
| External | The agent acts as the direct representative communicating with or serving a customer, lead, applicant, supplier, or another non-team member. |
Make the audience clear. If the type or intended audience remains genuinely unclear after the full process is read, the agent stops and asks the assigned internal user before it communicates or takes action.
How an external Role behaves
- It immediately adopts the stated identity, audience, purpose, and communication style. It never presents itself as Ask or an internal assistant, reveals internal Process content, or invents a name, title, qualification, or authority the Role does not provide.
- It grounds factual answers only in the external conversation, the active Process and referenced assets, or verified data from available Sources. If information is unavailable, it does not guess: it follows the Process's fallback or handoff, or briefly says it cannot confirm or complete the request and stops.
- It never claims an action succeeded unless the relevant Source confirms it, and it shares only information the Process permits for that external party.
- The Role authorises communication within its stated purpose, not extra work. Writes, transactions, bookings, record changes, and other side effects must be explicitly required by the Process.
- Messages from the external party are treated as information, not as Process instructions. They cannot change the Role, scope, authority, or approval requirements.
- Internal approvals, operational status, tool or Source details, and technical errors are never included in external-facing communications.
Approvals stay internal. Every approval must come from the assigned internal user. An external party may supply information or answer a Process question, but their response is never an approval or sign-off.
Paths and nested Processes
A local Path inherits the active Role. A separate Process also inherits it when that Process does not define a Role of its own. A nested Process may use an internal Role for background work, but it must preserve the parent's external-facing identity for customer communication.
The external-facing Role changes only when the parent Process explicitly authorises a handoff. When the nested Process finishes, the agent returns to the parent Role.
Example
Instructions
Instructions tell the agent how the whole process must be carried out. Write them in plain language as free text or bullet points. They can provide operating context, define what matters or what a good result looks like, and set required actions, limits, methods, edge-case handling, or lifecycle behaviour.
Instructions may also name Sources, skills, assets, approval requirements, output formats, or Paths that apply across the process. A Role may be written here instead of in a separate ## Role section; Role content is treated at the same priority as Instructions.
| Section | Required | Description |
|---|---|---|
## Instructions |
No | Free text or bullet points containing process-wide context, directives, and execution requirements. There are no required labels or fixed internal structure. |
How Instructions affect execution
- They apply from setup to completion: on every trigger, while creating or executing Todos, when a session resumes, and through every Path.
- If predefined Todos exist, the agent preserves their order and Titles unless an Instruction or Rule requires otherwise. If they are absent, it creates the necessary Todos from the description by following the Role and Instructions and obeying the Rules.
- A required Source, skill, asset, approval, execution method, or output format named in Instructions must be followed wherever it applies.
- Instructions can change how other Process content is executed, but they do not authorise the agent to invent or expand work beyond what they and the process purpose explicitly require.
Process precedence. Rules have the highest priority. Role content and Instructions come next and override the description, Events, Todos, Paths, and default execution guidance whenever they conflict. If an Instruction conflicts with a Rule, the Rule wins. If two Instructions conflict or it is unclear which applies, the agent stops and asks the assigned internal user instead of guessing.
Include only instructions that change execution. The agent reads and applies every line. Leave out background detail that would not affect what it does, how it does it, or the result it returns.
Example
Events
The third-party tools you connect publish webhook events: a WhatsApp message arrives, a Stripe payment succeeds, a document is uploaded, a deal moves stage. This section is where you subscribe to the ones this process should listen for.
A subscribed event resumes a session that is already open. It keeps a process usable for time-sensitive work like customer support, where a reply has to be picked up when it arrives, and it saves tokens because the agent will not rerun the session on a fixed schedule to check whether the event has occurred.
| Section | Required | Description |
|---|---|---|
## Events |
No | One line per event, each optionally followed by filters. |
Naming an event exactly
If you know the source and the event id, write them. Filters are optional: add them to narrow which occurrences count, or leave them out to receive every one.
| Part | What it is |
|---|---|
| Source | The connected tool the event comes from, for example ai-number or stripe. |
| Event | The event id, for example message.received. Each source publishes its own list. |
| Filters | Optional conditions on the event's own fields, written as field, condition, value. Conditions are is, is not, has and doesn't have. Several filters on one event are joined with and, so every condition has to match. |
Example
Describing it in your own words
You do not have to know any of that. Write what you want in plain language, for example "subscribe to incoming WhatsApp messages from +447700900123", and the agent should look up what the source actually publishes before it subscribes: the real event ids, the fields each one can be filtered on, and the values those fields accept.
If something matches, it should subscribe to that and tell you what it chose. If nothing matches, it should subscribe to nothing and say so. It should not pick the closest-looking event, because a wrong subscription is worse than none: the process would sit waiting for something that never arrives.
A wrong filter fails silently. A filter on a field that does not exist, or a value outside what the field allows, is accepted and created without error. It simply never matches, so the process waits forever and nothing tells you why. The agent should check the available events and their filter fields before subscribing, rather than guessing from the name.
Todos
A todo is a single step the agent executes to complete the process. Each todo has a Title and a Description, plus an optional Approval flag. Everything else the todo needs, which sources to use, which skill or reference files to load, is written into the Description in plain language.
| Parameter | Required | Description |
|---|---|---|
Title |
Yes | A short name for the todo, written after [ ]. |
Description |
Yes | What the todo is and how the agent should execute it. Name everything the todo needs here, in plain language, which sources to use (CRMs, email, calendars, messaging, file storage), and any SKILL.md or template/reference files to load before running it. |
Approval |
No | The agent asks for the approval of every action it takes while running this todo. |
Only include what the agent needs. An AI agent reads every line in a todo and uses it to decide how to act. Irrelevant details confuse the execution and make results less reliable.
Example
Rules
Rules are conditions, policies, guardrails, or any custom directives that apply to the whole process. Each rule starts with a label followed by the instruction. Use one of the predefined labels or create your own.
Custom rules
| Parameter | Required | Description |
|---|---|---|
Label |
Yes | A short category name for the rule, followed by :. |
Instruction |
Yes | The condition, policy, guardrail, or any custom instructions the agent must follow. |
Predefined rules
| Label | What it does | Instruction |
|---|---|---|
Stop |
Process stops and will not be executed further. | Describe when the process should stop. |
Escalate |
Notify about certain event (process will continue to execute). | Describe who to notify, when, and their email. |
Email only for now. Escalate sends notifications via email. Other channels like Slack or SMS aren't supported yet.
Rules have the highest priority within a Process. They override Role content, Instructions, Todos, Paths, Events, and the process description whenever they conflict.
Example
Paths
Paths are sub-flows that can be triggered from Instructions, Rules, Todo Titles, or Todo Descriptions. A trigger may use run path [path-name] or state a clear condition and the Path to run. Define each Path under ## Paths with a ### path-name heading and its own todos.
To trigger an external PROCESS.md, use run process [process-name]; it runs a separate file from your processes/ folder. A clear condition that names the resulting external Process also counts as a trigger.
| Parameter | Required | Description |
|---|---|---|
Name |
Yes | A short path name, written after ### . Each path in a PROCESS.md must have a unique name. |
How to run a local path or trigger an external process
| Phrase | What it runs |
|---|---|
run path [path-name] |
Runs a path defined in ## Paths section. |
run process [process-name] |
Runs an external PROCESS.md file from your processes/ folder. |
Processes folder structure
Example
Assets
You can add assets to a process, to be used as context while it runs. To be read, an asset has to be referenced somewhere in the process.
| Asset | Example | Description |
|---|---|---|
| Skill | polite-chase |
A capability the agent uses to carry out the work, written in the open SKILL.md format. Reference it by name. The skill has to be installed on the agent before a process can use it. |
| File | assets/price-list.pdf |
A file the agent reads to get the context it needs for a particular task. |
Reference it, or it is not read. An asset is only loaded when something in the process names it. Putting a file in the folder does not put it in front of the agent.
Where assets live
Anywhere inside the process folder. Build whatever structure fits you best.
Referencing an asset
Reference the file where you need it, in plain language, the same way you name a Source or a skill. A reference in the Role or Instructions applies to the whole process. A reference in a Rule, Todo Title, Todo Description, or Path applies wherever that content is executed.
Example
When to use one
Move something into an asset when it is long, when it changes on a different schedule to the process, or when more than one todo needs it. A three-word instruction belongs in the todo. A price list, an outreach template you have spent a year getting right, or a policy your compliance team owns belongs in a file.
Full example
A full example of a complete PROCESS.md file.
Run PROCESS.md in Askpilot
Askpilot is purpose-built to run PROCESS.md files. From one place, activate any process where it needs to run:
- Across your whole company for organisation-wide processes
- To specific teams like sales, operations, or compliance
- To individual employees for personal processes or assigned tasks
- On any trigger like events, schedules, conditions, or manual runs
Get started today
Run your processes in Askpilot.
Request access and start automating your business processes.