Go To Top

← Back to Field Tools

♦ Field tool

Agent Evals & Observability: Two Sides of One Coin

Before an enterprise trusts an agent, it wants to know whether it works and what it costs. Working on my own, with AI covering work that used to take several teams, I built the two tools that answer both: AI Attribution Inspector makes the record answerable, and Agentforce Test Lab judges it.

STATUSACTIVE
evalsobservabilitytracingregression-testingagentforcepythoncli

Before an enterprise trusts an agent with real customers, it wants two answers, does it work and what will it cost, and they turn out to be the same question asked by different people in the room. Both answers come out of one trustworthy record of what actually happened, so the two tools I built for this are really two sides of one coin… AI Attribution Inspector makes that record answerable, and Agentforce Test Lab judges it.

The work started in mid-2025 as a quick fix for gaps in observability and billing metering, and kept growing until it was a full eval and regression framework, which is roughly what happens any time you hand an architect a “quick fix” ;) That much ground would traditionally be divided between an observability team, a billing team, a QA team and whoever owns the developer tooling. I built all of it on my own, using AI to cover the work those teams would have done, and since systems tend to end up shaped like the org that built them, an org chart of one is a big part of why both tools share one record instead of each keeping its own.

I was a very early adopter of Cursor and Claude Code, at work and on my own time, and got good at collaborating with models and the harnesses that run them. Pair that with deep domain expertise, enough to know exactly what to ask for and what to send back, and my output went exponential, which is a word I’d normally confiscate from a vendor slide, but it’s the honest one here. The part I care about more is that I finally got to build the whole vision, every bell and whistle, with no handwaving, which for an architect is a genuinely novel experience.

AI Attribution Inspector: making the record answerable

I built Inspector on top of tracing the platform already had. The tracing itself was fine… the problem was that customers had no way to ask it the questions they actually cared about, like “what does this agent cost for an average session?” or “why was this interaction metered?”, without exporting half the org into a spreadsheet. Inspector gives them defensible answers, and once the trace could answer real questions it started answering ones nobody had asked, which is how one customer’s UAT found its testers reporting things that never happened more often than the agent hallucinated.

What I built into it:

  • Session tracing: span-by-span trace trees with the conversation messages, the LLM steps and which action did what
  • Actor attribution: usage per user and per agent, with what the system did kept separate from what people did
  • Cost calculation: per-session cost views for go-live decisions
  • Telemetry correlation: separate telemetry sources joined on shared keys, with the probabilistic joins flagged so nobody mistakes a good guess for a fact

Agentforce Test Lab: judging it

I designed, built and deployed Test Lab, and Salesforce Technical Architects use it today as a reusable asset. It judges an agent two ways, because some questions need an opinion and some really don’t.

  • LLM judges for the subjective part. A judge watches the conversation and decides whether the agent met the customer’s goal. Profile prompts shape how each judge assesses it, and there are multiple levels of judging.
  • Deterministic checks for everything else. Trace-based assertions confirm the words used, the tools called and the topic routing, so nobody has to argue about what happened.

I designed a complete schema for scenario testing, and the suite builder knows which tools the agent has, so picking them is point-and-click instead of copy-and-pray. It can also generate a starting suite straight from the Agent Definition, which spares everyone the part where you stare at a blank test plan.

It runs in the org as a Lightning Web Component, or from the command line as AgentHarness, the Python CLI version. AgentHarness calls Claude with your own Anthropic API key instead of spending the customer’s Flex Credits, so teams can run suites during development and in CI pipelines without anyone getting a surprise invoice. Either way you get detailed run reports, and the CLI also produces structured JSON, markdown reports and CI-compatible exit codes.

← Back to Field Tools