IInvest Like the Best
← All frameworks
InnovationKarim Atiyeh

Policy Agents: Programming the LLM as Your Product

Stop using AI to write your code faster and start making the LLM the code itself.

Difficulty
Advanced
Time to result
~months to results
Steps
6
Confidence
90%

Karim describes two phases of AI adoption. In phase one you use LLMs to do the same work slightly faster — a developer pastes generated code, reviews agent output, ships. In phase two, the LLM becomes the product: your code is an LLM plus instructions plus an infinite loop. Ramp's canonical implementation is the 'policy agent.' A company's travel and expense policy is a text document that historically drove human behavior and manual review. Ramp instead gives an agent more context about a transaction than any human reviewer (calendar, email, the policy document itself), lets it run continuously against incoming transactions, and has it suggest clarifications to the policy over time. Deterministic code is replaced with a living text document guiding a tool-using agent. The same pattern extends to invoice review, fraud checks, three-way matching, and other workflows companies never bothered to write down.

Origin

Built at Ramp as the company moved from using LLMs as a developer productivity tool to shipping them as the product itself.

Core principles

  • 01Your code is the LLM plus instructions plus an infinite loop
  • 02The agent should have more context than any human reviewer
  • 03Policy is a living text document, not deterministic code
  • 04Agents run 24/7; humans review in batches
  • 05Undocumented policies can be inferred from customer behavior

How to run it

  1. 1

    Find the workflow governed by a written policy

    Start where a document already exists to encode intent — travel and expense policies are near-universal. The document is the specification the agent will follow.

    Pro tip Pick a workflow where humans already do the judgment work manually; you inherit a benchmark for accuracy.

  2. 2

    Give the agent more context than a human reviewer

    Integrate calendar, email, the policy document, merchant data, and prior transactions so the agent knows more about the transaction than the finance person who would otherwise review it.

    Pro tip Context beats model choice — the reason human review is slow is missing context, not missing intelligence.

  3. 3

    Replace deterministic rules with a living text document

    Instead of hard-coding what is in policy, let the policy text itself guide an agent with access to tools. The document can evolve without a code deploy.

    Watch out Preserve auditability — decisions must be explainable back to a specific policy clause.

  4. 4

    Run it continuously

    Let the agent evaluate transactions as they come in, 24/7, rather than in a monthly review cycle. Enforcement becomes live rather than retrospective.

  5. 5

    Close the loop on the policy itself

    As it runs, have the agent flag ambiguous or hard-to-interpret clauses and advise on how to make the policy clearer, so the document gets better over time.

    Pro tip This is the compounding part — the agent improves the spec that governs the agent.

  6. 6

    Infer the undocumented policies next

    Most pre- and post-payment steps (fraud checks, matching an invoice to an order and a receipt, verifying negotiated price) are never written down. Infer them from how customers actually behave in the product, then build the next generation of agents on those inferred policies.

    Watch out Inferred policy must be validated with customers before it drives automated decisions.

In the wild

Ramp's expense policy agent

In the old workflow, an employee half-remembers the expense policy, makes a transaction, files a report, and a manager or finance person tries to determine whether it complied — usually without enough context, generating rounds of back-and-forth. Ramp's policy agent is integrated with the employee's calendar and email and holds the full policy, so it evaluates each transaction as it arrives and classifies it as in or out of policy, while also suggesting where the policy language is ambiguous.

→ Live 24/7 policy enforcement done more efficiently than any human reviewer, with a policy document that gets clearer over time.

Invoice handling as an unwritten policy

Karim points out that when a company receives an invoice it does several things nobody documented: confirm the invoice isn't fraudulent, confirm the product was actually ordered, confirm it was received, and confirm the price matches what was negotiated. Because Ramp's customers run their finances in the product, Ramp can infer those implicit policies from behavior and encode them as agents.

→ A pipeline of new agents built from policies that were never written down anywhere.

Common mistakes

Stopping at copilot-stage AI

Using LLMs only to write the same old code slightly faster is the early phase. The transformative shift is making the LLM part of the shipped product, not part of the authoring process.

Under-contexting the agent

An agent with less context than the human it replaces will produce the same back-and-forth it was supposed to eliminate. Integrations (calendar, email, policy) are the whole advantage.

Freezing the policy document

If the text never evolves based on what the agent learns, you have merely automated a bad spec instead of improving it.

Is it for you?

Best for

Software companies whose customers run repetitive, rule-governed review workflows with unstructured context.

Not ideal for

Money movement, risk, and other systems where non-deterministic behavior is unacceptable.

From the transcript

“Your code is the LLM now. Your code is the LLM plus instructions and an infinite loop.”

Karim Atiyeh

“Instead of having deterministic codes tell software what transactions are in policy or not, you essentially have this living, breathing text document that can evolve…”

Karim Atiyeh

“So you have a 24/7 live enforcement of your policy.”

Karim Atiyeh

From the episode

Karim Atiyeh - Building Ramp - [Invest Like the Best, EP.445]

Karim Atiyeh

→