# Legal matters can serve as environments for AI agents

Markdown copy of https://realalpha.app/s/legal-matters-can-serve-as-environments-for-ai-agents/ on Real Alpha, the best minutes from long interviews with the people building AI. Cite and link the page, not this copy.

- Speaker: [Gabe Pereyra](https://realalpha.app/builders/gabe-pereyra/) · Gabe Pereyra is co-founder and president of Harvey. · Co-founded and leads Harvey, the legal AI platform, after research roles at DeepMind and Meta.
- Host: [Sarah Guo](https://realalpha.app/people/sarah-guo/) · Founder, Conviction · Ex-Greylock partner; early investor in Cognition, Harvey and Mistral.
- Host: [Elad Gil](https://realalpha.app/people/elad-gil/) · CEO, Gil & Co · Investor in Airbnb, Stripe, Coinbase and Anthropic; co-founded Color.
- Show: No Priors
- Episode: [No Priors Ep. 142 | With Harvey Co-Founder and President Gabe Pereyra](https://realalpha.app/v/0YaJQZZACy8/), Dec 5, 2025
- Moment: 6:21 to 8:38 of the episode (2 min), playing on https://realalpha.app/s/legal-matters-can-serve-as-environments-for-ai-agents/; the episode from there: https://realalpha.app/v/0YaJQZZACy8/?t=381

## Quote

> “And in legal, that **RL environment is a client matter**.”
> — [Gabe Pereyra](https://realalpha.app/builders/gabe-pereyra/) at [8:02](https://realalpha.app/v/0YaJQZZACy8/?t=482) · No Priors

## Takeaways

1. Agents can break down associate-style research and drafting.
2. A client matter brings documents and tasks into one context.
3. Agents can search systems and incorporate partner feedback.

## About this segment

Harvey is starting to model legal matters as agent environments, where systems search files, research law and get feedback. A matter supplies connected context that a standalone task lacks.

From “No Priors Ep. 142 | With Harvey Co-Founder and President Gabe Pereyra”, Dec 5, 2025. [Watch the full episode](https://realalpha.app/v/0YaJQZZACy8/)

## Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

[6:25](https://realalpha.app/v/0YaJQZZACy8/?t=385) And it's very early on in terms of what agentic means, but basically being able to deconstruct a logic tree in terms of what are the set of actions that you need to take in a certain situation. And then having the AI agent go back and sort of check each one of those items, do it, go on to the next item, double check it against the prior one. Do you do that from a legal perspective or is that something that's a little bit more in the future relative to where code is today? Yeah, we're starting to do this now. And actually, when I was at DeepMind, a lot of the RL research I did was that. And so when we first got access to GPT-4, we had the very strong intuition of, okay, you're going to be able to string a bunch of these model calls or eventually do things like reasoning models where the full

[7:06](https://realalpha.app/v/0YaJQZZACy8/?t=426) agent is differentiable. And even the first day we got access to GPT-4, Winston went in his room for 14 hours and just redid a bunch of his associate tasks. And when I looked at the work he was doing, it was essentially like this hacky agentic where he said, okay, I would need to go look up this case law, summarize it, take that summary, use it to draft. And so seeing him do that gave us the. intuition very early on of that's the direction this is going. And you can kind of think of associates as agents. They get this task from a partner that's, hey, I have this high-level case strategy. I want to see if I can find a bunch of case law that supports it. Can you go research that? Look it up, cite it, write me a memo. And so a lot of the systems we're starting to build look a lot like that. And I think one interesting direction that the coding labs, the research labs

[7:57](https://realalpha.app/v/0YaJQZZACy8/?t=477) are going is building these RL environments where you deploy these agents and they can interact with a code base and see if they can pass unit tests. And in legal, that RL environment is a client matter. So you have all of the context of a fund formation, an acquisition, a litigation, and the models are starting to learn, let me go in the document management system and see if I can find this, go in the data room or do case law research, get feedback from your partner. And so So I think that research direction is super, super interesting.

[8:28](https://realalpha.app/v/0YaJQZZACy8/?t=508) It's really interesting to make the associated analogy because I remember when I led your guys' series B, which I think was maybe two years ago now, it was a while ago, I called
