Introduction
Autonomous agent primitives for the Vercel AI SDK. Permissions, cost tracking, server-side interrupts.
You're building agents with the Vercel AI SDK. Your agent calls tools, runs in loops, and produces results. But in production, three questions come up fast:
- Which tools should this agent be allowed to run without asking?
- How much is this run costing, and when should it stop?
- What happens when the agent needs a human to approve something at 3 AM?
AI Employee SDK adds the primitives to answer those. Each one is a standalone function that plugs into generateText(). No framework to adopt, no abstractions to learn, no lock-in.
Architecture

Use EmployeeAgent for the composed experience, or wire each primitive into generateText yourself.
Primitives
Membrane & Tiers
4-tier permission system: auto, draft, confirm, block. Glob patterns, custom resolvers, audit log.
Cost Tracking
Per-model USD budgets with built-in pricing for OpenAI, Anthropic, and Google models.
Interrupts
Pause agent execution for human approval. Serialize state. Resume with decisions.
Memory & Composition
Inject memories via prepareStep. Compose multiple prepareStep functions with deterministic merge rules.
Agent & Heartbeat
EmployeeAgent composes all primitives. Heartbeat adds always-on scheduling with circuit breakers.
Audit Logging
Capture tool call and step events for observability pipelines.
Install
npm install @ai-employee-sdk/core aiRequires ai >= 7.0.0-beta.30 as a peer dependency.