Skip to main content
v
A P I D AY S B A N G A L O R E · 2 0 2 6
From APIs to Agents
Your Test Suite Is Lying to You
(and, respectfully, so is mine — that's the talk)
Whether you've shipped one API or you're running a fleet of agents — this is for you
25 minutes. Some hot takes. Zero apologies.
Manoj Kumar
Vice president – Technology , Moolya
01
The Shift: APIs → Agents
APIs used to be boring. That was the best part.
APIdays Bangalore 2026 2
T H E S H I F T
Two very different callers of the same API
1:1 Deterministic API Consumer
Fixed call sequence, written by a developer
Same input → same request, every time
Success = correct status code + schema match
Failure is visible immediately, at the call site
N:N Agent-Driven Orchestrator
Chooses which API(s) to call, dynamically
Same input → different path across runs
Success = did the overall goal get met
Failure hides downstream, several calls later
The column on the right is why your on-call rotation started crying. Softly, at first.
APIdays Bangalore 2026 3
02
The Illusion of “It Works”
Green checkmarks: the participation trophies of software testing
APIdays Bangalore 2026 4
T H E I L L U S I O N O F “ I T W O R K S ”
Every call can pass. The system can still fail.
Search
Availability
✓
Check
Policy
✓
Apply
Discount
✓
Confirm
Booking
✓
✕
Booking confirmed. Wrong price. Wrong
dates. Support inbox now on fire.
4 API calls. 4 green checkmarks. 0 correct outcomes.
Each endpoint returned a valid response to a badly-chosen or badly-sequenced request —
and no contract test catches that, because the contract was never violated.
Hot take: contract testing didn't fail here. It was never trying to.
APIdays Bangalore 2026 5
03
Failure Patterns in Agent–API Systems
Four ways your polite little agent quietly ruins your day
APIdays Bangalore 2026 6
F A I L U R E P A T T E R N S
Four ways agent-API systems break silently
1
API Selection
Agent calls the wrong tool for
the job — a plausible endpoint,
not the right one.
getRefundStatus instead of
getOrderStatus, because both
names 'match' the ask.
Confidently.
2
Sequencing
Right calls, wrong order —
dependencies between steps
get skipped or reversed.
Payment captured before inventory
is confirmed as available. Ask me
how I know.
3
Orchestration
Parallel or multi-agent flows
lose coordination — duplicate,
conflicting, or dropped calls.
Two sub-agents both apply the
same coupon, unaware of each
other, both very pleased with
themselves.
4
Context Drift
Long-running sessions lose
track of earlier constraints as
context gets summarized or
truncated.
User said 'no seafood' three turns
ago. Agent orders lobster. Agent
seems proud of this.
APIdays Bangalore 2026 7
U N P O P U L A R O P I N I O N
If your agent’s test suite has never made you
nervous, you’re not testing the agent.
You’re testing your own optimism.
Screenshot this. Use it in your next retro. I'll wait.
APIdays Bangalore 2026 8
04
Limitations of Current Testing
Everything you trust, and none of it was built for this
APIdays Bangalore 2026 9
T E S T I N G ' S B L I N D S P O T S
Correct at the layer it checks. Blind past it.
Approach What it validates What it misses
Contract testing Structural validation only
Confirms the shape of a request/response — not whether calling it here, now,
was the right decision
Schema validation Ignores intent & outcome
Confirms fields and types match — not whether the data returned actually
satisfies the user's goal
Traditional automation Single-path validation
Scripts one expected route through the system — agents take a different route
on every run
Translation: all three ask “was this well-formed?” None of them ask “was this right?”
APIdays Bangalore 2026 10
05
Behavioral API Testing
The part where I stop complaining and start being useful
APIdays Bangalore 2026 11
B E H A V I O R A L A P I T E S T I N G · S T E P 1 – 2
Start with intent. Then run it more than once.
1 Curated Evaluation (Golden) Datasets
Real user intents, not just request payloads
Each case carries an expected outcome, not just an expected
schema
Cover edge cases: ambiguous asks, conflicting constraints,
missing data
Owned and reviewed like a product spec, not generated once
and frozen
2 Multi-Pass Execution
Same input. Multiple independent runs.
Run 1
Run 2
Run 3
One agent. Same prompt. Three moods. This is a feature of the failure, not
a bug in the test.
APIdays Bangalore 2026 12
B E H A V I O R A L A P I T E S T I N G · S T E P 3
Score the outcome, not just the response
1
Relevance
Did the agent call APIs that actually
serve this specific intent — not just
plausible ones?
Not: "is this a valid API?"
2
Faithfulness
Does the final response accurately
reflect what the APIs actually returned,
with nothing invented?
Not: "is the JSON well-formed?"
3
Completeness
Were all necessary steps carried out, in
a state the user would recognize as
"done"?
Not: "did every call return 200?"
APIdays Bangalore 2026 13
B E H A V I O R A L A P I T E S T I N G · S T E P 4
Make it continuous, not a one-time audit
Golden
Dataset
Agent Under
Test
Multi-Pass
Runner
Outcome
Scorer
Regression
Dashboard
Runs on every deploy — API-driven, wired into CI, not a quarterly audit nobody reads
The harness is API-driven on purpose: it calls the agent the same way a real caller would, scores the transcript against the golden dataset, and fails
the build on a drop in relevance, faithfulness, or completeness — the same discipline as a performance or security gate. No vibes-based sign-off.
APIdays Bangalore 2026 14
I M P L I C AT I O N S F O R E N G I N E E R I N G T E A M S
What actually changes in how teams work
1
Strategy
Pass/fail gives way to graded outcome
scores tracked as a trend, with a
defined tolerance for run-to-run
variance.
2
Tooling
CI gains a multi-pass, LLM-scored
evaluation stage alongside — not
instead of — contract and schema
checks.
3
Ownership
QA/SDET partners with API architects
and ML engineers to own golden
datasets as a living, versioned artifact.
Yes, this is more work. You're welcome — it's cheaper than the incident review.
APIdays Bangalore 2026 15
B R I N G I N G I T T O G E T H E R
Every gap, paired with its fix
Structural validation only →
Outcome-based evaluation
relevance · faithfulness · completeness
Single-path testing →
Multi-pass execution
same input, many independent runs
No validation of intent →
Curated golden datasets
real intents, expected outcomes, owned like a spec
APIdays Bangalore 2026 16
The agent will always pass your unit tests.
The question is whether it passes your users.
Thank you. Yes, I said your agent lies to you.
Come argue with me about it — I'll be at the speaker table.
APIdays Bangalore 2026