BillixDOCS
Background Agents

Creating Agents

Build your first background agent step by step

1 min read
Documentation

Ready to automate something? This guide walks you through creating your first background agent.

Before You Start

Make sure you have:

  • A Billix account
  • At least one integration connected (like Gmail or Slack)
  • An idea of what you want to automate

Creating Your First Agent

Go to Agents

Click "Agents" in the left sidebar. You'll see any existing agents and a "Create New Agent" button.

Click Create New

Click the "Create New Agent" button to open the agent builder.

Name Your Agent

Give it a clear, descriptive name:

  • Good: "Daily Email Summary"
  • Good: "GitHub PR Notifier"
  • Bad: "Agent 1"
  • Bad: "Test"

A good name helps you find and manage agents later.

Write Instructions

This is the most important part. Write clear, specific instructions for what the agent should do:

1. Check my Gmail inbox for unread emails from the last 24 hours
2. Filter for emails that appear to be important or urgent
3. Create a summary of each important email including:
   - Sender name
   - Subject line
   - Key points (2-3 sentences)
4. Format the summary as a bulleted list
5. Send the summary to me via email

Tip: Be specific! Instead of "check my emails," say "check my Gmail inbox for unread emails from the last 24 hours."

Choose an AI Model

Select the model that powers your agent:

ModelBest For
GPT-4oGeneral tasks, good balance
Claude 4 SonnetWriting, analysis, nuanced work
GPT-4o MiniSimple tasks, cost-effective

Start with GPT-4o if unsure.

Select Tools & Integrations

Choose which connected services the agent can access:

  • Toggle on the integrations it needs
  • Only enable what's necessary (principle of least privilege)
  • The agent can only use enabled integrations

Configure Trigger

Set when the agent runs:

Schedule: Runs at specific times

  • Daily at 8:00 AM
  • Every Monday at 9:00 AM
  • Every hour

Webhook: Runs when called by external service

  • You'll get a unique URL to trigger the agent

Manual: Runs only when you click "Run Now"

Set Notifications

Choose how to be notified when the agent completes:

  • Email: Receive results in your inbox
  • In-app: See notifications in Billix
  • None: Check logs manually

Test Your Agent

Before activating, test the agent:

  1. Click "Test Run"
  2. Watch the execution in real-time
  3. Review the output
  4. Make adjustments if needed

Activate

Once testing succeeds, click "Activate" to turn on the agent. It will now run according to its trigger.

Writing Good Instructions

Structure Your Instructions

Use numbered steps for clarity:

1. [First action]
2. [Second action]
3. [Third action]
4. [Output action]

Be Specific

Check my emails and summarize them.

Problems:

  • Which email account?
  • All emails or just unread?
  • What time range?
  • How detailed should the summary be?
1. Check my Gmail inbox for unread emails received in the last 24 hours
2. For each email, extract:
   - Sender name and email
   - Subject line
   - 2-3 sentence summary of the content
   - Whether it seems urgent (yes/no)
3. Sort by urgency (urgent first)
4. Format as a numbered list
5. Send the formatted summary to me via email with subject "Daily Email Digest"

Handle Edge Cases

Tell the agent what to do in special situations:

If there are no unread emails, send a brief message saying
"No new emails to report."

If there are more than 20 emails, summarize only the 10 most
recent and note that there are more.

Include Format Examples

Show the agent what you want:

Format each email summary like this:

**From:** John Smith (john@example.com)
**Subject:** Q4 Budget Review
**Summary:** Requesting review of the Q4 budget proposal before
            the board meeting on Friday.
**Urgent:** Yes

Common Agent Patterns

Daily Digest Pattern

Name: Daily Email Digest
Trigger: Daily at 7:00 AM

Instructions:
1. Check Gmail for unread emails from the last 24 hours
2. Categorize by priority: High, Medium, Low
3. Summarize high-priority emails in detail
4. List medium and low priority with subject lines only
5. Send digest email with subject "Your Daily Digest - [Date]"

Monitor and Alert Pattern

Name: Important Email Alert
Trigger: Every hour

Instructions:
1. Check Gmail for unread emails from the last hour
2. Look for emails containing "urgent," "ASAP," or "deadline"
3. If found, immediately send me a Slack message in #alerts
   with the sender and subject
4. If none found, do nothing (no notification needed)

Weekly Report Pattern

Name: Weekly Project Report
Trigger: Every Friday at 4:00 PM

Instructions:
1. Get all completed tasks from Notion's Project Board
   from this week
2. Group by project and team member
3. Calculate completion rates
4. Create a summary report with:
   - Total tasks completed
   - Breakdown by project
   - Top contributors
   - Any blocked items
5. Post to #weekly-reports Slack channel

Agent Builder Interface

The agent builder has these sections:

SectionPurpose
Basic InfoName, description
InstructionsMain prompt/instructions
ModelAI model selection
ToolsEnabled integrations
TriggerSchedule, webhook, or manual
NotificationsEmail, in-app, or none
AdvancedTimeout, retries, variables

Testing Tips

Start Small

Begin with a simple version:

  1. Test with one action first
  2. Gradually add complexity
  3. Test each change

Use Test Mode

Test mode lets you:

  • Run without side effects (when possible)
  • See exactly what the agent does
  • Review before enabling real actions

Check Logs

After each run:

  1. Go to the agent's detail page
  2. Click on the run in history
  3. Review the full execution log
  4. Look for errors or unexpected behavior

Troubleshooting

Next Steps

Was this page helpful? Let us know!

Report an issue

On this page