diudiu-tech/delivery-harness

AI harness reference implementation for on-demand delivery workflows

What it solves

This project provides a reference implementation for an AI-powered operations platform tailored for on-demand delivery services. It addresses the challenge of automating the analysis of abnormal orders and suggesting compensation for customers, while ensuring that critical business logic (like actual payout amounts) remains deterministic and controlled by a rule engine rather than the AI model.

How it works

The platform uses a set of synchronous workflows that combine several components:

  • Deterministic Workflows: Fixed paths for analyzing abnormal orders and suggesting compensation.
  • Synthetic Business Tools: Mock tools that provide data on orders, ETA, station capacity, and compensation rules.
  • Knowledge Retrieval: A lightweight, in-memory lexical retrieval system for rules and cases.
  • LLM Integration: An OpenAI-compatible client that connects to models (e.g., via Ollama) to generate advisory output.
  • Guardrails & Evaluation: A system of human-review guardrails and evaluation scaffolding to measure performance against a deterministic baseline.
  • Observability: Built-in tracing, metrics, and feedback storage to monitor execution steps and durations.

Who it’s for

It is designed as an educational MVP for engineers and architects looking to build AI harnesses for operational workflows, specifically those requiring a blend of AI-generated suggestions and strict rule-based business logic.

Highlights

  • Rule-Engine Authority: Ensures the AI model never decides the final compensation amount.
  • OpenAI-Compatible: Works with any OpenAI-compatible endpoint, making it easy to swap models.
  • al-Memory Architecture: Operates without external databases, using in-memory stores for knowledge, traces, and evaluation cases.
  • Evaluation Scaffolding: Includes a built-in framework to run evaluation cases and score them to catch regressions.
  • Integrated Tracing: Provides request trace IDs and per-step durations for deep visibility into the AI's reasoning process.

Related

  • Project
  • Project
  • Project
  • Project