agentleFS
BrainDAOBrainDAO/adk-ts/CLAUDE.md

adk-ts

CLAUDE.md119 starsChanged 9 months agoMITView on GitHub

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. - packages/adk/ - Core ADK-TS framework package (@iqai/adk) // ...existing code... - packages/tsconfig/ - Shared TypeScript configurations - apps/docs/ - Documentation website (Next.js + Fumadocs) - apps/examples/ - Comprehensive example implementations - packages/adk-cli/ - Official CLI for creating and managing…

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Zod schemas for input validation

    line 107
  2. Very specific:

    Use SessionConfig for persistent sessions

    line 112
  3. Very specific:

    Test files follow *.test.ts pattern

    line 119
  4. Distinctive:

    No explicit any allowed (except in tests)

    line 127
  5. Distinctive:

    All major framework features

    line 143
  6. Very specific:

    Run examples with: cd apps/examples && pnpm dev

    line 145

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

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.

Development Commands

Core Commands

  • pnpm install - Install all dependencies across the monorepo
  • pnpm build - Build all packages using Turbo (with 50 concurrency)
  • pnpm dev - Start development mode for all apps
  • pnpm test - Run tests (use pnpm test --filter=adk for core package only)
  • pnpm format - Format code using Biome
  • pnpm lint - Run linting using lint-staged

Package-Specific Commands

  • pnpm build:docs - Build documentation site only
  • pnpm start:docs - Start docs site in production mode
  • Core package tests: cd packages/adk && pnpm test or pnpm test:watch for watch mode
  • Single test: cd packages/adk && pnpm test -- <test-pattern>

Cleanup Commands

  • pnpm clean - Clean all build outputs via Turbo
  • pnpm clean-modules - Remove all node_modules directories
  • pnpm clean-dist - Remove all dist directories

Architecture

Monorepo Structure

  • packages/adk/ - Core ADK-TS framework package (@iqai/adk) // ...existing code...
  • packages/tsconfig/ - Shared TypeScript configurations
  • apps/docs/ - Documentation website (Next.js + Fumadocs)
  • apps/examples/ - Comprehensive example implementations
  • packages/adk-cli/ - Official CLI for creating and managing ADK-TS projects.

Core Framework Components

The main framework in packages/adk/src/ is organized into:

Agents (src/agents/)

  • AgentBuilder - Fluent API for creating agents with different types
  • LlmAgent - Single LLM-based agent
  • LoopAgent - Agent that can iterate and plan
  • ParallelAgent - Execute multiple agents concurrently
  • SequentialAgent - Execute agents in sequence
  • LangGraphAgent - 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

Key Patterns

Agent Creation

// 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();

Tool Development

  • Extend BaseTool class
  • Implement execute() method
  • Use Zod schemas for input validation
  • Tools receive ToolContext with session, memory, artifacts

Session Management

  • Use SessionConfig for persistent sessions
  • Memory services store conversation history and context
  • Artifact services handle file/data storage

Testing

  • Uses Vitest for testing
  • Test files follow *.test.ts pattern
  • Coverage via pnpm test:coverage in adk package
  • Tests located in packages/adk/tests/ and packages/adk/src/tests/

Code Style

  • Uses Biome for formatting and linting
  • Tab indentation, double quotes
  • No explicit any allowed (except in tests)
  • Pre-commit hooks via Husky enforce formatting

Environment Requirements

  • Node.js >=22.0
  • pnpm 9.0.0 (specified as packageManager)
  • Uses Turbo for monorepo orchestration

Examples Location

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.