This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ADK-TS is the TypeScript-native AI agent framework — a comprehensive toolkit for building sophisticated AI agents with multi-LLM support, advanced tools, and flexible conversation flows. This is a monorepo containing the core framework package, documentation site, examples, and CLI tools.
pnpm install- Install all dependencies across the monorepopnpm build- Build all packages using Turbo (with 50 concurrency)pnpm dev- Start development mode for all appspnpm test- Run tests (usepnpm test --filter=adkfor core package only)pnpm format- Format code using Biomepnpm lint- Run linting using lint-staged
pnpm build:docs- Build documentation site onlypnpm start:docs- Start docs site in production mode- Core package tests:
cd packages/adk && pnpm testorpnpm test:watchfor watch mode - Single test:
cd packages/adk && pnpm test -- <test-pattern>
pnpm clean- Clean all build outputs via Turbopnpm clean-modules- Remove all node_modules directoriespnpm clean-dist- Remove all dist directories
packages/adk/- Core ADK-TS framework package (@iqai/adk) // ...existing code...packages/tsconfig/- Shared TypeScript configurationsapps/docs/- Documentation website (Next.js + Fumadocs)apps/examples/- Comprehensive example implementationspackages/adk-cli/- Official CLI for creating and managing ADK-TS projects.
The main framework in packages/adk/src/ is organized into:
Agents (src/agents/)
AgentBuilder- Fluent API for creating agents with different typesLlmAgent- Single LLM-based agentLoopAgent- Agent that can iterate and planParallelAgent- Execute multiple agents concurrentlySequentialAgent- Execute agents in sequenceLangGraphAgent- Graph-based workflow agent
Models (src/models/)
- Multi-provider LLM support: OpenAI, Anthropic, Google (Gemini/Vertex), AI SDK
LlmRegistry- Central registry for all LLM providers- Automatic provider registration via
registry.ts
Tools (src/tools/)
BaseTool- Abstract base for all tools- Built-in tools: file ops, HTTP requests, user interaction, memory loading
- MCP (Model Context Protocol) integration for external tools
- Function tools with automatic schema generation
Memory & Sessions (src/memory/, src/sessions/)
- Pluggable memory services (in-memory, Vertex AI RAG)
- Session management with database persistence options
- State management across conversations
Code Execution (src/code-executors/)
- Multiple execution environments: local unsafe, container-based, Vertex AI
- Built-in code execution with sandboxing options
Flows (src/flows/)
- LLM-based processing flows for complex multi-step operations
- Auto-flows, planning flows, content processing
// Simple usage
const response = await AgentBuilder.withModel("gpt-4").ask("Question");
// Complex usage
const agent = new AgentBuilder()
.withName("MyAgent")
.withModel("gemini-2.5-flash")
.withTools([tool1, tool2])
.withInstruction("You are a helpful assistant")
.buildLlm();- Extend
BaseToolclass - Implement
execute()method - Use Zod schemas for input validation
- Tools receive
ToolContextwith session, memory, artifacts
- Use
SessionConfigfor persistent sessions - Memory services store conversation history and context
- Artifact services handle file/data storage
- Uses Vitest for testing
- Test files follow
*.test.tspattern - Coverage via
pnpm test:coveragein adk package - Tests located in
packages/adk/tests/andpackages/adk/src/tests/
- Uses Biome for formatting and linting
- Tab indentation, double quotes
- No explicit any allowed (except in tests)
- Pre-commit hooks via Husky enforce formatting
- Node.js >=22.0
- pnpm 9.0.0 (specified as packageManager)
- Uses Turbo for monorepo orchestration
Comprehensive examples in apps/examples/src/ demonstrate:
- Simple agents, tool usage, memory integration
- MCP server integration, multi-agent systems
- Database sessions, artifact handling
- All major framework features
Run examples with: cd apps/examples && pnpm dev