# Making the Alasco Assistant Reliable and Modern

- URL: https://alasco.tech/2026/11/25/modernising-the-alasco-assistant/
- Date: 2026-11-25T00:00:00.000Z
- Authors: Bahram Aghaei
- Description: How we moved the assistant from a synchronous request to background runs, streaming, and shared MCP tools.

import assistantBeforeAfter from "./images/assistant-before-after.png";
import BackgroundRunsDiagram from "./components/BackgroundRunsDiagram.astro";
import FlowDiagram from "./components/FlowDiagram.astro";
import Note from "~/components/post/Note.astro";
import SharedToolsDiagram from "./components/SharedToolsDiagram.astro";
import Timeline from "~/components/post/Timeline.astro";
import ZoomableImage from "~/components/post/ZoomableImage.astro";

The Alasco Assistant is the AI chat built into Alasco. Since every product has a chatbot these days, why shouldn't we?

Ours has been around since July 2025. Over the last two months we rebuilt it. It now shares its tools with our MCP server, streams its answers, and keeps working in the background when you leave the page.

## Early to the party

The Alasco Assistant is older than most of the tools we would reach for today. The timeline below shows our milestones, highlighted, alongside the major AI tool releases from the same period.

<Timeline
  title="The Alasco Assistant and the agent ecosystem"
  items={[
    { date: "May 12, 2025", label: "CopilotKit announces AG-UI" },
    { date: "Jul 2025", label: "Alasco Assistant introduced", highlight: true },
    { date: "Jul 31, 2025", label: "Vercel AI SDK 5" },
    { date: "Dec 4, 2025", label: "TanStack AI alpha" },
    { date: "Apr 29, 2026", label: "MCP server with OAuth", highlight: true, href: "/2026/07/24/building-an-mcp-server-inside-a-real-estate-finance-product/" },
    { date: "Oct 2026", label: "Assistant uses the shared MCP tools", highlight: true },
    { date: "Nov 2026", label: "Answers run in the background", highlight: true },
  ]}
/>

When we built the first version of the Alasco Assistant in July 2025, the tooling for AI agents was still taking shape. AG-UI had been announced two months earlier, the Vercel AI SDK 5 was still a few weeks away, and TanStack AI didn't exist yet. So the assistant was built the straightforward way: a synchronous request that waited for the full answer, backed by its own set of tools. That was the right call at the time, and it got the assistant into users' hands quickly. Since then the ecosystem has moved on, and this year we caught the assistant up with it.

## Build once, use everywhere

Our MCP server arrived in April 2026, nine months after the assistant, and for a while the assistant and the MCP server each had their own tools for reading the same data: **31 tools** in the assistant and **100+** on the MCP server, each with its own permission checks. Every fix, new field or permission change had to be made twice, and the two sets slowly drifted apart.

Now there is **one set of tools**, used everywhere. The Alasco Assistant, Claude, Cursor and any other MCP client call the same tools, with the same permission checks, maintained in one place. A new read tool on the MCP server is available to the assistant straight away. Getting there removed **about 12,000 lines** of duplicate tools and tests, and more than doubled what the assistant can look up.

<SharedToolsDiagram />

<Note title="Why no write tools?">
  We deliberately kept the **write tools** out of the assistant's reach. It has no way yet to ask you to approve a change before it happens, and we don't want it changing financial data without a human in the loop.
</Note>

## An answer, no matter what

### Close the tab, it keeps working

The first version answered inside the web request. You saw nothing until the whole answer was ready, and the conversation was only saved at the end. Closing the chat, reloading the page, a network drop or a deploy lost both the question and the answer.

<FlowDiagram
  title="The first version: one request from question to answer"
  group={{ label: "Alasco app", from: 1 }}
  nodes={[
    { title: "User", edge: "Sends the question and waits", edgeStep: 1, returnEdge: "Sends the whole answer at the end", returnStep: 3 },
    { title: "Web instance", detail: "Runs the assistant inside the web request", edge: "Saves the chat at the end", edgeStep: 2 },
    { title: "Database" },
  ]}
/>

Now every answer runs in the background. Sending a question saves it, starts a run on a dedicated worker and returns straight away. The worker saves its progress on the run in our database, and you only follow along, seeing the answer as it is written. If the connection drops, the chat reconnects and picks up the latest state.

You can leave a long question running, look at something else, or keep several conversations going at once. You can now also stop an answer halfway and keep what was already written. And when we deploy, running answers get to finish first.

If the chat is closed when the answer is ready, a notification lets you know.

<BackgroundRunsDiagram title="Now: the answer runs in the background, and you follow it" />

### Knowing when to wrap up

Each answer is limited to *k* steps, where a step is one turn of the model deciding what to do next, usually calling one or more tools. The limit keeps the model from running forever and burning tokens. Before, a question that needed a lot of looking up could run into that limit halfway through, and you got an error instead of an answer, even though the assistant had already found most of what it needed.

Now, once the assistant has taken *k − 1* steps, we tell it that the next one is its last: stop looking things up and answer with what you have. The instruction is sent only with that final step and never stored in the chat history, so it doesn't affect later questions. If an answer still gets cut off, you keep the partial answer, with a short note on how to continue.

## A better user experience

The design had aged too. The chat now shows what the assistant is doing while it works, and the window is compact, movable and resizable. It also knows which page you are on, takes voice input, and copies tables to Excel.

<ZoomableImage
  src={assistantBeforeAfter}
  alt="Before and after of one question to the Alasco Assistant. Before: a fixed panel that only shows a generic error. After: a movable window that shows each step it took and how long it worked, an answer with a table you can copy to Excel, and voice input."
/>

## Future work

The assistant is now up to date, but it still only answers questions. Next, we want it to help with the work itself.

One direction we are exploring is a human in the loop: giving the assistant the write tools from our MCP server, but only behind an approval step, so nothing changes until you confirm it. Background runs already help here, because a run no longer depends on an open page and could wait for your decision.

Furthermore, we would like the assistant to be more proactive, surfacing insights on its own instead of only waiting for a question.

## Acknowledgements

A huge thank you to everyone who built the first version of the Alasco Assistant and to everyone who reviewed this work along the way! I really enjoyed working on this, learned a lot while building it, and it was a rewarding journey.