Replenishment pod: architecture and releases
Where the client-specific code lives, which shared headless services do the heavy lifting, and how a new agent version reaches the planner's queue. Agents read, calculate and draft. The client's team decides. No purchase order is placed by an agent.
Where the code goes
Custom, per clientHeadless, sharedOutside the platform
Why this is easier to build, more custom and more responsive
| Area | How it works for a client pod |
|---|---|
| Faster builds | The next pod reuses all seven services. Only the orange box is new work, built from a tested template. |
| Custom per client | Each client gets its own flows, prompts, tools, metrics and portal screens, in its own repo. Nothing is forced into a generic builder. |
| Agent logic | JSON in git: reviewed, compared step by step, rebuilt from the last shipped version |
| Responsive changes | Reorder rules, supplier terms, the promo calendar, run schedules and brief recipients change from the portal and apply on the next run |
| Knowledge | RagOS: a supplier terms record that always wins over an old price list, reorder policies, a promo and seasonality calendar with dates |
| Approval gate | toolOS: the only write to the ERP is create_po, and it runs only with a planner's approval id attached. An agent cannot call it |
| Reversible | Every agent action is logged with its reasoning and can be undone from the audit timeline; a rejected proposal leaves nothing behind in the ERP |
| Client portal | Pod Hub screens built for this pod: proposal queue, exceptions, the number by site, weekly brief |
| Safe releases | EvalOS gate on the client's golden cases; a worse version cannot ship |
| Tools and secrets | toolOS: timeouts, failure results, approvals; keys never enter the pod or its exports |
| Models | pod-gateway: per-pod budget, card and ID numbers blocked before any model call, models swapped without code changes |
| Tracing | Langfuse: one trace per run across model, knowledge and tools |
Where it runs, where data lives, how long it is kept
| Option | What runs where | Best for |
|---|---|---|
| Shared (default) | The client's pod runs in its own container; the seven services are shared, with every record scoped to that client | Most clients: fastest to start, lowest cost |
| Single-tenant | The pod and a dedicated copy of every service, used by this client only, run and patched by SectorFlow | Clients who need no shared infrastructure |
| Client-hosted | The same containers deployed in the client's own cloud account; SectorFlow ships releases through the same gate | Regulated clients, or data that cannot leave their account |
| Data | Residency | Default retention | Client control |
|---|---|---|---|
| Proposals, decisions and reasoning | Region chosen per client: Canada, US or EU | 24 months | 12 months to 7 years; exported in full on exit |
| Audit timeline | Same region | 24 months | Up to 7 years; exportable at any time |
| Demand and stock snapshots | Same region | 90 days | 30 days to 24 months |
| Traces | Same region | 30 days | Shorter or longer per client |
| Supplier terms, policies and calendar | Same region | Until removed; every version kept | Delete any record or version |
| Backups | Same region | 14 days | Fixed |
| On exit | – | – | Demand rules, documentation and a full export; 30 days of transition help |
How an agent version is updated
Release steps in detail
| Step | Who | What happens |
|---|---|---|
| 1 Change | SectorFlow engineer | Branch from the live version. Edit agents/po-drafter.json and its Stock watch pair, prompts or tools.yaml. Write release notes. |
| 2 Build checks | CI | Every tool and edge exists, every step is reachable, every variable is set, no write tool on any agent step, a failure edge on every data read. Diff by step, tool and rule for the reviewer. |
| 3 Quality gate | CI calls EvalOS | The candidate replays 120 golden reorder decisions from the client's own history; 18 months of logged production runs must still produce a proposal. All 6 hard rules pass on every case (never place a PO, MOQ and pack rounding, lead time respected, promo uplift applied, freeze windows honoured, reasoning on every line), at least 90% overall, no regressions against live. |
| 4 Client review | Client in Pod Hub | The candidate appears under Releases with notes, scores and failed cases. Make live is disabled for client users. |
| 5 Make live | SectorFlow in pod-control | The image and flow hash are registered as an immutable version. The live pointer moves to the new version. Traces and alerts are watched on the first runs. |
| Rollback | SectorFlow | Move the pointer back. The previous version is still deployed, so it takes effect on the next run. |