Icepick is a simple Typescript library for building AI agents that are fault-tolerant and scalable. It handles the complexities of durable execution, queueing and scheduling, allowing you to focus on writing core business logic. It is not a framework.Everything in Icepick is just a function that you have written, which makes it easy to integrate with your existing codebase and business logic. You can build agents that call tools, other agents, or any other functions you define:
Copy
import { icepick } from "@hatchet-dev/icepick";import z from "zod";import { myTool1, myTool2 } from "@/tools";const MyAgentInput = z.object({ message: z.string(),});const MyAgentOutput = z.object({ message: z.string(),});export const myToolbox = icepick.toolbox({ tools: [myTool1, myTool2],});export const myAgent = icepick.agent({ name: "my-agent", executionTimeout: "15m", inputSchema: MyAgentInput, outputSchema: MyAgentOutput, description: "Description of what this agent does", fn: async (input, ctx) => { const result = await myToolbox.pickAndRun({ prompt: input.message, }); switch (result.name) { case "myTool1": return { message: `Result: ${result.output}`, }; case "myTool2": return { message: `Another result: ${result.output}`, }; default: return myToolbox.assertExhaustive(result); } },});
Icepick is centered around the benefit of durable execution, which creates automatic checkpoints for agents so that they can easily recover from failure or wait for external events for a very long time without consuming resources. This is achieved by using a durable task queue called Hatchet.Additionally, Icepick agents are:
💻 Code-first - agents are defined as code and are designed to integrate with your business logic.
🌐 Distributed - all agents and tools run across a fleet of machines, where scheduling is handled gracefully by Icepick. When your underlying machine fails, Icepick takes care of rescheduling and resuming the agent on a different machine.
⚙️ Configurable - simple configuration for retries, rate limiting, concurrency control, and much more
☁️ Runnable anywhere - Icepick agents can run on any container-based platform (Hatchet, Railway, Fly.io, Porter, Kubernetes, AWS ECS, GCP Cloud Run)
Icepick is designed for scale: specifically, massive throughput and parallelism. Hatchet has run agentic workloads which spawn hundreds of thousands of tasks for a single execution, and runs billions of tasks per month.
Icepick is not a framework. Agents and tools are simply functions that you have written. This means you can choose or build the best memory, knowledge, reasoning, or integrations. It does not impose any constraints on how you design your tools, call LLMs, or implement features like agent memory. Icepick is opinionated about the infrastructure layer of your agents, but not about the implementation details of your agents.