All work

The Hershey Company, March to June 2026

An AI agent that equips every new hire, with the LLM only where a person is talking

Project Spring lets a manager set up a new hire’s IT equipment in one short chat. I was the primary architect: I took a five-agent prototype that guessed its way through the process and rebuilt it as a fixed workflow where language models handle conversation and code handles everything else.

Role
Primary architect and top contributor
Team
3 engineers
Users
15–20 managers in the first rollout
Stack
Python, Microsoft Agent Framework, Azure OpenAI, FastAPI, React

How a request moves through the agent

LLM calls this run0
Agents using an LLM5
Time outside chat (est.)–
LLMCodePerson

Context

Before Project Spring, equipping a new hire meant manual tickets, guesswork about which laptop or peripherals the role needed, and days of back-and-forth with IT.

The agent replaces that with one guided conversation. It:

  • collects six details about the new hire, including role, department, location and start date
  • looks up what similar employees on the same team actually use in ServiceNow
  • recommends equipment, falling back from peer data to a role map to a sensible default
  • gets the manager’s approval in chat or by email through Microsoft Graph
  • places real ServiceNow catalog orders and returns the request numbers

The whole flow takes about two to three minutes and ends with orders placed, grounded in real data rather than a generic checklist.

The problem with the first version

The proof of concept used five LLM agents with an LLM orchestrator deciding who should act next. It demoed well and behaved unpredictably:

  • the orchestrator sometimes routed to the wrong agent or invented a handoff
  • the approval agent occasionally reported an approval the manager never gave, or ended the session early when someone changed an item
  • every step paid for an extra LLM round trip just to decide what came next, so runs were slow and costly

None of these were prompt problems. They came from letting a model make decisions that had a single correct answer.

What I built

I replaced the dynamic handoffs with a fixed workflow graph in Microsoft Agent Framework:

  • Two LLM agents, used only where a human is in the conversation: one collects the new hire’s details, one handles approval.
  • Four code steps for the ServiceNow lookup, the recommendation, the ordering and the summary. They run in seconds, can be unit tested, and can’t hallucinate.
  • A code router that reads workflow state, so choosing the next step costs zero LLM calls.
  • Typed outputs with Pydantic. The approval agent returns a structured decision, and only an explicit approval can reach the ordering step. A rejection ends the run before any ticket exists.
  • A fresh workflow per session, so one manager’s conversation can never leak into another’s.

Finding the right equipment

A new hire doesn’t exist in ServiceNow yet, so I pivoted the lookup to the hiring manager’s team. The lookup chains four steps: manager, then teammates with a similar job code, then the assets they hold, then the orderable catalog item for each model. Only active catalog items are considered, which stopped orders failing on retired hardware.

Key decisions

Route with code, not an LLM orchestrator
Instead ofAn LLM deciding the next agent on every turn
WhyThe next step always has one right answer. Code gets it right every time, instantly, and costs nothing.
Structured outputs for approval
Instead ofParsing marker strings like “ASSETS_APPROVED” from model text
WhyMarkers were fragile and the model could produce them without a real approval. A typed decision is validated before the workflow moves.
Look up peers by the manager’s team
Instead ofLooking up the new hire’s own record
WhyNew hires aren’t in ServiceNow before day one. Their future teammates are the best signal for what they’ll need.
Fixed graph now, tool wrappers kept
Instead ofKeeping the dynamic handoff design for flexibility
WhyReliability mattered more for v1. The tool wrappers stay so the workflow can later plug into a larger multi-agent setup.

Governance and security

I designed the AI governance layer so policy lives outside the agents, where a model can’t argue its way past it:

  • all model traffic goes through Azure API Management, which applies content moderation and checks on both input and output
  • Open Policy Agent makes the policy decisions, and each agent carries its own identity so rules can differ per agent
  • private networking, managed identity and least-privilege role assignments, all defined in Bicep
  • OpenTelemetry traces tied to each session, giving an end-to-end audit trail

I also wrote the governance implementation plan: a zero-trust design split into six phases that can each ship on their own.

Hard problems

An agent that approved things nobody approved

Stricter prompt rules reduced it but didn’t remove it. Moving to a typed decision, with approval as the only path into ordering, removed the failure by construction.

Data that stores references, not names

ServiceNow links users, assets, models and catalog items by reference. The four-step lookup resolves those references into items that can actually be ordered.

Corporate network quirks

Traffic inspection on the corporate network broke TLS for the model client, so I added a custom certificate setup. A gateway URL quirk in the SDK needed a fix of its own.

Deploys that broke after server reboots

The container runtime on the shared deploy server kept stale state after reboots, so I added a CI job that detects and repairs it automatically.

Results

MeasureBeforeAfter
LLM-backed agents5, including the orchestrator2
LLM calls per onboarding est.~15–19~4–6
Time spent outside the chat est.~20–40 s~1–3 s
Token cost per onboarding est.Baseline~65–75% lower
Misroutes and invented handoffsRecurringRemoved by design
Orders failing on retired hardwarePossibleFiltered out
Code removed in the refactor–~3,200 lines
Deploy failures after a rebootFixed by handRepaired automatically in CI

Estimates are derived from the architecture, such as the number of model calls per run, not from formal benchmarks.

Teammates built the ServiceNow ordering APIs, single sign-on, email approvals, the evaluation suites and the telemetry exporters. The design described here, the lookup logic, the performance overhaul, the infrastructure and the governance work were mine.

What’s next

The pattern, a fixed workflow for business steps and a governed gateway for every model call, is set up to become the template for future Hershey agents, such as incident workflows and asset questions, under a larger multi-agent workflow.

Want to go deeper on this? Let’s talk.