Skip to content
64 changes: 33 additions & 31 deletions docs/articles/new-expensify/ai-agents/Create-Agent-Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,62 @@
title: Create Agent Rules
description: Create AI-powered workspace rules using natural-language instructions to automate report reviews, routing, approvals, and other actions.
keywords: [agent rules, RuleBot, AI rules, automated approvals, report routing, workspace automation, approval automation]
internalScope: Audience is Workspace Admins. Covers creating, managing, and understanding Agent Rules and how RuleBot enforces them. Does not cover Custom Agent management, personal AI features, or Concierge AI.
internalScope: Audience is Workspace Admins. Covers creating, managing, and understanding Agent Rules and how RuleBot enforces them. Does not cover Agent management, personal AI features, or Concierge AI.
---

# Create Agent Rules

Agent Rules are AI-powered rules that let Workspace Admins automate report reviews, routing, approvals, and other workspace actions using natural-language instructions.
Agent rules are AI-powered rules that let Workspace Admins automate report reviews, routing, approvals, and other workspace actions using natural-language instructions.

When you create your first Agent Rule, Expensify automatically creates RuleBot, an AI-powered workspace agent that evaluates reports and enforces your Agent Rules.
When you create your first Agent rule, Expensify automatically creates RuleBot, an AI-powered workspace agent that evaluates reports and enforces your Agent rules.

---

## Who can use Agent Rules
## Who can use Agent rules

Agent Rules are currently available through an open beta program. If you'd like to try Agent Rules and provide feedback, contact Concierge to request access.
Agent Rules are currently available through an open beta program. If you'd like to try Agent rules and provide feedback, contact Concierge to request access.

To create an Agent Rule:
To create an Agent rule:

- You must be a Workspace Admin.
- The workspace must have access to the Agent Rules beta.
- **Rules** must be enabled on the workspace.
- **Rules** must be enabled for the workspace.

---
1. In the navigation tabs (on the left on web, on the bottom on mobile), select **Workspaces > [Your Workspace]**.
## How to create an Agent Rule

## How to create an Agent rule

1. In the navigation tabs (on the left on web, on the bottom on mobile), select **Workspaces > [Your Workspace]**
2. Click **Rules**.
3. In the **Agent Rules** section, click **Add AI Rule**.
5. Enter a natural-language description of the behavior you want.
7. Click **Save**.
3. In the **Agent rules** section, click **Add AI rule**.
4. Enter a natural-language description of the behavior you want.
5. Click **Save**.

---

## How to write Agent Rules
## How to write Agent rules

Agent Rules are written in natural language. Describe the behavior you want, and RuleBot will monitor reports and take action when the rule applies.
Agent rules are written in natural language. Describe the behavior you want, and RuleBot will monitor reports and take action when the rule applies.

For guidance, examples, and prompt-writing best practices, [learn how to write Agent Rules](/articles/new-expensify/ai-agents/How-to-Write-Agent-Rules).
For guidance, examples, and prompt-writing best practices, [learn how to write Agent rules](/articles/new-expensify/ai-agents/How-to-Write-Agent-Rules).

---

## What happens after an Agent Rule is created
## What happens after an Agent rule is created

When you create your first Agent rule, Expensify automatically creates RuleBot and adds it to the workspace as a Workspace Admin.

When you create your first Agent Rule, Expensify automatically creates RuleBot and adds it to the workspace as a Workspace Admin.
RuleBot immediately begins monitoring report activity and evaluating reports against all configured Agent rules.

RuleBot immediately begins monitoring report activity and evaluating reports against all configured Agent Rules.
Agent rules apply to future report activity, but not existing Paid or Done reports.

Agent Rules apply to future report activity, but not existing Paid or Done reports.
---

## How RuleBot enforces Agent Rules
## How RuleBot enforces Agent rules

RuleBot is an AI-powered workspace agent that enforces Agent Rules.
RuleBot is an AI-powered workspace agent that enforces Agent rules.

RuleBot can operate as a workspace observer that monitors reports and applies Agent Rules, and as the designated approver in a workflow.
RuleBot can operate as a workspace observer that monitors reports and applies Agent rules, and as the designated approver in a workflow.

Whenever report activity occurs, RuleBot evaluates the report using:

Expand All @@ -74,7 +76,7 @@ Report activity includes actions such as:

## What actions RuleBot can perform

Depending on the Agent Rules you configure, RuleBot can:
Depending on the Agent rules you configure, RuleBot can:

- Ask the submitter a question
- Edit an expense
Expand All @@ -90,33 +92,33 @@ For example, RuleBot might:

---

## How to delete an Agent Rule
## How to delete an Agent rule

1. In the navigation tabs (on the left on web, on the bottom on mobile), select **Workspaces > [Workspace name]**
2. Click **Rules**.
3. In the **Agent Rules** section, select the AI rule you want to remove.
4. Click **Delete**.

Deleting an Agent Rule stops RuleBot from enforcing that rule on future report activity.
Deleting an Agent rule stops RuleBot from enforcing that rule on future report activity.

---

# FAQ

## Can Agent Rules make mistakes?
## Can Agent rules make mistakes?

Yes. Agent Rules are evaluated by an LLM and may occasionally behave unexpectedly.
Yes. Agent rules are evaluated by an LLM and may occasionally behave unexpectedly.

Review AI-generated actions and instructions carefully. The Agent Rules page includes a reminder that AI-generated decisions may not always be correct.
Review AI-generated actions and instructions carefully. The Agent rules page includes a reminder that AI-generated decisions may not always be correct.

## Do Agent Rules apply to existing reports?
## Do Agent rules apply to existing reports?

No. Agent Rules are not retroactively applied to existing **Paid** or **Done** reports.
No. Agent rules are not retroactively applied to existing **Paid** or **Done** reports.

## How much report history can RuleBot review?

When evaluating a report, RuleBot can review the 50 most recent report actions, including system messages describing previous actions it has taken on the report.

## Do I need to create or manage RuleBot?

No. RuleBot is created automatically when you add your first AI Rule and is managed by Expensify.
No. RuleBot is created automatically when you add your first Agent rule and is managed by Expensify.
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
---
title: Create and Use Custom Agents
description: Create personal Custom Agents in New Expensify to handle your workflow, then chat with them, Copilot into them, edit, or delete them.
title: Create and Use Agents
Comment thread
stephanieelliott marked this conversation as resolved.
Resolved
description: Create personal agents in New Expensify to handle your workflow, then chat with them, Copilot into their accounts, edit, or delete them.
keywords: [custom agents, agents, new agent, ai agent, agent instructions, copilot into account, new expensify]
internalScope: Audience is individual New Expensify users. Covers creating, configuring, and managing personal Custom Agents from the Agents page in Account settings. Does not cover Agent Rules, RuleBot, or workspace-level automation.
internalScope: Audience is individual New Expensify users. Covers creating, configuring, and managing agents from the Agents page in Account settings. Does not cover Agent Rules, RuleBot, or workspace-level automation.
---

# Create and Use Custom Agents
# Create and Use Agents

Custom Agents are AI-powered virtual members of your Expensify account that can take actions based on instructions you provide. You write natural-language instructions that tell an agent what to do, and you can chat with an agent or Copilot into its account at any time.
Agents are AI-powered virtual members that can take actions in Expensify based on instructions you provide. You write natural-language instructions that tell an agent what to do, and you can chat with an agent or Copilot into its account at any time.

Each Custom Agent has its own Expensify account with a profile, display name, and instructions you control.
Every agent has its own Expensify account. You can Copilot into the agent's account to review its activity, update its instructions, and see the actions it has taken. Because the agent operates from its own account, it doesn't have access to your personal account or personal context, and it can't act on your behalf.

Expensify also supports Agent Rules, which are workspace-level AI automations enforced by RuleBot. [Learn how to Create Agent Rules](/articles/new-expensify/ai-agents/Create-Agent-Rules).
**Coming soon:** You'll be able to add an agent as a Copilot on your own account, giving it delegated access so it can use your personal context and manage expenses and reports on your behalf.

Expensify also supports Agent rules, which are workspace-level AI automations enforced by RuleBot. [Learn how to Create Agent Rules](/articles/new-expensify/ai-agents/Create-Agent-Rules).

---

## Who can use Custom Agents
## Who can use Agents

Custom Agents are currently available through an open beta program. If you’d like to try Custom Agents and provide feedback, contact Concierge to request access.
Agents are currently available through an open beta program. If you’d like to try Agents and provide feedback, contact Concierge to request access.

If the beta is enabled on your account, you can create a Custom Agent. When the feature is available to you, an **Agents** option appears in your **Account** settings with a **Beta** badge.
If the beta is enabled on your account, you can create an agent. When the feature is available to you, an **Agents** option appears in your **Account** settings

If you don't see **Agents** in your **Account** settings, the Beta isn't enabled on your account yet.

---

## How to create a Custom Agent
## How to create an Agent

1. In the navigation tabs (on the left on web, on the bottom on mobile), click **Account**.
2. Click **Agents**.
Expand All @@ -40,41 +42,43 @@ After saving, the new agent appears in your **Agents** list with **Edit**, **Cha

---

## What happens after you create a Custom Agent
## What happens after you create an agent

After you create a Custom Agent:
After you create an agent:

- A new Expensify account is created for the agent.
- You become the agent's owner.
- You're automatically added as a full-access Copilot on the agent's account.
- The agent appears in your **Agents** list, where you can chat with it, edit its instructions, or Copilot into its account.
- The agent can be added to workspaces as a member and selected anywhere a workspace member can be chosen, such as approval workflows.

The agent follows the instructions you provide, but it operates independently from its own Expensify account. It can take actions as the agent account, but it can't access your personal account or act on your behalf.
Comment thread
stephanieelliott marked this conversation as resolved.
Resolved

---

## How to write instructions for a Custom Agent
## How to write instructions for an agent

Agent instructions are written in natural language. Describe the role, responsibilities, and decisions you want the agent to make. Clear, specific instructions generally produce more predictable results than broad or ambiguous instructions.

If you’re unsure how to write instructions, you can chat with the agent and describe the outcome you want. The agent can ask clarifying questions, help draft instructions, and explain how it would behave in a specific situation based on the instructions.

Custom Agent instructions use the same natural-language prompting concepts as Agent Rules. For guidance, examples, and prompt-writing best practices, [learn how to write Agent Rules](/articles/new-expensify/ai-agents/How-to-Write-Agent-Rules).
Agent instructions use the same natural-language prompting concepts as Agent rules. For guidance, examples, and prompt-writing best practices, [learn how to write agent rules](/articles/new-expensify/ai-agents/How-to-Write-Agent-Rules).

---

## How to chat with a Custom Agent
## How to chat with an agent

To open a direct conversation with a Custom Agent:
To open a direct conversation with an agent:

1. In the navigation tabs (on the left on web, on the bottom on mobile), click **Account**.
2. Click **Agents**.
3. Find the agent you want to message, then click the chat icon on the agent's row.

---

## How to Copilot into a Custom Agent's account
## How to Copilot into an agent's account

Each Custom Agent is its own Expensify account with a profile, inbox, chats, and activity history. When you create a Custom Agent, you become its owner and are automatically added as a full-access Copilot.
Each agent is its own Expensify account with a profile, inbox, chats, and activity history. When you create an agent, you become its owner and are automatically added as a full-access Copilot.

Use Copilot to see what the agent has done, review its activity, and inspect any actions it has taken on reports.

Expand All @@ -86,9 +90,9 @@ Use Copilot to see what the agent has done, review its activity, and inspect any

---

## How to edit a Custom Agent's instructions
## How to edit an agent's instructions

You can edit a Custom Agent's instructions at any time.
You can edit an agent's instructions at any time.

1. In the navigation tabs (on the left on web, on the bottom on mobile), click **Account**.
2. Click **Agents**.
Expand All @@ -99,9 +103,9 @@ You can edit a Custom Agent's instructions at any time.

---

## How to delete a Custom Agent
## How to delete an agent

Deleting a Custom Agent closes its Expensify account.
Deleting an agent closes its Expensify account.

1. In the navigation tabs (on the left on web, on the bottom on mobile), click **Account**.
2. Click **Agents**.
Expand All @@ -113,9 +117,9 @@ Deleting an agent can't be undone.

---

## How to use a Custom Agent as a workspace approver
## How to use an agent as a workspace approver

Before you can select a Custom Agent as an approver, the agent must be added to the workspace as a member. Once added, the agent can be selected anywhere an approver can be selected.
Before you can select an agent as an approver, the agent must be added to the workspace as a member. Once added, the agent can be selected anywhere an approver can be selected.

[Learn how to add a new Workspace member](/articles/new-expensify/workspaces/Managing-Workspace-Members#invite-members-to-a-workspace).

Expand All @@ -138,35 +142,41 @@ For details on configuring approval workflows generally, see [Learn how to add a

## Why can't I see Agents in my Account settings?

Custom Agents are in **Beta** and may not be enabled on your account yet. When the feature is available, an **Agents** option appears in your **Account** settings with a **Beta** badge.
Agents are in **Beta** and may not be enabled on your account yet. When the feature is available, an **Agents** option appears in your **Account** settings with a **Beta** badge.

## Who can edit or delete a Custom Agent?
## Who can edit or delete an agent?

Only the agent's owner can edit its instructions or delete it. The owner is the account that created the agent.

## Does a Custom Agent have its own Expensify account?
## Does an agent have its own Expensify account?

Yes. Each Custom Agent is created as a separate Expensify account with its own profile, inbox, chats, and activity history. The account that creates the agent becomes its owner and is automatically added as a full-access Copilot.
Yes. Each agent is created as a separate Expensify account with its own profile, inbox, chats, and activity history. The account that creates the agent becomes its owner and is automatically added as a full-access Copilot.

## Are Custom Agents billed?
## Are agents billed?

An agent is a member of any workspace it's added to and is billed as a workspace member like any other member. Usage-based billing for agent activity is not yet in effect at this release.

## Can I remove myself as a Copilot from a Custom Agent I created?
## Can I remove myself as a Copilot from an agent I created?

No. The owner is permanently added as a full-access Copilot on the agent's account so you always retain access to review and update the agent.

## Can a Custom Agent be added to multiple workspaces?
## Can an agent be added to multiple workspaces?

Yes. An agent is a member like any other and can be added to as many workspaces as you'd like, and selected as an approver in each of their workflows.

## Can I use a Custom Agent in multi-step approval workflows?
## Can I use an agent in multi-step approval workflows?

Yes. On Control plans, agents can be used anywhere an approver can be selected, including multi-step approval workflows.

On Collect plans, workspaces support a single approver. An agent can be used as that approver.

## Can an agent make mistakes?

Yes. On Control plans, Custom Agents can be used anywhere an approver can be selected, including multi-step approval workflows.
Yes. Agents follow natural-language instructions and are powered by AI, so they may occasionally behave unexpectedly. Write clear, specific instructions and review what an agent does.

On Collect plans, workspaces support a single approver. A Custom Agent can be used as that approver.
## Can I add an agent as a Copilot on my own account?

## Can a Custom Agent make mistakes?
Not yet. Today, every agent has its own Expensify account, and you're automatically added as a Copilot on the agent's account when you create it.

Yes. Custom Agents follow natural-language instructions and are powered by AI, so they may occasionally behave unexpectedly. Write clear, specific instructions and review what an agent does.
**Coming soon:** You'll be able to add an agent as a Copilot on your own account, giving it delegated access to your account so it can use your personal context and manage your expenses and reports on your behalf.

Comment thread
stephanieelliott marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: How to Write Agent Rules
description: Learn how to write effective Agent Rules using natural-language instructions and examples.
keywords: [agent rules, RuleBot, prompt writing, ai rules, agent rule examples, agent rule best practices]
internalScope: Audience is Workspace Admins. Covers best practices for writing Agent Rules and examples of effective instructions. Does not cover creating Agent Rules or managing Custom Agents.
internalScope: Audience is Workspace Admins. Covers best practices for writing Agent Rules and examples of effective instructions. Does not cover creating Agent Rules or managing Agents.
---

# How to Write Agent Rules
Expand Down Expand Up @@ -49,6 +49,8 @@ More specific approval rules generally produce more predictable results than bro

> Approve reports that seem reasonable.

---

## How to write Agent Rules for routing

Routing rules can be used to send reports to different approvers based on report details.
Expand All @@ -65,6 +67,8 @@ Example:

> Ask the submitter to justify any meal expense over $75.

---

## How to write Agent Rules that modify expenses

Agent Rules can automatically update expenses when conditions are met.
Expand Down
Loading