---
type: "post"
id: "how-lindy-replaced-its-homegrown-agent-harness-with-228ef8"
slug: "how-lindy-replaced-its-homegrown-agent-harness-with-228ef8"
title: "How Lindy Replaced Its Homegrown Agent Harness with Mastra to Run Tasks 2× Faster"
description: "Lindy replaced its state-graph architecture with a simpler agent loop on Mastra and redesigned its underlying data model."
retrieval_nugget: "Lindy replaced its state-graph architecture with a simpler agent loop on Mastra and redesigned its underlying data model."
published_at: "2026-11-27"
updated_at: "2026-11-27"
record_date: "2026-11-27"
date_kind: "published_at"
topics: ["agent-harness"]
entities: ["Lindy","Mastra"]
related_patterns: ["harness-architecture-outlives-model-choice"]
novelty_label: "new_fact"
what_changed: null
prior_refs: []
source_url: "https://mastra.ai/customers/lindy"
source_urls: ["https://mastra.ai/customers/lindy"]
production: {"schema":"newruntime-production-v1","desk":"newsroom","first_seen_at":"2026-11-27T19:21:52.129Z","independent_sources":1,"notes_synthesized":null,"writer_model":"gpt-6-luna","critic":null,"checks":["primary_source_verified","source_fresh","one_story","copy_contract"],"novelty":null,"editorial_value":"high","human_review":"selective"}
citations: [{"claim":"","quotes":["The team replaced the state-graph architecture with a simpler agent loop on Mastra and redesigned the underlying data model. The new implementation builds context across successive model calls and uses caching to reduce repeated processing.","The switch also freed up the equivalent of two engineers' time for product development and optimization. Škvorc now manages the Mastra implementation mostly on his own, while the team spends more attention on the product, speed, infrastructure, and load testing."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20team%20replaced%20the%20state%2Dgraph%20architecture%20with%20a%20simpler%20agent%20loop%20on%20Mastra%20and%20redesigned%20the%20underlying%20data%20model.%20The%20new%20implementation%20builds%20context%20across%20successive%20model%20calls%20and%20uses%20caching%20to%20reduce%20repeated%20processing.&text=The%20switch%20also%20freed%20up%20the%20equivalent%20of%20two%20engineers%27%20time%20for%20product%20development%20and%20optimization.%20%C5%A0kvorc%20now%20manages%20the%20Mastra%20implementation%20mostly%20on%20his%20own%2C%20while%20the%20team%20spends%20more%20attention%20on%20the%20product%2C%20speed%2C%20infrastructure%2C%20and%20load%20testing.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"On Mastra, Lindy built context across successive model calls and used caching to limit repeated processing.","quotes":["The system used a state graph: behind the scenes, an agent followed nodes in a workflow to complete a task.","A patch in one part of the system could change how tasks ran elsewhere, which in turn affected the evals suite and other components of the system. All the accumulated tech debt made it very difficult to update the framework and trace regressions."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20system%20used%20a%20state%20graph%3A%20behind%20the%20scenes%2C%20an%20agent%20followed%20nodes%20in%20a%20workflow%20to%20complete%20a%20task.&text=A%20patch%20in%20one%20part%20of%20the%20system%20could%20change%20how%20tasks%20ran%20elsewhere%2C%20which%20in%20turn%20affected%20the%20evals%20suite%20and%20other%20components%20of%20the%20system.%20All%20the%20accumulated%20tech%20debt%20made%20it%20very%20difficult%20to%20update%20the%20framework%20and%20trace%20regressions.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"","quotes":["The team replaced the state-graph architecture with a simpler agent loop on Mastra and redesigned the underlying data model. The new implementation builds context across successive model calls and uses caching to reduce repeated processing."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20team%20replaced%20the%20state%2Dgraph%20architecture%20with%20a%20simpler%20agent%20loop%20on%20Mastra%20and%20redesigned%20the%20underlying%20data%20model.%20The%20new%20implementation%20builds%20context%20across%20successive%20model%20calls%20and%20uses%20caching%20to%20reduce%20repeated%20processing.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"That addressed a practical constraint: selecting among similar operations in a large integration catalog without making search slow or expensive.","quotes":["Lindy extended Mastra's tool search with classifiers and decision models that rank candidates and distinguish between providers. Making that search cacheable helped keep token costs down."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=Lindy%20extended%20Mastra%27s%20tool%20search%20with%20classifiers%20and%20decision%20models%20that%20rank%20candidates%20and%20distinguish%20between%20providers.%20Making%20that%20search%20cacheable%20helped%20keep%20token%20costs%20down.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"Lindy extended Mastra’s memory primitives for long conversations that required memory management and compaction.","quotes":["Tool selection was another challenge. Across a large integration catalog, many providers offered similar operations. The agent had to find relevant tools, compare the candidates, and choose the right one without making every search slow or expensive."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=Tool%20selection%20was%20another%20challenge.%20Across%20a%20large%20integration%20catalog%2C%20many%20providers%20offered%20similar%20operations.%20The%20agent%20had%20to%20find%20relevant%20tools%2C%20compare%20the%20candidates%2C%20and%20choose%20the%20right%20one%20without%20making%20every%20search%20slow%20or%20expensive.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"","quotes":["The team also extended Mastra's memory-management primitives and connected the new runtime to its existing product infrastructure. Lindy kept its own evaluation system, which covers the tasks and tools its agents use.","Long conversations also required memory management and compaction. All of this had to work with Lindy's existing systems."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20team%20also%20extended%20Mastra%27s%20memory%2Dmanagement%20primitives%20and%20connected%20the%20new%20runtime%20to%20its%20existing%20product%20infrastructure.%20Lindy%20kept%20its%20own%20evaluation%20system%2C%20which%20covers%20the%20tasks%20and%20tools%20its%20agents%20use.&text=Long%20conversations%20also%20required%20memory%20management%20and%20compaction.%20All%20of%20this%20had%20to%20work%20with%20Lindy%27s%20existing%20systems.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"","quotes":["We had to hook it into the rest of our system: billing, authorization, integrations, authentication, logging, tracing.","The team also extended Mastra's memory-management primitives and connected the new runtime to its existing product infrastructure. Lindy kept its own evaluation system, which covers the tasks and tools its agents use."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=We%20had%20to%20hook%20it%20into%20the%20rest%20of%20our%20system%3A%20billing%2C%20authorization%2C%20integrations%2C%20authentication%2C%20logging%2C%20tracing.&text=The%20team%20also%20extended%20Mastra%27s%20memory%2Dmanagement%20primitives%20and%20connected%20the%20new%20runtime%20to%20its%20existing%20product%20infrastructure.%20Lindy%20kept%20its%20own%20evaluation%20system%2C%20which%20covers%20the%20tasks%20and%20tools%20its%20agents%20use.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"Mastra’s case study says infrastructure costs fell.","quotes":["The switch cut infrastructure costs and removed roughly half a million lines of code from the old implementation. Much of that volume was replaced by tests, but the application logic became much smaller."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20switch%20cut%20infrastructure%20costs%20and%20removed%20roughly%20half%20a%20million%20lines%20of%20code%20from%20the%20old%20implementation.%20Much%20of%20that%20volume%20was%20replaced%20by%20tests%2C%20but%20the%20application%20logic%20became%20much%20smaller.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"","quotes":["The switch also freed up the equivalent of two engineers' time for product development and optimization. Škvorc now manages the Mastra implementation mostly on his own, while the team spends more attention on the product, speed, infrastructure, and load testing.","That smaller codebase fits into the context window of most coding agents now. So the coding agents Lindy's engineers use can understand it and reason about it better, helping the team be more efficient when shipping updates."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20switch%20also%20freed%20up%20the%20equivalent%20of%20two%20engineers%27%20time%20for%20product%20development%20and%20optimization.%20%C5%A0kvorc%20now%20manages%20the%20Mastra%20implementation%20mostly%20on%20his%20own%2C%20while%20the%20team%20spends%20more%20attention%20on%20the%20product%2C%20speed%2C%20infrastructure%2C%20and%20load%20testing.&text=That%20smaller%20codebase%20fits%20into%20the%20context%20window%20of%20most%20coding%20agents%20now.%20So%20the%20coding%20agents%20Lindy%27s%20engineers%20use%20can%20understand%20it%20and%20reason%20about%20it%20better%2C%20helping%20the%20team%20be%20more%20efficient%20when%20shipping%20updates.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"},{"claim":"","quotes":["The new core is launching in November 2026.","The new core is launching in November 2026. The team expects tasks to run at least twice as fast and customers to get three to four times more usage from their credits, depending on the task."],"cite_url":"https://mastra.ai/customers/lindy#:~:text=The%20new%20core%20is%20launching%20in%20November%202026.&text=The%20new%20core%20is%20launching%20in%20November%202026.%20The%20team%20expects%20tasks%20to%20run%20at%20least%20twice%20as%20fast%20and%20customers%20to%20get%20three%20to%20four%20times%20more%20usage%20from%20their%20credits%2C%20depending%20on%20the%20task.","source_url":"https://mastra.ai/customers/lindy","publisher":"mastra.ai"}]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:how-lindy-replaced-its-homegrown-agent-harness-with-228ef8"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/how-lindy-replaced-its-homegrown-agent-harness-with-228ef8/","markdown":"https://newruntime.com/posts/how-lindy-replaced-its-homegrown-agent-harness-with-228ef8.md","json":"https://newruntime.com/posts/how-lindy-replaced-its-homegrown-agent-harness-with-228ef8.json"}
markdown_url: "https://newruntime.com/posts/how-lindy-replaced-its-homegrown-agent-harness-with-228ef8.md"
---

# How Lindy Replaced Its Homegrown Agent Harness with Mastra to Run Tasks 2× Faster

## Retrieval answer

Lindy replaced its state-graph architecture with a simpler agent loop on Mastra and redesigned its underlying data model.

## Summary

Lindy replaced its state-graph architecture with a simpler agent loop on Mastra and redesigned its underlying data model. The team says the switch freed the equivalent of two engineers’ time for product development and optimization. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20team%20replaced%20the%20state%2Dgraph%20architecture%20with%20a%20simpler%20agent%20loop%20on%20Mastra%20and%20redesigned%20the%20underlying%20data%20model.%20The%20new%20implementation%20builds%20context%20across%20successive%20model%20calls%20and%20uses%20caching%20to%20reduce%20repeated%20processing.&text=The%20switch%20also%20freed%20up%20the%20equivalent%20of%20two%20engineers%27%20time%20for%20product%20development%20and%20optimization.%20%C5%A0kvorc%20now%20manages%20the%20Mastra%20implementation%20mostly%20on%20his%20own%2C%20while%20the%20team%20spends%20more%20attention%20on%20the%20product%2C%20speed%2C%20infrastructure%2C%20and%20load%20testing.))

## What happened

The old harness routed tasks through workflow nodes, and changes could affect execution, evaluations and other components, making regressions difficult to trace. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20system%20used%20a%20state%20graph%3A%20behind%20the%20scenes%2C%20an%20agent%20followed%20nodes%20in%20a%20workflow%20to%20complete%20a%20task.&text=A%20patch%20in%20one%20part%20of%20the%20system%20could%20change%20how%20tasks%20ran%20elsewhere%2C%20which%20in%20turn%20affected%20the%20evals%20suite%20and%20other%20components%20of%20the%20system.%20All%20the%20accumulated%20tech%20debt%20made%20it%20very%20difficult%20to%20update%20the%20framework%20and%20trace%20regressions.)) On Mastra, Lindy built context across successive model calls and used caching to limit repeated processing. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20team%20replaced%20the%20state%2Dgraph%20architecture%20with%20a%20simpler%20agent%20loop%20on%20Mastra%20and%20redesigned%20the%20underlying%20data%20model.%20The%20new%20implementation%20builds%20context%20across%20successive%20model%20calls%20and%20uses%20caching%20to%20reduce%20repeated%20processing.))

It also extended tool search with classifiers and decision models to rank candidates and distinguish providers, then made search cacheable to control token costs. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=Lindy%20extended%20Mastra%27s%20tool%20search%20with%20classifiers%20and%20decision%20models%20that%20rank%20candidates%20and%20distinguish%20between%20providers.%20Making%20that%20search%20cacheable%20helped%20keep%20token%20costs%20down.)) That addressed a practical constraint: selecting among similar operations in a large integration catalog without making search slow or expensive. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=Tool%20selection%20was%20another%20challenge.%20Across%20a%20large%20integration%20catalog%2C%20many%20providers%20offered%20similar%20operations.%20The%20agent%20had%20to%20find%20relevant%20tools%2C%20compare%20the%20candidates%2C%20and%20choose%20the%20right%20one%20without%20making%20every%20search%20slow%20or%20expensive.)) Lindy extended Mastra’s memory primitives for long conversations that required memory management and compaction. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20team%20also%20extended%20Mastra%27s%20memory%2Dmanagement%20primitives%20and%20connected%20the%20new%20runtime%20to%20its%20existing%20product%20infrastructure.%20Lindy%20kept%20its%20own%20evaluation%20system%2C%20which%20covers%20the%20tasks%20and%20tools%20its%20agents%20use.&text=Long%20conversations%20also%20required%20memory%20management%20and%20compaction.%20All%20of%20this%20had%20to%20work%20with%20Lindy%27s%20existing%20systems.))

The framework did not replace the product plumbing: Lindy connected billing, authorization, integrations, authentication, logging and tracing, and retained its evaluation system for the tasks and tools its agents use. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=We%20had%20to%20hook%20it%20into%20the%20rest%20of%20our%20system%3A%20billing%2C%20authorization%2C%20integrations%2C%20authentication%2C%20logging%2C%20tracing.&text=The%20team%20also%20extended%20Mastra%27s%20memory%2Dmanagement%20primitives%20and%20connected%20the%20new%20runtime%20to%20its%20existing%20product%20infrastructure.%20Lindy%20kept%20its%20own%20evaluation%20system%2C%20which%20covers%20the%20tasks%20and%20tools%20its%20agents%20use.))

The migration removed roughly half a million lines from the old implementation, though much of that volume was replaced by tests; the application logic became much smaller. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20switch%20cut%20infrastructure%20costs%20and%20removed%20roughly%20half%20a%20million%20lines%20of%20code%20from%20the%20old%20implementation.%20Much%20of%20that%20volume%20was%20replaced%20by%20tests%2C%20but%20the%20application%20logic%20became%20much%20smaller.)) Mastra’s case study says infrastructure costs fell. It also says staff software engineer Bruno Škvorc now manages the implementation mostly on his own, and that the smaller codebase fits in most coding agents’ context windows, helping Lindy’s coding agents understand and reason about it. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20switch%20also%20freed%20up%20the%20equivalent%20of%20two%20engineers%27%20time%20for%20product%20development%20and%20optimization.%20%C5%A0kvorc%20now%20manages%20the%20Mastra%20implementation%20mostly%20on%20his%20own%2C%20while%20the%20team%20spends%20more%20attention%20on%20the%20product%2C%20speed%2C%20infrastructure%2C%20and%20load%20testing.&text=That%20smaller%20codebase%20fits%20into%20the%20context%20window%20of%20most%20coding%20agents%20now.%20So%20the%20coding%20agents%20Lindy%27s%20engineers%20use%20can%20understand%20it%20and%20reason%20about%20it%20better%2C%20helping%20the%20team%20be%20more%20efficient%20when%20shipping%20updates.))

## What the archive adds

This production migration extends the ground covered in New Runtime’s earlier Mastra tutorial: from the framework’s mechanics to the work of adapting it to an existing product.

## Why it matters

A harness replacement should be evaluated against the whole operating model, not just the code removed. Lindy’s reported capacity gain sits alongside custom tool-search work, connected product infrastructure and retained evaluations; those are part of the migration’s cost and of how the team can judge whether it works.

## Limits and uncertainty

The results and projections come from Mastra’s case study, rather than independent confirmation. It says the new core is planned to launch in November 2026; the expectation that tasks will run at least twice as fast and customers will get three to four times more usage from credits, depending on task, are forecasts—not reported production results. ([mastra.ai](https://mastra.ai/customers/lindy#:~:text=The%20new%20core%20is%20launching%20in%20November%202026.&text=The%20new%20core%20is%20launching%20in%20November%202026.%20The%20team%20expects%20tasks%20to%20run%20at%20least%20twice%20as%20fast%20and%20customers%20to%20get%20three%20to%20four%20times%20more%20usage%20from%20their%20credits%2C%20depending%20on%20the%20task.))

## Reader takeaway

The reported win was not a drop-in framework swap: Lindy replaced its state-graph harness with a simpler loop, adapted tool search and memory, connected the runtime to its existing product systems, and kept its evaluations. The team says this freed two engineers’ worth of time; projected speed and credit gains remain expectations until measured after rollout.

## Open question

After rollout, do production measurements show the expected speed and credit-usage gains across different tasks?

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Agent Harness](https://newruntime.com/topics/agent-harness.md): Explore the agent-harness topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
