Install Agentdock
Add Agentdock, its model package, and Zod to a TypeScript app.
1. Install the packages
yarn add @agentdock-ai/agentdock @agentdock-ai/models zodUse Node.js 22 or later when installing @agentdock-ai/models.
2. Add your provider key
For OpenAI, set OPENAI_API_KEY in the environment where your server runs. Keep the key on the server; do not expose it in browser code.
export OPENAI_API_KEY="your-key"3. Import Agentdock's API
import { AgentDock, defineTool } from "@agentdock-ai/agentdock";
import { AgentDockModel } from "@agentdock-ai/models";
import { z } from "zod";Continue with the quickstart. It creates a model, registers a tool, and runs the agent.
AgentDock is the only agent construction API. defineTool() creates a typed tool
definition; it does not create another agent runtime.

