@cdklabs/genai-idp

中文文档
0.3.1发布于 2026/05/18Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 1812

Compatible with GenAI IDP version: 0.5.2 ![Stabil

原始使用文档
文档目录10 节
  1. Overview
  2. Features
  3. Getting Started
  4. Installation
  5. Basic Usage
  6. API Reference
  7. Key Components
  8. Contributing
  9. Related Projects
  10. License

GenAI IDP Core Package

Compatible with GenAI IDP version: 0.5.2 Stability: Experimental License

This package is provided on an "as-is" basis, and may include bugs, errors, or other issues. All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Overview

The GenAI IDP Core Package provides the foundational AWS CDK constructs for building intelligent document processing solutions. This package serves as the backbone for the GenAI Intelligent Document Processing (IDP) Accelerator, enabling organizations to transform unstructured documents into structured data at scale using AWS's latest AI/ML services.

For a comprehensive reference of all available constructs and their properties, please explore our API documentation. This detailed guide will help you understand the full capabilities of this package and how to leverage them in your projects.

Features

  • Modular Architecture: Composable CDK constructs that can be combined to create complete document processing solutions
  • Document Processing Infrastructure: Core components for document ingestion, tracking, and management
  • Processing Environment API: GraphQL API for monitoring document processing status and results
  • Web Application Support: Optional secure web interface for document tracking and management
  • Extensible Design: Designed to work with multiple document processing patterns and AI/ML services
  • Security-First Approach: Built-in support for encryption, IAM permissions, and secure data handling
  • Observability: Integrated CloudWatch metrics, logs, and alarms for monitoring and troubleshooting

Getting Started

Installation

The package is available through npm for JavaScript/TypeScript projects and PyPI for Python projects.

JavaScript/TypeScript (npm)

# Using npm
npm install @cdklabs/genai-idp

# Using yarn
yarn add @cdklabs/genai-idp

Python (PyPI)

# Using pip
pip install cdklabs.genai-idp

# Using poetry
poetry add cdklabs.genai-idp

Basic Usage

Here's a simple example of how to use the core IDP constructs:

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as s3 from 'aws-cdk-lib/aws-s3';
import * as kms from 'aws-cdk-lib/aws-kms';
import { ProcessingEnvironment } from '@cdklabs/genai-idp';

export class MyIdpStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // Create encryption key
    const key = new kms.Key(this, 'IdpKey', {
      enableKeyRotation: true,
    });

    // Create S3 buckets for input and output
    const inputBucket = new s3.Bucket(this, 'InputBucket', {
      encryption: s3.BucketEncryption.KMS,
      encryptionKey: key,
      eventBridgeEnabled: true,
    });

    const outputBucket = new s3.Bucket(this, 'OutputBucket', {
      encryption: s3.BucketEncryption.KMS,
      encryptionKey: key,
    });

    const workingBucket = new s3.Bucket(this, 'WorkingBucket', {
      encryption: s3.BucketEncryption.KMS,
      encryptionKey: key,
    });

    // Create processing environment
    const environment = new ProcessingEnvironment(this, 'Environment', {
      key,
      inputBucket,
      outputBucket,
      workingBucket,
      metricNamespace: 'MyIdpSolution',
    });

    // Attach document processors to the environment
    // (processors are provided by separate packages)
  }
}

API Reference

Key Components

  • ProcessingEnvironment: Main construct that orchestrates the document processing workflow
  • ProcessingEnvironmentApi: GraphQL API for monitoring document processing status
  • IDocumentProcessor: Interface for document processing implementations
  • LogLevel: Enum for controlling logging verbosity

For detailed API documentation, please refer to the TypeScript type definitions and JSDoc comments in the source code.

Contributing

We welcome contributions to the GenAI IDP Core Package! Please follow these steps to contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your code adheres to our coding standards and includes appropriate tests.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

版本与发布记录

@cdklabs/genai-idp 共发布 7 个版本,首次发布于 2025/09/24;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.3.1latest2026/05/185 个月前
0.3.02026/05/155 个月前
0.2.02026/03/118 个月前
0.1.02026/02/268 个月前
0.0.22025/10/061.1 年前
0.0.12025/09/301.1 年前

关于 @cdklabs/genai-idp 的常见问题

@cdklabs/genai-idp 是什么?

![Stabil

如何安装 @cdklabs/genai-idp?

在项目目录运行 npm install @cdklabs/genai-idp,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@aws-cdk/aws-bedrock-agentcore-alpha(^2.241.0-alpha.0)、@aws-cdk/aws-bedrock-alpha(^2.241.0-alpha.0)、@aws-cdk/aws-glue-alpha(^2.241.0-alpha.0)、@aws-cdk/aws-lambda-python-alpha(^2.241.0-alpha.0)、@aws-cdk/aws-sagemaker-alpha(^2.241.0-alpha.0)、@cdklabs/generative-ai-cdk-constructs(^0.1.314)、aws-cdk-lib(^2.241.0)、constructs(^10.5.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cdklabs/genai-idp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cdklabs/genai-idp 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@cdklabs/genai-idp 可以商用吗?

@cdklabs/genai-idp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@cdklabs/genai-idp 的下载量有多少?

根据 npm 官方下载统计,@cdklabs/genai-idp 在 2026/10/10 – 2026/11/08 这 30 天内被下载 1,812 次,日均约 60 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cdklabs/genai-idp 还在维护吗?

最新版本 0.3.1 发布于 2026/05/18(5 个月前);至今共发布 7 个版本,其中过去 12 个月发布了 4 个;首次发布于 2025/09/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。