Samples
Interactive demos that showcase how Distri agents integrate with real product interfaces. Each sample demonstrates a different use case — from form filling to financial reconciliation.
All samples are available as interactive demos at distri.dev/samples. Chat with the agents, trigger tool calls, and see real-time responses.
Overview
| Sample | Use Case | Key Tools | Model |
|---|---|---|---|
| Form Filler | Conversational form filling | fill_multiple_fields, get_form_values, submit_form | gpt-4.1-mini |
| Data Reconciliation | Record matching and discrepancy analysis | run_reconciliation, get_discrepancies, highlight_discrepancies | gpt-4.1-mini |
| Bank Reconciliation | Bank statement and invoice matching | search_invoices_batch, update_bank_records_batch | gpt-4.1-mini |
| Financial Co-pilot | Multi-step report consolidation | process_file_to_markdown, combine_financials, set_report | gpt-4.1-mini |
Form Filler
AI assistant that fills forms from natural conversation. Users describe information in plain language and the agent extracts and populates the relevant fields automatically.
How it works
- The agent is defined in a markdown file with extraction instructions
- React-defined external tools let the agent interact with the form DOM
- A
beforeSendMessagehook injects form HTML so the agent knows the available fields - The agent parses the user's message, calls
fill_multiple_fields, and confirms what was filled
Agent definition
name = "form_filler_agent_v2"
description = "AI assistant that analyzes form HTML and fills multiple fields at once"
max_iterations = 5
tool_format = "provider"
[tools]
external = ["*"]
[model_settings]
model = "gpt-4.1-mini"
temperature = 0.5
max_tokens = 800
Tools
| Tool | Description |
|---|---|
fill_multiple_fields | Fill multiple form fields in a single call |
get_form_values | Read current values of all form fields |
get_field_options | Get dropdown/select options for a field |
clear_form | Reset all fields to empty |
submit_form | Submit the completed form |
Try it
"I'm John Smith ([email protected]). Yesterday we had a phishing attack where several employees received fake emails. I'd classify it as medium impact. We should implement additional email filtering."
The agent parses the message, calls fill_multiple_fields to populate all relevant fields, and confirms what was filled.
Data Reconciliation
AI-powered data matching and discrepancy analysis. The agent compares internal records against external data sources, identifies matches and mismatches, and provides explanations for each reconciliation decision.
How it works
- The agent runs reconciliation to match internal and external records by reference number
- Tools like
get_discrepanciesandget_unmatchedlet you drill into issues - Visual highlighting shows matched records (green) and discrepancies (red) in the data grid
Tools
| Tool | Description |
|---|---|
run_reconciliation | Match internal and external records |
get_discrepancies | Get records with mismatched amounts |
get_unmatched | Find records without matches |
explain_record | Detailed explanation of a specific record |
highlight_discrepancies | Visually highlight issues in the grid |
add_note | Add explanation notes to records |
Bank Reconciliation
AI-powered bank statement and invoice matching with step-by-step reconciliation. The agent processes records in batches, categorizes transactions, identifies discrepancies, and provides detailed comments for each decision.
How it works
- Two-tab interface — Bank Statements and Invoices (Sales | Expense)
- Batch processing — AI processes records in configurable batch sizes (5, 10, or 15)
- Draft state management — AI changes are marked as drafts for user review
- Discrepancy detection — Finds rounding errors, amount mismatches, and unmatched records
Agent definition
name = "recon_2"
description = "AI agent for bank statement reconciliation and invoice matching"
max_iterations = 20
tool_format = "provider"
[tools]
external = ["*"]
[model_settings]
model = "gpt-4.1-mini"
temperature = 0.2
max_tokens = 1200
Reconciliation rules
The agent follows a strict matching hierarchy:
| Condition | Status | Action |
|---|---|---|
| Exact match (< $0.01 diff) | matched | Auto-reconcile |
| Rounding error (< $0.10 diff) | matched | Reconcile with comment |
| Small discrepancy (< $100 diff) | discrepancy | Flag with explanation |
| Large discrepancy | manual_review | Escalate for review |
Sample data
The demo includes realistic scenarios: 10 exact matches, 5 rounding errors, 5 small discrepancies, 5 unmatched bank transactions, 10 unmatched invoices, and 5 records missing category assignment.
Financial Co-pilot
AI-powered report consolidation for Vietnamese subsidiaries. A 4-tab workflow that takes you from raw source files to a polished consolidated financial report.
Agent definition
name = "financial_copilot"
description = "AI assistant for consolidating Vietnamese subsidiary financial reports"
max_iterations = 15
tool_format = "provider"
[tools]
external = ["*"]
[model_settings]
model = "gpt-4.1-mini"
temperature = 0.3
max_tokens = 2500
Workflow
| Step | Tab | Action | Tools Used |
|---|---|---|---|
| 1 | Source Files | Select financial files (Excel, PDF) from simulated Google Drive | get_source_files, get_selected_files |
| 2 | Process Files | Extract financial data into structured format | process_file_to_markdown |
| 3 | Combine | Merge data from all sources with side-by-side comparison | combine_financials, get_financial_summary |
| 4 | Report | Generate comprehensive markdown report | set_report, export_to_google_doc |
Key features
- All values formatted in VND (Vietnamese Dong)
- Automatic calculation of financial ratios (Profit Margin, Debt-to-Equity)
- Data validation to catch errors and inconsistencies
- Diff view for comparing report versions
- Export to Google Docs
What These Samples Demonstrate
Each sample showcases core Distri patterns that apply to any product integration:
| Pattern | Where You See It |
|---|---|
External tools ([tools] external = ["*"]) | All samples — agents call client-side functions |
| Tool factory pattern | Form Filler and Bank Recon — tools created with shared config |
| Batch processing | Bank Recon — configurable batch sizes with hasMore pagination |
| Dynamic context injection | Form Filler — beforeSendMessage injects form HTML |
| Multi-step workflows | Financial Co-pilot — 4-tab sequential workflow |
| Draft state management | Bank Recon — AI changes marked as drafts for user review |