Skip to main content

What Are Agents?

Agents are autonomous AI workers that execute your business workflows. Think of them as digital team members who follow your instructions, understand context from documents, and complete tasks automatically.

Core Principle

Agents combine your instructions + your data + your context to automate complex workflows that typically require human judgment.

Creating Your First Agent

1

Navigate to Home

From the sidebar, click Home or the + New Agent button.
2

Describe Your Workflow

In the automation prompt, describe what you want to automate in natural language.Example:
I want to process incoming invoices from my email,
extract key details, and update my tracking spreadsheet
3

Upload Your Worksheet (Optional)

If your workflow involves data, upload a CSV or Excel file. This becomes your agent’s data layer.
4

Create Agent

Click Create Agent. Decisional will generate initial instructions based on your description.
Pro Tip: Start with a simple workflow, test it, then gradually add complexity. Agents are iterative!

Agent Components

Every agent has five key components:

Instructions

Natural language description of what the agent should do

Worksheet

The spreadsheet where your agent reads and writes data

Sources

Documents that provide context (PDFs, links, files)

Integrations

Connected services (email, CRM, Slack, etc.)

Triggers

How the agent gets activated (schedule, event, manual)
Let’s dive into each component:

Writing Effective Instructions

Instructions are the most important part of your agent. Write them like you’re training a smart new hire.

Best Practices

Bad Example:
Process invoices
Good Example:
You are an Invoice Processing Agent.

For each invoice PDF uploaded:
1. Extract: Invoice number, date, vendor, line items, total
2. Verify the total matches the sum of line items
3. Look up the vendor in the Vendors worksheet
4. Add a new row to the Invoices worksheet with extracted data
5. If total > $10,000, flag for manual review
Tell your agent what “done” looks like:
Success means:
- All required fields are filled
- Total is verified
- Vendor is matched
- Row is added to the correct worksheet
Anticipate problems and tell your agent what to do:
Edge cases:
- If vendor is not found, add them to the Vendors worksheet
- If invoice is duplicate, skip it and log to Errors sheet
- If PDF is unreadable, flag for manual review
- If total doesn't match, recalculate and note discrepancy
If you’ve uploaded context documents, tell your agent when to use them:
Reference the "Invoice Processing SOP.pdf" for formatting rules.
Use the "Vendor Catalog.xlsx" to validate vendor names.
Show your agent what good output looks like:
Example output row:
| Invoice # | Date | Vendor | Total | Status |
| INV-001 | 2025-01-15 | Acme Corp | $5,432.12 | Approved |

Instruction Template

Use this template as a starting point:
You are a [Job Title] Agent.

**Your job:**
[1-2 sentence description of the agent's purpose]

**Inputs:**
- [What data the agent receives]
- [Where it comes from]

**Process:**
1. [First step]
2. [Second step]
3. [Third step]

**Outputs:**
- [What the agent produces]
- [Where it goes]

**Rules:**
- [Important constraints]
- [Quality standards]
- [Edge case handling]

**Success criteria:**
- [How to know it worked]

Configuring Your Worksheet

The worksheet is your agent’s data layer - where it reads inputs and writes outputs.

Worksheet Structure Tips

Use descriptive column names:Good: | Customer Name | Order Date | Product SKU | Quantity | Unit Price | Total |Bad: | Name | Date | Prod | Qty | Price | $ |

Working with Multiple Sheets

You can have multiple sheets in one workbook:
  • Inputs: Raw data the agent processes
  • Outputs: Results the agent generates
  • Reference: Lookup tables (price lists, vendor catalogs)
  • Errors: Failed items that need manual review
Reference sheets in your instructions:
Read customer requirements from the "Requests" sheet.
Look up prices from the "Price List" sheet.
Write quotes to the "Generated Quotes" sheet.
Log any errors to the "Errors" sheet.

Adding Sources

Sources provide context to your agents so they can make informed decisions.

Types of Sources

PDFs

Contracts, invoices, forms, reports, SOPs

Spreadsheets

Price lists, catalogs, historical data

Documents

Policies, templates, procedures

Images

Receipts, forms, diagrams (OCR enabled)

Web Links

Company websites, documentation, APIs

Text Files

Code, configs, raw text data

How to Add Sources

1

Click Sources Tab

In your agent page, click Sources in the left sidebar
2

Upload Files

Click Add SourceUpload FileDrag and drop multiple files at once (up to 50MB per file)
3

Add Web Links

Click Add SourceAdd LinkPaste a URL. Decisional will fetch and index the content.
4

Name Your Sources

Give each source a descriptive name so you can reference it in instructions:Example: “Q4 2024 Price List” instead of “pricelist_final_v3.xlsx”

RAG and Citations

Decisional uses Retrieval-Augmented Generation (RAG) to help agents understand your documents:
  1. Indexing: Your documents are processed and semantically indexed
  2. Retrieval: When the agent needs info, relevant sections are retrieved
  3. Reasoning: The agent uses retrieved context to make decisions
  4. Citation: The agent cites specific pages/sections it referenced
For PDFs, Decisional highlights the exact location the agent read:
  • Page number
  • Paragraph or section
  • Bounding box showing the highlighted text
This makes it easy to verify the agent’s reasoning.
Better sources = better agent performance:
  • Use text-based PDFs (not scanned images, unless you need OCR)
  • Organize documents clearly with headers and sections
  • Remove irrelevant pages (cover pages, blank pages)
  • Use descriptive filenames
  • Keep documents focused (one topic per file)

Connecting Integrations

Integrations let your agent take actions beyond the spreadsheet.

Available Integration Categories

Email:
  • Gmail
  • Outlook
  • SMTP
Messaging:
  • Slack
  • Microsoft Teams
  • Discord
Use cases:
  • Send quotes to customers
  • Notify team of errors
  • Post updates to channels

Using Integrations in Instructions

Once connected, reference integrations in your agent instructions:
When a quote is approved:
1. Send an email via Gmail to the customer
2. Update the deal stage in HubSpot to "Quote Sent"
3. Post a notification to the #sales Slack channel
4. Save the quote PDF to Google Drive
Make sure you’ve authorized the integration in Settings → Integrations before referencing it in instructions.

Setting Up Triggers

Triggers control when your agent runs.

Trigger Types

Click the Run buttonBest for:
  • Testing new agents
  • One-off tasks
  • Ad-hoc workflows
How to use: Click Test Run in the agent page

Testing Your Agent

Before going live, always test your agent thoroughly.

Testing Workflow

1

Prepare Test Data

Create a small dataset (5-10 rows) with:
  • Typical cases
  • Edge cases
  • Known error cases
2

Run Test

Click Test Run and watch the AI Assistant panel for real-time reasoning
3

Review Output

Check that:
  • All expected columns are filled
  • Data is accurate
  • Formatting is correct
  • Edge cases are handled
4

Check Citations

If using sources, verify the agent cited the right documents
5

Iterate Instructions

If results aren’t perfect, refine your instructions and test again

Common Issues & Fixes

Problem: Some columns are empty or incompleteSolutions:
  • Make it explicit in instructions: “You MUST fill all columns”
  • Provide examples of complete output
  • Add a validation rule: “If any required field is missing, flag for review”
Problem: Agent does something unexpectedSolutions:
  • Break down complex steps into simpler ones
  • Add more examples
  • Use numbered steps instead of paragraphs
  • Be more explicit about what NOT to do
Problem: Agent says it doesn’t have the required dataSolutions:
  • Check that sources are uploaded and indexed
  • Reference sources by name in instructions
  • Verify the information is actually in the documents
  • Check worksheet column names match instructions
Problem: Agent takes too long to runSolutions:
  • Reduce the number of sources (only upload what’s needed)
  • Process in smaller batches
  • Remove large, irrelevant documents
  • Simplify instructions (fewer steps)

Advanced Agent Patterns

Multi-Step Workflows

For complex workflows, break them into multiple agents:
1

Agent 1: Data Collection

Collects and validates input data
2

Agent 2: Processing

Performs the core task
3

Agent 3: Distribution

Sends results to stakeholders
Connect them with triggers: Agent 1’s completion triggers Agent 2, and so on.

Human-in-the-Loop

For high-stakes decisions, add manual review:
If the quote total exceeds $50,000:
1. Mark status as "Needs Review"
2. Send a Slack notification to @sales-manager
3. Wait for human approval before proceeding

Error Handling

Build resilience into your agents:
Error handling rules:
- If an error occurs, log it to the "Errors" sheet
- Send a notification to the admin
- Continue processing remaining items (don't stop)
- Retry failed items once before flagging

Chaining with APIs

Use agents to orchestrate API calls:
1. Fetch customer data from Salesforce API
2. Enrich with data from Clearbit API
3. Update the worksheet with combined data
4. Send personalized email via Gmail

Monitoring & Optimization

View Run History

1

Go to Runs Tab

Click Runs in the left sidebar
2

Review Executions

See all past runs with:
  • Status (Running, Completed, Failed, Needs Review)
  • Duration
  • Timestamp
  • Inputs and outputs
3

Click for Details

Click any run to see:
  • Full execution log
  • AI reasoning step-by-step
  • Source citations
  • Error messages (if failed)

Performance Metrics

Track your agent’s performance:
  • Success rate: % of runs that complete successfully
  • Average duration: How long runs take
  • Error patterns: Common failure reasons
  • Manual review rate: How often human intervention is needed

Optimization Tips

Reduce Run Time

  • Upload only necessary sources
  • Process in batches
  • Use lighter file formats
  • Cache reference data in worksheet

Improve Accuracy

  • Add more examples
  • Upload better source documents
  • Add validation rules
  • Test with edge cases

Handle More Volume

  • Increase schedule frequency
  • Use event-based triggers
  • Process in parallel (multiple agents)
  • Optimize worksheet structure

Reduce Errors

  • Add error handling rules
  • Validate inputs first
  • Use try-catch patterns
  • Log everything for debugging

Best Practices

Start simple, iterate: Don’t try to build a perfect agent on day one. Start with the core workflow and add features over time.
Test with real data: Use actual examples from your business, not synthetic test data.
Document your agents: Add comments in instructions explaining why certain rules exist.
Version control: Before making major changes, duplicate your agent so you can roll back if needed.
Monitor continuously: Check run history regularly, especially in the first few weeks.
Get feedback: Have actual users test your agent and report issues.

Next Steps