Connic

SQS Order Processor

Validate and fulfill orders from SQS queues with fraud detection, inventory checks, and concurrency keys. Results publish to an outbound queue.

commerceintermediateAWS SQSView on GitHub
connic init my-project --templates=sqs-order-processor

Overview

Processes e-commerce orders from an SQS queue through a validation-then-fulfillment pipeline. The validator checks completeness, calculates totals independently, verifies inventory, and flags fraud signals. Concurrency control queues orders by customer_id to prevent duplicates. Middleware rejects malformed payloads with StopProcessing before the LLM runs. Approved orders get fulfillment records from a deterministic tool agent. Results are published to an SQS outbound queue.

Use cases

Order validation

Validate incoming orders for missing fields, calculation errors, and fraud signals before fulfillment.

Inventory management

Check stock availability during validation and reject orders for out-of-stock items.

E-commerce backend

Process high-volume order queues with per-customer concurrency control and strict timeout guarantees.

Architecture

SQS (orders)
order-pipeline
order-validator
order-fulfiller
SQS (fulfillment)

Scaffolded project structure

Running connic init my-project --templates=sqs-order-processor creates this file tree.

sqs-order-processor/
  agents/
    order-validator.yaml
    order-fulfiller.yaml
    order-pipeline.yaml
  tools/
    order_tools.py
  middleware/
    order-validator.py
  schemas/
    order-validation.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=sqs-order-processor

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 SQS Order Processor 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 SQS inbound connector for the orders queue and an SQS outbound connector for the fulfillment queue. Provide AWS credentials for both. 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/sqs-order-processor