Inspiration

I built this tool because a lot of charities have a ton of data but don't have the ability or capacity to analyze their donation data.

What it does

Dando is a donor intelligence tool that transforms donation data into high level insights. It leverages data analytics to provide key insights into donation, donor segmentation. It also has AI agents powered by Elasticsearch AgentBuilder. These were all custom agents as the use case was primarily focused on non profit monetary donations. The agents are: Major Gift Agent, The Donor Health Agent, The Campaign Simulator and The Donation Forecaster Agent. Each agent was given clear purpose and instructions on what it should do, a non profit persona.

Agentic Information

*1. The Major Gift Agent * Logic: It looks for donors with high lifetime value (LTV) but low recent frequency, suggesting untapped capacity. Data Input: Top 5% of donors by total contribution and years of tenure.
Goal: Identify 3 "Hidden Champions" who are ripe for a major gift ask. Design: It used ES|QL to get the necessary information. Data was uploaded to elasticsearch. It also uses the Inference API to find donors whose past giving patterns semantically match the profiles of current major donors.

2. The Donor Health Agent Implements "Churn Velocity" analysis. It flags donors whose "Days Since Last Gift" exceeds their personal 3-year average by more than 20%. Data Input: donation transaction data. Goal: Generate a "Rescue List" of donors requiring immediate stewardship. Design: It used ES|QL to get the necessary information. Data was uploaded to elasticsearch. It also used the Inference API to translate the data, generate the reasoning and output.

3. The Campaign Simulator Agent Logic: It takes user-defined targets and compares them against historical segment response rates. Data Input: Segment, donation amount and donation target. Goal: Provide a feasibility score and "What-if" adjustments to reach the goal. Design: Uses the inference API to structure the reasoning and the output

4. The Donation Forecaster Agent Logic: It interprets the forecasted donation, identifying if a projected dip is a seasonal norm or a structural decline. Data Input: forecast data filtered by donation segment. Goal: To translate complex time-series data into a plain-English executive summary for board-level reporting. Design: Uses the inference API to structure the reasoning and output

How we built it

  • Inference Layer: We leveraged the Elasticsearch Inference API to decouple our reasoning logic from the application code. This allows for centralized security, consistent model headers, and high-speed execution using Gemini 2.5 Flash and Pro.

  • Data Pipeline: A custom Narrative Injection engine was developed to bypass traditional JSON bloat. By converting DataFrames into token-efficient strings, we reduced payload size by 70%, ensuring agents process data within tight server-side windows.

  • UI Orchestration: The frontend uses a State-Machine Navigation pattern in Streamlit. It was initially built as native tabs but later changed to radio button in order to eliminate "tab jumping" and maintained a persistent, professional user experience during asynchronous AI calls.

  • Logic Registry: A centralized AGENT_REGISTRY the data file which maps specific business personas to dedicated models and system prompts, allowing for rapid scaling and agent specialization.

Challenges

The primary hurdle was Gateway Latency. Managed inference services often enforce a strict 10-second watchdog timer. This challenge was overcome by implementing server-side timeout overrides (timeout="60s") and aggressive data pruning. Another issue that was encountered was that since Streamlit is reactive, when a button is clicked it re-runs the app and in some cases the UI can jump to another tab. This was fixed by using radio buttons instead of tabs for the different sections in the app.

What we learned

The biggest learning for me, was getting a better understanding of Elasticsearch. This was the first time using the product. It was easy to integrate with Streamlit since there was already an Wlasticsearch library. The library was easy to use which made developing this app easy. Would love if they had a longer trial period.

What's next for Dando

  • Building an end to end agentic system with a human in the loop for final outreach
  • Generalizing the system so that more charities can add their data
  • Moving to a different python setup potentially flaskAPI

Built With

Share this project:

Updates