Ian Macartney
banner
ianmacartney.bsky.social
Ian Macartney
@ianmacartney.bsky.social
Friendly engineer at Convex.dev
I feel clever subbing `return await fn()` with `return fn()`

But gotchas don't seem worth it anymore
• Breaks try/catch/finally expectations
• Loses stack trace context

My default is now to always await. Change my mind.
September 24, 2025 at 6:24 PM
I've added new features to my middleware-esque helper library, and got inspired to write down everything I think about authorization:
stack.convex.dev/authorization
Authorization Best Practices and Implementation Guide
Learn about authorization techniques and how to implemented them with practical examples.
stack.convex.dev
August 7, 2025 at 11:40 PM
A recent talk on developing the Agent Component:
www.youtube.com/watch?v=YM9n...
How to Build Realtime AI Agents with Convex Components
YouTube video by Convex
www.youtube.com
August 7, 2025 at 11:39 PM
Documentation for the Agent component is live 🎉
-> docs.convex​.dev/agents

Odd coincidence that there's ~2300 lines of documentation & ~2300 lines of example code 🤔

...maybe more surprising there's fewer lines of React?
@​convex-dev/agent
July 22, 2025 at 5:31 AM
Rate limiting LLM chat per-user with `useRateLimit`

const { status } = useRateLimit(api.rl.getRateLimit)

Full code in 🧵

Algorithms:
Sending messages: fixed window
Token usage: token bucket

courtesy of
@​convex-dev/rate-limiter + @​convex-dev/agent
(components)
June 17, 2025 at 8:44 PM
Recent talk on agents & agentic workflows, as well as my Convex Agent Component. Takes:
• Agentic := prompting + routing
• Prompting is input -> LLM -> output
• Routing has code at every boundary
(...even if an LLM "decides" what to do next)
Full 📺🔗->🧵
June 9, 2025 at 11:51 PM
Streaming LLM text using websockets + client smoothing - no HTTP necessary!

Agent v0.2.1 is out! Repo & release notes in 🧵
- Streaming text react hook + server fns
- Client-side smoothing hook
- Optimistic update helpers
May 31, 2025 at 8:16 AM
“Simple Made Easy” is incredibly relevant nowadays where “easy” but not “simple” systems abound

youtu.be/SxdOUGdseq4?...
"Simple Made Easy" - Rich Hickey (2011)
YouTube video by Strange Loop Conference
youtu.be
May 31, 2025 at 8:15 AM
Agent Playground for @​convex-dev/agent is live!
Investigate threads, messages, tool calls
Dial in context params
Iterate on prompting, etc.
For the @​convex-dev/agent component.
Links in 🧵
May 22, 2025 at 11:52 PM
Not all embeddings are created equal. Some represent more meaningful context. I struggled with AI Town to efficiently do vector search that also included a 1-10 "importance"
Last night I figured out a way to prioritize some embeddings over others using a "bias" feature 🧵
April 10, 2025 at 9:00 PM
I do RAG via hybrid text/vector search using reciprocal rank fusion (the one-weird-trick of hybrid search imo) for my new Agent framework/component.

It's open source and the code is remarkably simple, if you're looking for an example for yourself.
April 10, 2025 at 12:59 AM
Exciting news for Agent Workflow front:
🪨Durable Workflows🪨: Orchestrate steps async with retries, checkpointing and more, using Inngest-style syntax
🤖 Agent Framework 🤖: Define agents and use threaded memory (can hand off between agents), with hybrid text/vector search.
🧵
April 8, 2025 at 7:26 PM
Welp not all experiments work out, but what will outlive all products is the insights you glean along the way.

I reimplemented Mastra workflows in Convex last week and I regret it. Article in 🧵
March 31, 2025 at 8:35 PM
I made some cartoons today for an article I'm writing.
This one is me when I'm too deep in a project that's gone off the rails, complete with alt text.

Should I ship it or make a "better" version to make it "more professional"?
March 28, 2025 at 3:04 AM
Programmers know why this sorting is busted the way it is.

Maybe they should also know better :P
March 27, 2025 at 8:47 PM
What I meant to say was "correctness & reliability" -
mental blip when I first posted this.

The reality is that while everyone's talking about how cool their app is in the happy path, actually handling failure is near impossible when you're using leaky abstractions.
Thoughts on about safety & reliability in the age of agentic flows and durable workflows:

Details in 🧵, but tl;dr:
1️⃣ Isolate unreliable steps to safely retry
2️⃣ Model LLMs as ~idempotent & ~deterministic
3️⃣ Run asynchronously, subscribe to results

Bonus: I made a thing
March 26, 2025 at 9:16 PM
Thoughts on about safety & reliability in the age of agentic flows and durable workflows:

Details in 🧵, but tl;dr:
1️⃣ Isolate unreliable steps to safely retry
2️⃣ Model LLMs as ~idempotent & ~deterministic
3️⃣ Run asynchronously, subscribe to results

Bonus: I made a thing
March 25, 2025 at 11:44 PM
I'm working on handling [agentic] workflows in @convex.dev using Mastra to define them.

Anyone interested in an alpha I made over the last week? Based on the architecture diagram I shared.

It uses my durable Workpool component to execute them with parallelism limits, retries, etc.

(Open Source)
March 25, 2025 at 12:09 AM
Made this architecture diagram yesterday, implementing it today. Any guesses on what it is? Wish me luck!
March 22, 2025 at 12:11 AM
Tiago asked about integrating reactflow.dev
with @convex.dev so I made a demo last night.
- realtime syncing flow chart
- authorize reads and writes
- validation of custom data payloads
- optimistic updates for UX 🧑‍🍳💋
I'm proud of it, and thanks Tiago for the help!
github.com/ianmacartney...
March 11, 2025 at 8:21 PM
Tip: Use the `workpool` component to manage asynchronous workloads.
- durable execution w/ onComplete handler
- limit parallelism to be a nice neighbor
- configure retries (w/ backoff, jitter, max attempts)
- backlog & lag monitoring

v0.2.1 out now

www.convex.dev/components/w...
Workpool
Workpools give critical tasks priority by organizing async operations into separate, customizable queues.
www.convex.dev
March 11, 2025 at 8:08 PM
The Telepathy Tapes podcast is adding to the pile of worldview-changing things to grapple with.
What deserves my attention?
February 20, 2025 at 1:45 AM
Local file sharing app (Open Source)
Drag your files onto the site
Drag them off on another computer

git clone github.com/mikecann/our...
cd ourfiles/
docker compose up
open localhost:5173

by
@mikeysee

video in 🧵
February 14, 2025 at 8:26 PM
So fun to work with Annie. She helped a ton, giving us some just-in-time feedback on self-hosting ergonomics.

Really grateful that we met through @kentcdodds.com's #EpicWebCamp.
Convex is one of the coolest databases I've ever used, and now you can host one yourself!

So obviously I had to try it out on Fly.io (spoiler, it was awesome)

www.youtube.com/watch?v=YPCg...
Self-hosting Convex on Fly.io
YouTube video by Fly․io
www.youtube.com
February 14, 2025 at 1:54 AM
Self-hosting Convex just got way easier,
including running the dashboard.

npx degit get-convex/convex-backend/self-hosted/fly fly && cd fly/backend && fly launch

Dockerfiles, images, binaries @flydotio and more.
Check it out 🧵
February 13, 2025 at 3:55 PM