Projects / AI operations

OpsPilot.

ProductionIn daily use since 2025 / Oracle Cloud, systemd

It lives in Teams, reads 6,124+ company documents, pulls live accounting and CRM data, and drafts answers in my voice. Nothing sends without my approval.

In plain wordsA helper that lives in my work chat. Ask it a question and it finds the answer across our files and systems, then drafts the reply. Nothing goes out until I press approve. Try it below

95,000+lines of code
43features live
6,124+documents indexed
100%on a 50-query test suite

The problem

Where the hours went

I work in finance and operations at a tech company. My day is split across Teams, SharePoint, Xero, HubSpot and email. Someone asks a question in one system and the answer sits in another. The context for why it matters is somewhere else again. I was spending hours just pulling data, missing follow-ups because nobody tracked who said what, and scrambling for context five minutes before meetings.

"What does the contract say about payment terms?" That's a SharePoint search. "Who hasn't paid us?" That's Xero. "What deals is the sales team working on?" HubSpot. "Tell me about this customer." That needs all three. The information always existed. It was scattered across 6,124+ documents and half a dozen systems.

Debit: before

  • Dig through 6,124+ SharePoint files by hand
  • Log into Xero, HubSpot, email and calendar separately for every question
  • Miss follow-ups because nobody tracked who promised what
  • Scramble for context five minutes before a meeting

Credit: after

  • Ask a question in Teams, get an answer from any source in seconds
  • Morning briefing with everything that matters before 9am
  • Commitment tracker catches every promise, nudges when overdue
  • Pre-meeting brief lands before every call

How it works

Nine stages, one approval

Someone asks a question in Teams. The pipeline triages it, figures out whether it needs documents, live accounting data, CRM data, or a mix, and returns an answer as an Adaptive Card with approve, edit and reject buttons. Live data questions hit Xero or HubSpot directly, zero LLM cost. Document questions run a hybrid search. Cross-source questions go through a single orchestrator call with 25 orchestrator tools. A PII blocker sits in front of everything that leaves.

  1. Teams webhook receives the message inside the Bot Framework turn
  2. Dedup gate drops repeats before they cost anything
  3. Smart triage, two layers: keywords first, a fast model for the rest. Work, personal or noise
  4. Intent router picks the source: documents, Xero, HubSpot, multi-source, reconciliation or journal
  5. Retrieval: BM25 + FAISS hybrid with reciprocal rank fusion and an AI reranker for documents; direct API reads for live data
  6. Multi-draft generation in my writing style, several answer shapes to choose from
  7. Sensitivity gate: UK PII detector, a hard blocker before anything can auto-send
  8. Adaptive Card builder formats the answer with sources and figures
  9. Approve, edit or reject. A human signs every entry. By design
Test suiteScopeResult
Document search50 production queries50/50
Triage20 labelled messages20/20
Intent routing45 queries across 6 sources45/45
Conversation follow-up54 multi-turn cases54/54
The search pipeline is frozen at 100%No changes until it misses
OpsPilot / draft for approvalAdaptive Card
"Where's the signed Acme master agreement? Client call in 20 minutes."
Found it: Acme_MSA_signed.pdf in Contracts/2024, countersigned 12 Mar. Drafted the reply with the file link and the two clauses they'll ask about.
PDF / CONTRACTS/2024 / 1.2 MB
It's live. Your call: approve, edit or reject.

The dashboard

OpsPilot overview, reconstructed with sample items: frozen test suites all passing, build figures, and three drafts waiting for approve, edit or reject
OpsPilot overviewReconstruction: build figures real, work items sample

What it does

Beyond answering
  • Hybrid searchVague questions still land on the right document. BM25 matches keywords and FAISS matches meaning, reciprocal rank fusion merges the two, and an AI reranker picks the top five. HyDE query expansion adds domain terms before the search runs.
  • Live data, no hallucination surface"Who hasn't paid us?" reads Xero receivables directly. "What deals are open?" queries the HubSpot pipeline. 17 direct API actions that skip the LLM entirely. The numbers come back formatted, not generated. Xero access is read-only by design.
  • Autonomous monitoringMorning briefing at 08:00, evening wrap at 17:30. Deal-stage checks run every five minutes during business hours. An invoice scanner reads PDFs from my inbox, extracts line items, matches them against Xero and flags duplicates and price drift. A commitment tracker detects promises in Teams and email and alerts when they slip.
  • DashboardA React dashboard on precomputed state: P&L, cash position, pipeline, receivables, engagement. FastAPI serves it from SQLite so the page never waits on a third-party API.
  • Personal growth journalEvery evening it writes a first-person diary entry from the day's activity, then a behavioural layer flags blind spots: unreplied messages, tone drift, people I haven't spoken to in a while. Weekly digest on Fridays.
  • Conversation memory and approvalPer-user context with a two-hour window and ten-turn memory, so "what about their payment terms?" knows who "they" are. Every answer returns as options; nothing goes out unapproved. It learns which answer style I tend to pick.

What went wrong

The 1am journal

OpsPilot writes me a daily journal from my own mail, calendar and chats. One week it told me I'd been online at 1am, then 2am. I hadn't. The sent-mail query used Graph's /messages endpoint with a date filter, and that endpoint returns mail from every folder, not just Sent Items. Automated notifications landing overnight were being counted as mail I'd sent. The fix was to ask the Sent Items folder directly, and the rule now is never to assume an endpoint filters by folder.

A wrong number that looks wrong gets caught. One that describes a believable bad week doesn't.

Stack

Python 3.12Backend, pipeline and API, one codebase
Gemini 2.5 Flash / ProPrimary models: triage, drafting, reasoning
ClaudeTool-use orchestration and fallback in the LLM cascade
FAISS + BM25Hybrid retrieval with rank fusion
Microsoft GraphTeams, SharePoint, calendar, email
Bot FrameworkTeams webhook handler, aiohttp
Xero APIAccounting data, read-only by design
HubSpot APICRM and sales pipeline
React 19 + ViteDashboard, TypeScript throughout
FastAPI + SQLitePrecomputed state, no live waits
APSchedulerBriefings and scheduled jobs
Oracle CloudUbuntu VM, systemd, auto-deploy

Other projects

RefProjectSummaryStatus
02 Trading Bot Four AI agents that veto my trades. 115+ sessions, zero impulsive trades let through. Paper trading
03 Uni-Nation Digital Website, inventory PWA and Hindi voice stock entry for the family fabric business. Being repaired
04 WhatsApp Smart A Chrome extension that gives WhatsApp scheduling, AI replies and summaries. Prototype
05 SCS Cockpit The study engine I built for my own CIMA Strategic Case Study. I passed. Retired, job done