adk-ts/apps/adk-api-docs
xiaoxue 7d37e148b0 同步完整源码 - 2026-05-25 2026-05-25 01:45:34 +08:00
..
scripts 同步完整源码 - 2026-05-25 2026-05-25 01:45:34 +08:00
static 同步完整源码 - 2026-05-25 2026-05-25 01:45:34 +08:00
README.md 同步完整源码 - 2026-05-25 2026-05-25 01:45:34 +08:00
package.json 同步完整源码 - 2026-05-25 2026-05-25 01:45:34 +08:00
typedoc.json 同步完整源码 - 2026-05-25 2026-05-25 01:45:34 +08:00

README.md

ADK-TS Logo

ADK-TS API Documentation

Complete API reference for ADK-TS, built using TypeDoc with comprehensive API references and guides
Auto-generated • Type-safe • Developer-friendly

NPM Version Documentation License GitHub Stars


📖 About

This directory contains the complete API reference for ADK-TS, built using TypeDoc for automatic API reference generation. The documentation provides comprehensive coverage of all ADK-TS features, including API references, guides, and examples.

📁 Structure

adk-api-docs/
├── package.json         # Project configuration and scripts
├── typedoc.json        # TypeDoc configuration
├── README.md           # This file
├── node_modules/       # Dependencies
└── api/                # Auto-generated TypeDoc output (created on build)

🚀 Development

Prerequisites

Before building the documentation, ensure you have:

  • Node.js (version 18 or later)
  • pnpm (recommended package manager)
  • Basic familiarity with TypeDoc and documentation generation

Setup

  1. Install dependencies from the workspace root:

    pnpm install
    
  2. Navigate to the API docs directory:

    cd apps/adk-api-docs
    

Building Documentation

  1. Generate API documentation:

    pnpm run docs:build
    
  2. Clean previous builds:

    pnpm run docs:clean
    
  3. Build and serve documentation:

    pnpm run dev
    
  4. Just serve existing documentation:

    pnpm run docs:serve
    

The generated documentation will be available in the api/ directory and served at http://localhost:4000.

🛠️ Configuration

TypeDoc Configuration

The main configuration is in typedoc.json:

{
  "entryPoints": ["../../packages/adk/src/index.ts"],
  "out": "./api",
  "theme": "default",
  "name": "@iqai/adk API Documentation",
  "readme": "../../packages/adk/README.md",
  "excludePrivate": true,
  "excludeExternals": true,
  "githubPages": true,
  "excludeReferences": true
}

Key settings:

  • entryPoints: Main TypeScript files to document
  • out: Output directory (./api)
  • name: Documentation site title
  • readme: Uses ADK-TS package README as main page
  • excludePrivate/excludeExternals: Controls visibility of APIs
  • githubPages: Optimized for GitHub Pages deployment
  • excludeReferences: Hides "Re-exports" to reduce clutter from barrel exports

Package Configuration

The package.json contains scripts for building and serving documentation:

  • pnpm run docs:build - Generate TypeDoc documentation
  • pnpm run docs:serve - Serve documentation on port 4000
  • pnpm run docs:clean - Remove existing documentation
  • pnpm run dev - Build and serve in one command

🚀 Deployment

Documentation is automatically built and deployed to GitHub Pages via GitHub Actions when changes are pushed to the main or develop branches.

The deployment workflow (.github/workflows/docs.yml):

  1. Triggers on changes to ADK-TS source code or documentation files
  2. Installs Node.js 20 and pnpm dependencies
  3. Builds the @iqai/adk package
  4. Generates TypeDoc documentation in apps/adk-api-docs/api
  5. Deploys to GitHub Pages (main branch only)

The documentation is automatically published at the configured GitHub Pages URL.

🎨 Customization

Adding New Content

API documentation is automatically generated from TypeScript source code comments. To add or improve documentation:

  1. Add JSDoc comments to TypeScript source files in packages/adk/src/

  2. Use TypeDoc tags for enhanced documentation:

    /**
     * Creates a new agent with the specified configuration.
     *
     * @param config - The agent configuration
     * @returns A configured agent instance
     * @example
     * ```typescript
     * const agent = createAgent({ name: 'MyAgent' });
     * ```
     */
    export function createAgent(config: AgentConfig): Agent {
      // implementation
    }
    
  3. Rebuild documentation to see changes

Styling and Theme

TypeDoc provides several built-in themes and supports custom styling:

  • Default theme with responsive design
  • Custom CSS can be added via TypeDoc configuration
  • Plugin ecosystem for enhanced features

📚 Resources