[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f1csyghn9gbyp7":3},{"_id":4,"slug":5,"title":6,"subtitle":7,"kind":8,"cards":9,"tags":58,"categories":60,"source":62,"lang":65,"author":66,"audioState":69,"stats":70,"publishedAt":73,"renderer":74},"6abc0fb1ca21c797c7e9e48a","why-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d","Why We Stored Typed Events Instead of Embeddings for Our Agent's Memory","Our competitive intelligence pipeline could write a good briefing, but only for one run.","news",[10,13,18,23,28,33,38,43,48,53],{"headline":6,"body":11,"imageUrl":12,"sourceImageUrl":12},"Our competitive intelligence pipeline could write a good briefing, but only for one run. Give it a topic and some competitors, and CrewAI agents research the web, analyse the findings, and write a report where every claim has a citation. The next run started from zero. In week 8 it had no idea weeks 1 to 7 existed.","https:\u002F\u002Fmedia2.dev.to\u002Fdynamic\u002Fimage\u002Fwidth=1200,height=627,fit=cover,gravity=auto,format=auto\u002Fhttps%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwbm2ybyzoz460fkmgufv.png",{"headline":14,"body":15,"imageUrl":16,"images":17},"That made it a lookup with nice formatting","That made it a lookup with nice formatting. An analyst who sees five moves from one company in a quarter calls it a pattern. Ours could only describe today's news. So we added persistent memory and made it central to the design. The design choice: structure first","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F1.webp",{"local":16},{"headline":19,"body":20,"imageUrl":21,"images":22},"The obvious move is to embed every finding","The obvious move is to embed every finding into a vector store and retrieve by similarity. We went the other way and stored typed events. Each finding becomes a CompetitorEvent (Pydantic) with a competitor, an event type (feature launch, pricing change, hiring, acquisition, funding, partnership, market signal), a date, a title, a description, an impact score, a confidence value, and evidence URLs.","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F2.webp",{"local":21},{"headline":24,"body":25,"imageUrl":26,"images":27},"The reason is the questions strategy work asks","The reason is the questions strategy work asks: \"every pricing change in the last 90 days\" or \"how many hiring events this quarter\". A typed query answers those exactly, with date ordering and no ranking noise.","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F3.webp",{"local":26},{"headline":29,"body":30,"imageUrl":31,"images":32},"The store is a class we wrote, HindsightStore","The store is a class we wrote, HindsightStore (memory\u002Fhindsight_store.py). It's plain Python: an append-only events.jsonl, plus JSON files for profiles, strategies, and predictions. It's thread-safe and reloads from disk on startup. It is our own implementation and not the Vectorize Hindsight library, which is a separate open-source memory system: https:\u002F\u002Fgithub.com\u002Fvectorize-io\u002Fhindsight Where memory sits in the pipeline","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F4.webp",{"local":31},{"headline":34,"body":35,"imageUrl":36,"images":37},"The crew grew from four agents (Discovery, Research","The crew grew from four agents (Discovery, Research, Analyst, Writer) to seven: Discovery, Research, Memory, Analyst, Strategy Evolution, Prediction, and Writer.","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F5.webp",{"local":36},{"headline":39,"body":40,"imageUrl":41,"images":42},"Agents share one CrewAI tool, HindsightStoreTool, with six","Agents share one CrewAI tool, HindsightStoreTool, with six operations: store_event, get_history, get_profile, search_memory, get_strategy, and get_predictions. The Memory Agent stores each Research finding, then pulls history and a profile per competitor and hands the Analyst a memory-enriched context. The Analyst's task text requires it to use that history. Strategy and Prediction call the tool too, and predictions must cite stored events. Profiles update on every write Each store_event call recomputes a per-competitor profile. There's no batch job. The core logic:","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F6.webp",{"local":41},{"headline":44,"body":45,"imageUrl":46,"images":47},"Confidence starts at 0.3, gains 0.07 per event","Confidence starts at 0.3, gains 0.07 per event, and caps at 0.98. The Writer is told to hedge for low-confidence competitors, so the briefing's tone follows how much evidence we hold.","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F7.webp",{"local":46},{"headline":49,"body":50,"imageUrl":51,"images":52},"We tried it on a fictional competitor, \"NeuraCode","We tried it on a fictional competitor, \"NeuraCode AI\". The store ships with seeded demo data, and scripts\u002Fdemo_memory.py runs the whole sequence with no LLM and no network. These are demo events, not market data. Before: one stored event. The Analyst can only restate it: \"NeuraCode launched an AI code review tool.\"","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F8.webp",{"local":51},{"headline":54,"body":55,"imageUrl":56,"images":57},"After: six events (code review tool, 15 ML","After: six events (code review tool, 15 ML engineers hired, enterprise tier at $45\u002Fseat\u002Fmonth, a $28M analytics acquisition, a security scanner, a JetBrains integration). The profile shows total_events = 6 and 72% confidence, straight from the formula. The Analyst now has product, talent, pricing, M&A, and distribution signals with dates. This is a controlled demo, not a benchmark. We haven't measured briefing quality over weeks of live runs. The trade-off we accepted","\u002Fapi\u002Fmedia\u002Fposts\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-age-6bad164d\u002F9.webp",{"local":56},[59],"dev",[61],"Technology",{"name":63,"url":64},"Dev.to","https:\u002F\u002Fdev.to\u002Fnavya_thottempudi\u002Fwhy-we-stored-typed-events-instead-of-embeddings-for-our-agents-memory-dc4","en",{"handle":67,"displayName":68},"spots","Spots","queued",{"views":71,"likes":72,"saves":72,"shares":72,"completions":72,"opens":72,"skips":72,"depthSum":72},4,0,"2026-09-29T19:21:21.893Z","local"]