Skip to main content

@cdklabs/genai-idp

Project description

GenAI IDP Core Package

Compatible with GenAI IDP version: 0.3.13 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.

Related Projects

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdklabs_genai_idp-0.0.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdklabs_genai_idp-0.0.0-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file cdklabs_genai_idp-0.0.0.tar.gz.

File metadata

  • Download URL: cdklabs_genai_idp-0.0.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cdklabs_genai_idp-0.0.0.tar.gz
Algorithm Hash digest
SHA256 5073f4b233808591092b516968be4f308e58e25e8b5bb65c6644c6c1a69592c6
MD5 d0fdaa308fe9c5f0857e745187a7a470
BLAKE2b-256 8c434849f8542f8b1ebc3fb3967c2ba830591ae3d386f01786e31c3e8aea1b9c

See more details on using hashes here.

File details

Details for the file cdklabs_genai_idp-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cdklabs_genai_idp-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7d98d53c312f6af271226ca47a3bb741e0216fd5c93c9d8fa1dcf8312a3300a
MD5 48be80809bd8e63b787990440269edd4
BLAKE2b-256 e3eff30ad9870b5a907f3d3f03ce4d1b0730025cb2f1b486289c1df302f5f9c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page