Stacks/General production agent

Lindy Raptor: AI teammate engine on Mastra with Postgres as the job queue

Lindy's engineering team rebuilt the engine behind its AI teammate on the Mastra framework, using Postgres as the only job queue. The writeup covers heartbeat-based job leases, fair scheduling across customers, incremental checkpoints, and one-time IDs for sends so a crash never double-sends an email (the next worker asks Gmail first). Lindy says the new engine is as accurate on the same tasks, nearly twice as fast on the slowest tasks, and costs half as much. Shared on X by @getlindy: https://x.com/getlindy/status/2122763556106219670

Bruno Škvorc and Yassin Eldeeb (Lindy)Published Nov 17, 2026Last verified Nov 18, 2026
Use case
Lindy is an AI teammate that does work in Slack, email and text using a team's connected apps, for example finding what someone said on yesterday's call, sending email, or changing files. Raptor is the rewritten engine (harness) behind it, replacing a three-year-old home-rolled harness.
Category
General production agent
Orchestrator / framework
Mastra runs the agent and saves progress after every step. Postgres is the job queue (Temporal was tried and removed after nine days); saving the message and pinging a worker happen in the same step, with a slow backup check for missed pings. Workers check in on a job every 5 seconds, stop if they can't for 75 seconds, and another worker may take it after 90 seconds. Customers who already have work running go to the back of the line, and each conversation runs one request at a time. Extra AI calls that checked the main model were removed; the model gets tool errors back and fixes them itself. Tools are sent as a one-line-per-action list and full instructions are looked up only when needed (a 'what can you do?' query went from 47,835 tokens and 8 calls to 4,478 tokens and 2 calls).
Memory
Conversation progress is checkpointed after every step, saved incrementally so each save writes only what's new (git-style). Over 120 saves of one long conversation that is under 9 KB written instead of about 22 MB.
Evals
Agent evals not described. For the build itself, coding agents wrote about 2,700 pull requests; every change passes automatic checks that can block it, an AI reviewer plus a second reviewer from a different company (Grok and GPT), with plain code making the final call. New AI checks run in watch-only mode first. A deletion agent (the Minimalist) runs every 30 minutes and must prove each deletion with a test before human review.
Reliability (as stated)
20 to 30%Production

scheduled jobs broken by one change that passed every check · nine hours (single incident) · A one-off incident during the rebuild, not a steady-state failure rate.

“And one change passed every check and still broke 20 to 30% of scheduled jobs for nine hours, which is why every new AI check runs in watch-only mode first, logging what it would have blocked without blocking anything.” Source

As stated in the source, checked 2026-11-18. Never a WhatWeRun estimate. Eval, benchmark, and target figures are not production results.

Other tools
PostgresGmail
Source
https://www.lindy.ai/engineering/raptor

Bruno Škvorc and Yassin Eldeeb (Lindy) · Published Nov 17, 2026 · Last verified Nov 18, 2026

Related

More like this