Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JanuaryLabs/deepagents/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
Zod
Zod 3.25.76+ or 4.0.0+ (peer dependency)
Install Package
npm install @deepagents/agent zod
Install AI Provider
Install the AI provider you want to use. The agent framework works with any Vercel AI SDK provider.
npm install @ai-sdk/openai
Environment Variables
Set up your API keys as environment variables:
# OpenAI
OPENAI_API_KEY=your_openai_api_key
# Anthropic
ANTHROPIC_API_KEY=your_anthropic_api_key
# Google
GOOGLE_GENERATIVE_AI_API_KEY=your_google_api_key
# Groq
GROQ_API_KEY=your_groq_api_key
Verify Installation
Create a simple test file to verify your installation:
import { openai } from '@ai-sdk/openai';
import { agent, execute } from '@deepagents/agent';
const assistant = agent({
name: 'assistant',
model: openai('gpt-4o'),
prompt: 'You are a helpful assistant.',
});
const stream = await execute(assistant, 'Say hello!', {});
const text = await stream.text;
console.log(text);
Run the test:
node --env-file=.env test.ts
If everything is set up correctly, you should see a greeting from the agent.
TypeScript Configuration
Ensure your tsconfig.json includes these settings:
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
}
}
Next Steps
Create Your First Agent
Build a simple agent
Add Tools
Integrate tools with your agent