Skip to content
All projects

Agentic AI · Production Engineering / v1.0.0

AI Operations Agent

An agentic business-process automation platform designed around the engineering controls required when AI can propose and execute operational actions: schema validation, deterministic policy enforcement, human-in-the-loop approval, allow-listed tools, durable audit events, background processing, reliability safeguards, observability, security gates, and cloud-ready infrastructure.

PythonFastAPILangGraphPydanticPostgreSQLSQLAlchemyAlembicCeleryRedisDockerTerraformAWS ECS/FargateAmazon RDSElastiCacheECRSecrets ManagerCloudWatchGitHub ActionspytestmypyRuffBanditpip-audit

The problem

AI assistants become significantly riskier when they move from generating text to proposing real business actions. A production-oriented workflow needs authorization boundaries, deterministic controls, human review for sensitive actions, reliable asynchronous execution, traceability, security checks, and an infrastructure model that does not treat the LLM as the source of truth.

My approach

I built a FastAPI and LangGraph workflow in which model output is schema-validated and evaluated by deterministic application policy before any action can execute. Sensitive requests enter a persisted human approval flow, approved actions use an explicit tool registry, PostgreSQL stores workflow and audit state, and Celery/Redis handles asynchronous execution with idempotency and bounded retries. Docker, GitHub Actions, structured logging, correlation IDs, security scanning, and validated Terraform extend the project into production-oriented software engineering.

Project overview

FastAPI accepts an internal operations request and persists its state and audit trail in PostgreSQL.

Celery and Redis dispatch processing asynchronously so API request handling is separated from longer-running agent work.

LangGraph produces a schema-validated proposal; deterministic application policy decides whether the action may proceed automatically or requires human review.

Approved actions execute only through an allow-listed tool registry, while approval decisions and workflow transitions remain auditable.

Reliability and operations layers add idempotency guards, bounded retry/backoff, structured JSON logs, correlation IDs, liveness/readiness endpoints, Docker packaging, security scanning, and Terraform-validated AWS architecture.

System workflow

01

Request

FastAPI → persisted operation request + audit event

02

Plan

LangGraph → schema-validated structured proposal

03

Authorize

Deterministic policy → automatic path or human approval gate

04

Execute

Approved proposal → explicit allow-listed tool registry

05

Operate

Celery/Redis + idempotency + retries + structured observability

Challenges and fixes

Keeping authorization outside the LLM

Model output is treated as untrusted input. Pydantic schemas and deterministic application policy decide what may proceed, while executable capabilities are constrained to an explicit tool registry.

Reliable background execution

Celery uses at-least-once delivery semantics, so terminal and approval-waiting requests are guarded against duplicate processing and transient failures use bounded exponential backoff.

Production claims without overstatement

The repository validates AWS Infrastructure as Code and documents deployment/rollback operations, while clearly distinguishing that evidence from an actually provisioned production environment.

Result and learning

The project demonstrates an end-to-end agentic operations architecture rather than another conversational demo: auditable request state, structured AI proposals, policy-controlled tool execution, approval/rejection workflows, asynchronous workers, reliability controls, security quality gates, and validated AWS Infrastructure as Code for ECS/Fargate, RDS, ElastiCache, ECR, Secrets Manager, ALB, and CloudWatch. The AWS stack is intentionally described as production-oriented IaC rather than a live production deployment until it is provisioned and operationally verified.

Scope and limitations

Explore the implementation

This case study is based on the project’s own documentation.

More projects

Let’s talk about AI and software development