Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.
Genkit for JavaScript Skill
The official Genkit skill for Node.js and TypeScript — flows, Dotprompt files, tools and the beta agent API with sessions, interrupts and branching.
Install
Other ways to install
About
- Verified CLI and package version floors before any code is written
- Flows with Zod input/output schemas and model plugins
- Dotprompt files: variants, partials, named schemas and tool frontmatter
- The beta agent API — sessions, interrupts, branching, background turns, artifacts
- Correct `genkit/beta` and `genkit/beta/client` entry points
Genkit is Google's open-source framework for building AI features in application code — typed flows, model plugins, prompt files and an agent runtime — and it moves fast enough that a model's pre-training is usually a version or two behind. That gap shows up as invented APIs and imports from the wrong entry point.
This official skill from the Genkit team pins the agent to current practice for the Node.js and TypeScript SDK. It starts from a verified CLI version floor (genkit-cli >= 1.29.0) and a working defineFlow example with Zod schemas, then covers Dotprompt .prompt files with YAML frontmatter and Handlebars templates — promptDir, ai.prompt() call/stream/render, variants, partials, named schemas via ai.defineSchema, and the tools / maxTurns / returnToolRequests / middleware frontmatter fields.
The largest section is the beta agent API for persistent multi-turn conversations, which is easy to get wrong because server APIs come from genkit/beta and the browser client from genkit/beta/client rather than the stable entry point, and it requires genkit >= 1.39.0. References cover sessions and persistence (in-memory, file and Firestore stores), human-in-the-loop interrupts, branching from a snapshot, background agents, typed session state auto-synced to the client, artifacts, multi-agent delegation, custom agents via defineCustomAgent, and HTTP deployment.
Sibling skills in the same repository cover Genkit for Dart, Go and Python.
Try it
Once installed, ask your agent something like:
"Add a Genkit flow that summarises an uploaded document, move the prompt into a .prompt file with a short and long variant, and expose it as a multi-turn agent with human approval before it emails the summary."
SKILL.md
The instructions your agent loads, as published by Genkit (Google).
Related Skills
See all Genkit for JavaScript alternativesVercel's official skill for the AI SDK (the ai package): it makes the agent check the version-matched docs bundled in node_modules instead of memory, set up AI Gateway, list current model IDs and build agents with ToolLoopAgent.
Mastra's official framework skill: makes an agent check embedded docs in node_modules before writing agents, workflows, tools or memory, verify models against the provider registry, query traces with mastra api, and deploy to Mastra Platform.
Skill: Sandbox SDK (1.0 Preview)
by Cloudflare
Build on @cloudflare/sandbox@next, the Sandbox SDK 1.0 preview — with a package gate that stops an agent mixing preview APIs into a stable app.