Skip to main content

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.

Try them live

All samples are available as interactive demos at distri.dev/samples. Chat with the agents, trigger tool calls, and see real-time responses.


Overview

SampleUse CaseKey ToolsModel
Form FillerConversational form fillingfill_multiple_fields, get_form_values, submit_formgpt-4.1-mini
Data ReconciliationRecord matching and discrepancy analysisrun_reconciliation, get_discrepancies, highlight_discrepanciesgpt-4.1-mini
Bank ReconciliationBank statement and invoice matchingsearch_invoices_batch, update_bank_records_batchgpt-4.1-mini
Financial Co-pilotMulti-step report consolidationprocess_file_to_markdown, combine_financials, set_reportgpt-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

  1. The agent is defined in a markdown file with extraction instructions
  2. React-defined external tools let the agent interact with the form DOM
  3. A beforeSendMessage hook injects form HTML so the agent knows the available fields
  4. 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

ToolDescription
fill_multiple_fieldsFill multiple form fields in a single call
get_form_valuesRead current values of all form fields
get_field_optionsGet dropdown/select options for a field
clear_formReset all fields to empty
submit_formSubmit 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

  1. The agent runs reconciliation to match internal and external records by reference number
  2. Tools like get_discrepancies and get_unmatched let you drill into issues
  3. Visual highlighting shows matched records (green) and discrepancies (red) in the data grid

Tools

ToolDescription
run_reconciliationMatch internal and external records
get_discrepanciesGet records with mismatched amounts
get_unmatchedFind records without matches
explain_recordDetailed explanation of a specific record
highlight_discrepanciesVisually highlight issues in the grid
add_noteAdd 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

  1. Two-tab interface — Bank Statements and Invoices (Sales | Expense)
  2. Batch processing — AI processes records in configurable batch sizes (5, 10, or 15)
  3. Draft state management — AI changes are marked as drafts for user review
  4. 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:

ConditionStatusAction
Exact match (< $0.01 diff)matchedAuto-reconcile
Rounding error (< $0.10 diff)matchedReconcile with comment
Small discrepancy (< $100 diff)discrepancyFlag with explanation
Large discrepancymanual_reviewEscalate 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

StepTabActionTools Used
1Source FilesSelect financial files (Excel, PDF) from simulated Google Driveget_source_files, get_selected_files
2Process FilesExtract financial data into structured formatprocess_file_to_markdown
3CombineMerge data from all sources with side-by-side comparisoncombine_financials, get_financial_summary
4ReportGenerate comprehensive markdown reportset_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:

PatternWhere You See It
External tools ([tools] external = ["*"])All samples — agents call client-side functions
Tool factory patternForm Filler and Bank Recon — tools created with shared config
Batch processingBank Recon — configurable batch sizes with hasMore pagination
Dynamic context injectionForm Filler — beforeSendMessage injects form HTML
Multi-step workflowsFinancial Co-pilot — 4-tab sequential workflow
Draft state managementBank Recon — AI changes marked as drafts for user review

References