Research

A rigorous analysis of your agent, from traces to code.

Papaya reads your production runs and the code behind them. It follows each problem to its cause and checks every finding against your runs before you see it.

200+ research-backed analyses are one part of that work, and we keep adding to them.

Book a callSee it on your own traces.
Papaya analysis
Your agent

Traces and code, read together.

  • Source documents
  • Prompts
  • Context
  • Model & config
  • Tool calls
  • Sub-agents
  • Caching
  • Verification
  • Outcomes
How it works

Traces show what went wrong. Code shows why.

Most tools stop at the trace. Papaya keeps going until it can point at the line to change.

  1. 01 · Your traces

    What really happened

    Every call, tool result, retry and answer across your production runs. This is where problems show up.

  2. 02 · Your code

    Why it happened

    The prompts, tool code, model settings and loop behind those runs, at the version that produced them.

  3. 03 · Ranked fixes

    What to change, and where

    Each problem followed to its cause, checked against your runs, and ranked by what fixing it is worth.

What we look at

Every part of your agent.

Each part has its own analyses, based on current research into how agents fail and what makes them cheaper and faster.

  • Source documents

    Did the agent read every page, email and attachment it needed? Do the values it wrote match them?

    Found inTraces
  • Prompts

    Instructions that contradict each other, repeat on every step, or promise rules the code never enforces.

    Found inTracesCode
  • Context

    What you send the model versus what it uses: missing facts, extra bulk, and facts buried where the model misses them.

    Found inTracesCode
  • Model & config

    Which model each step uses, how much it reasons, and its token limits. Too much where it isn't needed, too little where it is.

    Found inTracesCode
  • Tool calls

    Wrong tools, bad arguments, failures that look like success, and tools that return far more than the agent uses.

    Found inTracesCode
  • Sub-agents

    Hand-offs that drop context, sub-agents that redo the parent's work, and steps that could run side by side.

    Found inTracesCode
  • Caching

    Whether your prompt cache actually hits, and the line of code that keeps breaking it.

    Found inCodeTraces
  • Verification

    Checks that run every time but miss real failures, and risky actions with no check at all.

    Found inTracesCode
  • Outcomes

    Whether the task actually got done, not just whether the agent said so, and what users asked for that it couldn't do.

    Found inTraces
From your code

Problems you can only see in the code.

Some causes never show up clearly in a trace. A cache that never hits, a rule nothing enforces, a failure dressed up as success. Reading the code finds them.

  • Caching

    A changing value in front of the cached prompt

    The date changes on every call, so the long prompt after it is never served from cache.

  • Tool calls

    A tool that says one thing and does another

    The description promises live data. The code returns yesterday's copy, and 0 when the account is missing.

  • Verification

    A rule the prompt promises but the code skips

    Nothing in the code stops a $900 refund. The limit only holds if the model remembers it.

  • Prompts

    Outside text treated as instructions

    An email lands in the instructions, so whoever writes it can steer the agent.

  • Speed

    Independent calls made one at a time

    Each lookup waits for the one before it. Running them together cuts the wait to the slowest call.

  • Tool calls

    A retry loop with no way out

    The same failing call repeats with nothing changed and no limit, burning tokens until the run times out.

  • Tool calls

    A failure that looks like success

    When the API is down, the agent sees “no orders” and tells the customer they have none.

More of what we look for

A sample from each part.

Every finding comes with the runs that show it and, when your code is connected, the line behind it.

Each check improvesQualityCostSpeed

Source documents

  • Pages the agent never read

    Pages or attachments that never reached the model.

  • Facts it saw but didn't use

    The fact was in front of the model and still came out missing or wrong.

  • Decisions with nothing to go on

    The answer depended on a rule no input contained.

  • Values with no source

    Numbers, dates or IDs written down that no document supports.

  • Documents that disagree

    A file says one thing, the database another, and the agent quietly picks one.

  • Content lost while reading

    Comments, tracked changes or hidden sheets the reader threw away.

Prompts

  • Conflicting instructions

    Two rules that can't both hold, so runs split on which one wins.

  • Rules that read two ways

    Similar requests handled differently because a rule is vague.

  • Instructions sent again and again

    The same text resent on every step of a run.

  • Rules lost along the way

    A limit set early that later steps no longer see.

  • Flows worth a template

    One-off flows that come up often enough to standardize.

Context

  • Missing context

    Failed runs lack a field that good runs had.

  • Context nobody uses

    Text sent on every call that never shapes an answer.

  • Prompts that are too long

    So much context that key instructions get ignored or cut off.

  • Key facts buried in the middle

    Facts the answer needs, lost deep inside a long prompt.

  • Full history on every turn

    Old turns and every tool description resent each time.

  • Summaries that drop facts

    Shortening the history removed something a later step needed.

  • Out-of-date memory

    Acting on remembered details that have since changed.

  • Search results off the mark

    Retrieved text that doesn't fit the question crowds out what does.

Model & config

  • Model too big or too small

    A large model on easy steps, or a small one failing hard ones.

  • More reasoning than needed

    High effort on steps where low effort gives the same answer.

  • Try the cheaper model first

    Most requests would succeed on a cheaper model, with a step up when needed.

  • Answers cut off at the limit

    Output stops at the token limit before it's finished.

  • Extra attempts that don't help

    Several tries per step with no better result than one.

  • Broken structured output

    JSON that fails to parse and needs a repair call.

Tool calls

  • Wrong tool or wrong arguments

    The right tool used the wrong way, or the wrong tool for the job.

  • Failed calls retried as-is

    The same failing call repeated with nothing changed.

  • Tools that return too much

    Thousands of tokens back when the agent uses a few fields.

  • Tool results that change nothing

    Calls whose result never affects the next step.

  • Chains that could be one call

    The same sequence of calls, every time, in the same order.

  • Timeouts and rate limits

    Calls that stall or get throttled with no backoff.

  • Risky writes with no safeguard

    Changes made with no confirmation and no way to undo.

Sub-agents

  • Hand-offs that drop context

    A sub-agent lacks a fact the parent had, and guesses or asks again.

  • Work done twice

    Sub-agents repeat lookups the parent already made.

  • Sub-agents not worth it

    Small tasks handed off when the parent could do them inline.

  • Steps that could run together

    Independent steps waiting on each other.

  • Loops with no way out

    Runs that go until they hit a limit rather than until they're done.

  • Lost state after a pause

    Runs that resume after an approval with missing or old details.

Caching

  • Prompt cache misses

    Changing text placed before the reusable part breaks the cache.

  • Cache entries that expire unused

    Paying to write the cache, then calling after it has expired.

  • The same lookup twice

    One run fetching the same result more than once.

  • Unsafe reuse

    Cached answers served after the data changed, or across users.

Verification

  • Self-checks that miss failures

    Checks that always pass, including on runs that went wrong.

  • No check before a risky step

    Nothing stands between an error and what it affects.

  • Output in the wrong shape

    Results the next step or caller can't use as returned.

  • Claims with no source

    Statements nothing in the inputs or tool results supports.

  • Errors hidden behind a normal answer

    Something failed mid-run, and the final answer looks fine.

  • Guessing instead of asking

    Missing information that should have changed the answer didn't.

Outcomes

  • Saying done when it isn't

    The agent reports success while the work actually failed.

  • Asking users for what it could find

    Questions the agent could have answered with a lookup.

  • Runs with no success measure

    Whole kinds of runs that nothing tells you are working.

  • Tests that miss real failures

    Your evals never cover the problems production hits.

  • Requests it can't serve

    What users keep asking for that the agent has no way to do.

  • Where the money goes

    Spend by workflow and step, so fixes go where they pay.

  • Slowest runs

    The steps behind your slowest runs, not just the average.

What you get

Every finding comes with proof.

A short list of fixes, ranked by what they're worth. Each one shows its evidence, the code to change, and how to test it.

One problem, in plain words
ExampleTool callsFlight cancellations

The policy lookup returns the whole fare policy. The agent only needs the fee table.

The runs that show it
run 8f2astep 6
run 19c4step 4
run a07estep 9
What fixing it is worth
Quality
Holds
checked on every test run
Cost
Lower
fewer tokens per run
Speed
Faster
smaller tool responses
Where it lives in your code
tools/policy.py Pull request ready
42 - return policy.full_text()
42 + return policy.section("fees")
Why we trust it
  • Not on purpose. No step reads past the fee table, and no answer cites another section.
  • Test before you ship. Replay recent runs with the change and confirm refunds still come out right.
Go deeper

Guides on the problems we see most.

FAQ

Frequently asked questions.

What is Papaya?

Papaya is continuous optimization for AI agents. It analyzes your production traces, finds the changes that improve quality and latency and reduce cost, ranks them by expected impact, and helps you ship them.

How is Papaya different from an observability tool?

Observability shows you what happened in each run. Papaya looks across thousands of runs to find recurring failures and waste, estimates what each fix is worth, and recommends the change, with the exact runs behind it as evidence.

What parts of an AI agent does Papaya analyze?

Papaya runs 200+ research-backed analyses across prompts, context and memory, retrieval, tools, sub-agents, configuration and model routing, caching, and more.

How do I connect my agent to Papaya?

Wrap any LLM or agent client with one line of code using the Papaya SDK, connect Papaya to your observability tool, or share a dataset or raw export in any format. Papaya detects the shape of the data automatically.

Does Papaya add latency to my agent?

No. Trace collection is asynchronous, so Papaya never sits in your agent's request path.

Does Papaya change my agent automatically?

No. Every change is human-in-the-loop. You review the evidence and choose which fixes to implement; Papaya can open a pull request for the ones you approve and send alerts to Slack when it finds new improvements.

How quickly can I see results?

You don't need to integrate anything first. Share traces from one workflow in whatever form you have, even a raw export, and you get back a ranked set of improvements with the evidence behind each one and what every fix is worth in quality, latency, and cost. Your first analysis is on us.

How much does Papaya cost?

See the pricing page for current plans and limits.

Who backs Papaya?

Papaya is backed by Y Combinator, Engineering Capital, and Everywhere Ventures.

See it on your agents

The quickest way to see what we'd find is to run it on your own agent.

Send us some traces in whatever form you have, and connect your code if you like. We'll run the analysis and walk you through the fixes on a call. Your first analysis is free, and there's nothing to sign up for.

Book a callSee it on your own traces.