(05)2025
AI Account Executive · B2B Sales Technology · AI Copilots

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
AI Account Executive, B2B Sales Technology / AI Copilots
~5 minTo research and write, from ~60
0Copy-paste between AI steps
StatefulContext-aware generation
End to endComposer + revision chatbot
IndustryB2B Sales Technology / AI Copilots
Engagement2025
Scope of workAI EngineeringLLM Orchestration (Langbase)Prompt & Pipe ArchitectureProduct Engineering

Challenges and solutions

  1. Generating an email that actually reads as one email

    The challenge

    The 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 shipped

    We 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.

  2. Letting a rep fix one part without breaking the rest

    The challenge

    There 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 shipped

    Any 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.

  3. Bringing that control to the rest of the app

    The challenge

    The 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 shipped

    We 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.

  4. Making the founder's sales method run the same way every time

    The challenge

    Output 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 shipped

    We 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.

  5. Staying reliable when the model is slow or the data is thin

    The challenge

    Real 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 shipped

    We 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
The Langbase recommendation

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 core problem

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.

The composer

From fragments to one connected email

AI Account Executive: the old fragmented way versus the new connected flow
From disconnected fragments to one connected, context-aware email
The revision chatbot

Refinement, everywhere in the product

AI Account Executive sales copilot features
The copilot: research, email and discovery, now context-aware throughout
The outcome

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

Frontend
Next.jsReactTypeScriptTailwind CSS
AI orchestration
LangbaseLangbase pipes
Realtime backend
Convex
Auth & infra
ClerkVercelSentry

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.

Next project
(06)2023LeetDeskHeadless content over Shopify
Read case study