How to set a token budget for an AI agent
Learn how to cap tokens, tool calls, and turns per AI agent run with a TypeScript guard that stops before the next model call and records why the run stopped.
Accepting new clients
You run the business.
I handle the software.
I'm Samuel Fajreldines, a senior software engineer. Growing U.S. businesses hire my team to become their software department, not a vendor they rehire every quarter. I set the technical direction, my team builds and ships, and I stay accountable for everything that goes out.
Learn how to cap tokens, tool calls, and turns per AI agent run with a TypeScript guard that stops before the next model call and records why the run stopped.
Combine AbortSignal, per-step timeouts, and turn limits to safely cancel AI agents, propagate the signal, and avoid unsafe retries after external effects.
Handle SIGTERM in Cloud Run without losing work: stop new tasks, persist state outside the container, and test the worker before 10 seconds run out in CI.
Learn when to use route.fulfill, route.fetch, or HAR in Playwright, then pair the mock with a real check so API failures stay visible in your CI suite.
Host a remote MCP server in TypeScript with Streamable HTTP, host protection, authentication, stateless scaling, independent verification, and limits.