Back to blog
Engineering6 min read

AnyClaude SDK: the open-source engine now at PiPilot’s core

Hans Ade

Under every PiPilot build is an agent loop: the thing that plans, calls tools, reads results, edits files, and keeps going until the app is done. It’s the most important code we write, and we’ve just made a big change to it — PiPilot now runs on the AnyClaude SDK, an open-source agent framework we publish on npm and have adopted as the core builder in the PiPilot workspace.

Why an SDK, and why open source

An agent loop is deceptively hard to get right: context management, tool orchestration, retries, streaming, and team coordination all have to work together reliably. Rather than keep that logic tangled inside the app, we pulled it into a standalone SDK with a clean query() interface — and then open-sourced it. The engine we trust to run production builds is the same one anyone can install and build their own agents with.

  • Open source on npm — install anyclaude-sdk and run the same agent loop we do.
  • A single query() entry point — describe tools and prompts, stream the agent’s work back.
  • Battle-tested in production — it powers real PiPilot builds every day.

What it brings to your builds

Adopting the SDK as the default engine made PiPilot’s agent sturdier and faster, especially on long, tool-heavy builds.

  • Context-editing — the loop trims and keeps the right tool results so long builds stay coherent instead of drifting.
  • Deferred tool loading — niche integrations load only when needed, keeping the agent focused.
  • Background team dispatch — the lead agent can spin up sub-agents to work in parallel and pull the results together.
  • Reliable streaming — reasoning, edits, and tool calls flow back in real time.

Build on the same foundation

Because it’s public, AnyClaude SDK isn’t just PiPilot plumbing — it’s a foundation you can use. If you want to build your own agent, you can start from the exact loop that runs PiPilot, instead of reinventing the hard parts.

Every build you run in PiPilot is already powered by AnyClaude SDK. Want to build your own agent on it? It’s open source on npm.