← All projects
Agentic AI Advanced

CartPilot

Embedding a shopping assistant into a legacy e-commerce monolith

Take an existing store codebase from discovery to production: prototype a conversational shopping agent, harden it, then merge it into the monolith.

SHIPSTACK · PROJECT CartPilot Embedding a shopping assistantinto a legacy e-commercemonolith Advanced Agentic AI 1 Storefront 2 FastAPI monolith 3 Catalogue & orders 4 Cloud Run 5 milestones

The scenario

CartPilot is a Forward Deployed Engineer exercise. You inherit an e-commerce monolith you didn’t write, map how it works, and prove value with a standalone shopping assistant built on Pydantic AI and a fast open-weight model. Once the proof-of-concept passes its guardrail and quality checks, you integrate it into the main FastAPI application — catalogue search, cart actions and order lookups as typed tools — and deploy the unified service to Cloud Run with tracing and automated evaluations in CI.

System architecture

01 Storefront Chat widget
02 FastAPI monolith Existing routes + agent route
03 Pydantic AI agent Typed tools + guardrails
04 Catalogue & orders Postgres via the app’s services
05 Cloud Run Traced with Logfire

High-level flow of CartPilot, from input to output.

What you will learn

  • Running a codebase discovery and writing an integration plan
  • Typed tools for catalogue, cart and order actions
  • Input/output guardrails for a customer-facing agent
  • Evaluations that run on every pull request
  • Observability with traces across the agent and the app

What you will build

  • Discovery report and integration design for the monolith
  • Standalone assistant with search, cart and order tools
  • Integrated FastAPI service with a chat widget in the storefront
  • CI pipeline with evals and deploy to Cloud Run

Build plan

  1. Discovery: map the monolith and pick integration points
  2. Prototype the assistant outside the codebase
  3. Add guardrails and an eval set
  4. Integrate into the monolith behind a feature flag
  5. Deploy with CI evals and tracing

Tech stack

Pydantic AIGroqFastAPICloud RunLogfireGitHub Actions