Connic

S3 Document Pipeline

Auto-process documents uploaded to S3 with text extraction, classification, and routing. Handles PDFs, images, and text files with retries.

productivityintermediateAWS S3HTTP WebhookView on GitHub
connic init my-project --templates=s3-document-pipeline

Overview

Triggered by file uploads to an S3 bucket. The intake agent extracts text, metadata, and entities from PDFs, images, and text files. Middleware rejects unsupported file types with StopProcessing before the LLM runs. The classifier assigns categories, confidence scores, and routing destinations. Retries on transient failures.

Use cases

Document management

Automatically classify and route documents to the right team as they land in your S3 inbox.

Contract processing

Extract key entities (parties, dates, amounts) from uploaded contracts and flag for legal review.

Multi-format intake

Process PDFs, images, Word documents, and text files through a single unified pipeline.

Architecture

S3 Bucket
document-pipeline
document-intake
document-classifier
Team Routing

Scaffolded project structure

Running connic init my-project --templates=s3-document-pipeline creates this file tree.

s3-document-pipeline/
  agents/
    document-intake.yaml
    document-classifier.yaml
    document-pipeline.yaml
  middleware/
    document-intake.py
  schemas/
    intake-result.json
    classification-result.json
  requirements.txt
  README.md

Get started

Install the template, create a Connic project, and deploy. Choose Git (automatic on push) or CLI (works with any provider).

Prerequisites

  • Python 3.10+
  • A Connic account (create a project first)
  • API key for your LLM provider (e.g. Gemini, OpenAI) to add in project variables
Create project
1

Install and scaffold

Install the SDK and create a project from this template.

terminal
pip install connic-composer-sdk
connic init my-project --templates=s3-document-pipeline

Then cd my-project

2

Deploy

Pick your deployment method. Git auto-deploys on push; CLI works with GitLab, Bitbucket, or no Git.

Git integration

  1. In Connic: Project Settings → Git Repository, connect your GitHub repo
  2. Settings → Environments: map branch (e.g. main) to Production
  3. Push your scaffolded project to that repo
terminal
git add .
git commit -m "Add S3 Document Pipeline template"
git push origin main

CLI deploy

  1. In Connic: Project Settings → CLI, create an API key and copy project ID
  2. Run connic login in your project folder
  3. connic test to try with hot-reload, or connic deploy for production
terminal
connic login
connic test    # Ephemeral dev env with hot-reload
connic deploy # Deploy to production
3

Connect and configure

Add an S3 inbound connector with your bucket name and AWS credentials. Configure S3 Event Notifications to point to the connector's webhook URL. Add your LLM provider API key in Project Settings → LLM Provider API Keys.

Template source

Browse the full template, contribute improvements, or fork for your own use.

connic-org/connic-awesome-agents/tree/main/s3-document-pipeline