Rebuilding a context-blind email AI into a stateful sales engine
AI Account Executive already existed, and its AI core had hit a ceiling: every part of an email was generated in isolation, so the finished message read like three disconnected fragments. Langbase's founder recommended us directly, and we rebuilt the composer so every step is written in full context, then added a revision chatbot that works on whatever the rep highlights.
See it live at aiaccountexecutive.com
Challenges and solutions
Generating an email that actually reads as one email
The challengeThe composer treated AI generation as a set of isolated tasks. A rep generated a hook, then a story, then an outcome, each on its own, then stitched them together by hand. Because the steps never shared context, the story did not build on the hook and the outcome did not pay off the story. The result read like three fragments, not one persuasive message.
What we shippedWe rebuilt the composer so the AI always knows what came before. The hook is generated first, and every later step is written with the earlier content in context. The email arrives coherent instead of needing a human to make it make sense.
Letting a rep fix one part without breaking the rest
The challengeThere was no way to refine a single section. Asking to rewrite one part meant breaking the whole structure, so reps either accepted output they were not happy with or rewrote it by hand, which defeats the point of the product.
What we shippedAny section can now be regenerated on its own with plain-language instructions: shift the tone, shorten or lengthen it, or rework the story to match a specific hook, all without touching the rest of the email.
Bringing that control to the rest of the app
The challengeThe flexibility stopped at the composer. Everywhere else in the product a rep was back to copying text out, pasting it somewhere else to improve it, and pasting the result back.
What we shippedWe built a context-aware revision chatbot. When a rep highlights any part of their content, a hook, a value proposition, a line in the email, that selection is attached to the chatbot's context automatically. They can ask it to sharpen, rewrite or critique exactly that piece, get a suggestion that understands where it sits in the sales cycle, and paste it straight back.
Making the founder's sales method run the same way every time
The challengeOutput quality depended on whether a given prompt happened to land. The founder's proprietary sales methodology was the product's real differentiator, and it was being applied inconsistently across the generation steps.
What we shippedWe audited and rewrote the Langbase pipes underneath the features. Inputs were standardized, system prompts tightened to follow the methodology, and models tuned for consistency, so the output is on-method every time rather than when the prompt gets lucky.
Staying reliable when the model is slow or the data is thin
The challengeReal usage surfaced the ugly cases. A slow upstream response would time out part-way through a generation. A missing or partial persona would fail an otherwise valid run. And a credit could be deducted for work that never actually completed.
What we shippedWe made generation resilient. Persona handling degrades gracefully instead of failing the request, credit deduction retries rather than quietly charging for nothing, and timeouts were tuned to the real latency of the AI calls, so a slow response stays a slow response instead of surfacing as an error.
Before and after
- BeforeHook, story and outcome generated in isolationAfterEvery step written with everything before it in context
- BeforeRewriting one section broke the whole emailAfterAny section regenerated on its own, in plain language
- BeforeCopy-paste between the AI and the editorAfterHighlight anything in the app and revise it in place
- BeforeQuality depending on whether a prompt landedAfterThe founder's sales method executed consistently in code
- BeforeA slow model response surfacing as a failed generationAfterGraceful degradation, retries, and realistic timeouts
How we were brought in
AI Account Executive is a sales copilot built to work like a top 1% account executive: it researches accounts, maps a rep's value to a buyer's needs, and writes hyper-relevant outreach. The product already existed and was in real use.
The founder needed A++ Langbase engineers and posted in the Langbase community looking for them. Langbase's founder, Ahmad Awais, recommended us directly. We joined as the AI engineering team to fix the part of the product that mattered most: how it generates email.
The AI worked one box at a time, with no memory of what came before. Everything downstream of that, the flow of the email, the ability to refine a single part, the consistency of the founder's method, was broken by the same root cause.
From fragments to one connected email

Refinement, everywhere in the product

We turned a context-blind prompt wrapper into a stateful, context-aware sales engine. Reps go from a blank account to a researched, send-ready email in a fraction of the time it used to take, and the founder's hard-won sales method is now executed consistently in code rather than hoped for.
The product is used by reps at major enterprises, and its AI finally works the way a top account executive does: joined up, in context, end to end.
Technology stack
Has your AI product hit a ceiling?
AI Account Executive did not need more prompts. It needed context and state. Langbase's founder sent them to us. If your AI demos well but falls apart inside a real workflow, that is the problem we take.