{"slug": "i-gave-an-ai-agent-three-years-of-deal-history-here-s-the-first-pattern-it-found", "title": "I Gave an AI Agent Three Years of Deal History. Here's the First Pattern It Found.", "summary": "A developer connected Claude to a client's HubSpot pipeline via an MCP server and, after feeding it three years of closed deal history, found that time spent in one middle sales stage past a certain threshold predicted Closed Lost outcomes better than deal size or sales rep. The finding illustrates how an agent with raw-record access can restate questions a fixed dashboard never asks, rather than running smarter queries.", "body_md": "I connected Claude to a client's HubSpot pipeline through our MCP server, gave it three years of\n\nclosed deal history, and asked one open question: \"what should I be worried about in this\n\npipeline that isn't in the current dashboard.\" No leading question, no hint at what I already\n\nsuspected.\n\nThe first thing it flagged wasn't a number. It was a stage.\n\nIt noticed that a disproportionate share of deals that eventually closed had spent an unusually\n\nlong stretch sitting in the same middle stage before moving, and that deals which spent longer than\n\nthat stretch in that stage were far more likely to eventually go to Closed Lost than the ones that\n\nmoved through quickly. Not \"deals in this stage are risky,\" which is a fact you could get from a\n\nfunnel chart. The specific claim was: *time spent in this one stage*, past a certain point,\n\npredicted the outcome better than any other single field in the record, including deal size and\n\nsales rep.\n\nThat's a pattern a dashboard built to show funnel counts by stage will never surface, because a\n\nfunnel chart answers \"how many deals are in each stage right now,\" not \"how long has each deal\n\nindividually been sitting there, and does that duration itself carry signal.\" The agent wasn't\n\nrunning a smarter query, it was asking a different question of the same data.\n\nA saved dashboard answers the question it was built to answer, forever, until someone rebuilds it.\n\nAn agent with read access to the raw records and no fixed question can restate the question every\n\ntime you ask it something new. The gap between those two things is the entire reason \"AI reading\n\nyour CRM\" is worth building rather than just being a novelty:\n\n```\n# Simplified shape of what the agent actually queried, once it decided\n# stage duration was worth checking\ndef stage_duration_vs_outcome(deals: list[dict]) -> dict:\n    \"\"\"deals: [{stage, days_in_stage, outcome}, ...]\n    outcome is 'won' or 'lost'. Groups by stage, then checks whether\n    duration correlates with the eventual outcome inside that stage.\n    \"\"\"\n    from collections import defaultdict\n    from statistics import mean\n\n    by_stage = defaultdict(lambda: {\"won_days\": [], \"lost_days\": []})\n    for d in deals:\n        bucket = \"won_days\" if d[\"outcome\"] == \"won\" else \"lost_days\"\n        by_stage[d[\"stage\"]][bucket].append(d[\"days_in_stage\"])\n\n    return {\n        stage: {\n            \"avg_days_won\": mean(v[\"won_days\"]) if v[\"won_days\"] else None,\n            \"avg_days_lost\": mean(v[\"lost_days\"]) if v[\"lost_days\"] else None,\n        }\n        for stage, v in by_stage.items()\n    }\n```\n\nNo agent needed to write that function, I could write it myself in five minutes. What I wouldn't have done in five minutes is think to ask the question in the first place, across every stage, every rep, and every quarter, without a hypothesis already narrowing where I looked. That's the actual value: not a smarter calculation, a wider search.\n\nThe underlying problem the agent surfaced (a stage that quietly concentrates risk) is the same pattern behind [what gets lost after every discovery call](https://artefactventures.com/en/blog/conversation-intelligence-for-sales) when there's no structured way to capture why a deal stalled. It's also a direct instance of [revenue leakage from architecture gaps](https://artefactventures.com/en/blog/revenue-leakage): the CRM had the data the whole time, and nobody had asked it the right question.\n\n**Try it on your own pipeline**\n\nIf you want to see what an agent finds in your own pipeline before you decide whether it's worth running for real, the MCP server is free to install:\n\nAnd if what it finds is the kind of thing you'd rather walk through with someone than read off a screen alone, [book a call](https://artefactventures.com/en/contact?hsLang=en&utm_source=devto&utm_medium=guest_content&utm_campaign=devto-2026-q4-waterfall&utm_content=devto_ai-agent-deal-history) and bring what it surfaced.\n\n*If you've pointed an agent at your own CRM with no leading question, I'd like to hear what it found that your dashboard hadn't shown you.*", "url": "https://wpnews.pro/news/i-gave-an-ai-agent-three-years-of-deal-history-here-s-the-first-pattern-it-found", "canonical_source": "https://dev.to/artefactventures/i-gave-an-ai-agent-three-years-of-deal-history-heres-the-first-pattern-it-found-185", "published_at": "2026-10-15 19:45:54+00:00", "updated_at": "2026-10-15 19:56:57.177363+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools"], "entities": ["Claude", "HubSpot", "MCP", "Artefact Ventures"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-gave-an-ai-agent-three-years-of-deal-history-here-s-the-first-pattern-it-found", "markdown": "https://wpnews.pro/news/i-gave-an-ai-agent-three-years-of-deal-history-here-s-the-first-pattern-it-found.md", "text": "https://wpnews.pro/news/i-gave-an-ai-agent-three-years-of-deal-history-here-s-the-first-pattern-it-found.txt", "jsonld": "https://wpnews.pro/news/i-gave-an-ai-agent-three-years-of-deal-history-here-s-the-first-pattern-it-found.jsonld"}}