/AI23h ago

Developers Urged To Guide AI Agents With Reasoning Frameworks Over Rules

252031422550.7K
Original postOmar Khattab#158
Ryan Lopopolo@_lopopolo

Using agents effectively requires embracing their stochastic nature and setting up a framework for them to reason rather than giving them a pile of rules.

Harness engineering and knowledge base curation does not (and cannot!) rely on all information being pulled into context—and given things like autocompaction over long horizon work, context is constantly getting blitted so you can't really rely on things being in context either.

In general you want to tell agents your expectations on how/when/what type of context they should seek and how the tools in their environment can help them complete their work.

You need to tell the agents what they are working on, what parts of it matter, and how they should approach tasks. Tell them about common tasks for the things you’re working on and where they can learn more about them. Make your agents collapse a prompt they are given into a paved workflow.

10:31 AM · Jun 5, 2026 · 50.7K Views
Sentiment

Many users praised guiding AI agents via reasoning frameworks and workflows over rigid rules because they handle messy tasks more reliably while retaining control, while one user objected that it disrupts simpler generic prompting.

Pos
85.7%
Neg
14.3%
7 comments with sentiment.
Cluster Engagement
Posts from X
Most Activity
Most Activity
VIEWS832
Vadim Comanescu@vadimcomanescu

Noooo you just destroyed my dream of being generic on prompts and context just telling codex to do it relying heavily on the auto compaction that just works. I mean a a few weeks ago was just go long let auto compaction do its job, let codex do its magic ... what am i missing here?

20hViews 832
BOOKMARKS2RETWEETS1
Werner Kasselman@wernerk_au

Build agents that only manage context. I call it the librarian, one of my councils. Those agents are each responsible for a subject area. They have layers.

However they essentially act as the fetchers of meaningful accurate context to provide the worker agents with the context they need, either proactively or on demand.

Don’t expect the worker to know/ discover everything themselves.

Do t expect the worker to know exactly where to find what information when they’re effectively a new start…

15hViews 80Likes 1Bookmarks 2
LIKES4
Ryan Lopopolo@_lopopolo

@canmachinethink You can’t rely on deterministic context stuffing over very long work with many autocompactions

22hViews 244Likes 4
REPLIES1

@_lopopolo Can't we put stuff we need to be in context into the system prompt? Or is that unreliable as well after compaction? If yes there should be a post compaction hook where you can reprovide the important context.

12hViews 63
Leo Tavares@LeoTava8

@_lopopolo The "paved workflow" framing nails it. Rigid rule lists rot the second autocompaction blows context away anyway. What's worked for me: strong defaults + clear escape hatches, then let the agent reason about when to deviate. Curate the path, don't script every step.

16hViews 108Likes 3Bookmarks 1
Ryan Lopopolo@_lopopolo

@JohnThilen Seems good for human legibility, not sure what else it gives the agents

23hViews 277Likes 3
Andros@0xAndros

@_lopopolo I think @garrytan’s latent vs deterministic framework is really good for this!

14hViews 54Bookmarks 1
Ryan Lopopolo@_lopopolo

@vadimcomanescu All of these things are the same lol

20hViews 591Likes 1
John Thilén@JohnThilen

@_lopopolo So what's your take on extensive obsidian/notion/etc backed knowledge bases for agents? Sounds like they are at least over-engineered.

23hViews 364
Antikytherian@canmachinethink

@_lopopolo that why we have the agents.md right? Also is context window length really a problem we will still have in the future?

23hViews 326
Galego Gaucho@galego_gaucho

are there any downsides to storing this all in the repo vs. trying to create a mechanism that pulls in reasoning docs JIT? I'm curious if I'm wrongly thinking it would give the agent less noise to sift through or get confused by? I'm picturing "tell the agent to seek within the repo" vs. "point the agent to a very specific thing outside the repo" with the thought process it then will not grep/read anything unrelated into the context window

22hViews 133
Ryan Lopopolo@_lopopolo

@mitschabaude You don’t need to deterministically context stuff. Let the model decide

12hViews 39Likes 1
Rohan@proxy_vector

@_lopopolo Agreed. Rules collapse once the task graph gets messy. What holds up better is a harness that narrows action space, exposes context on demand, and makes recovery cheap.

22hViews 87
Vadim Comanescu@vadimcomanescu

@_lopopolo "For things to remain the same, everything must change." Tomasi di Lampedusa 😎

18hViews 71

@_lopopolo This feels like the part everyone skips over. My guess is the winners won’t be the ones with the smartest agents, but the ones with the best systems around them.

17hViews 69
Jordan Hamel@jordanjhamel

@_lopopolo It’s pretty interesting when you consider specifically what must be trad functions vs reasoning when to call said function and reason on the output. Theres a lot things people do in traditional software to get to a great outcome that can help with agent design when mapped out

12hViews 20Likes 1

@_lopopolo /goal and workflows end up pretty great.

15hViews 32
Norin@norlava

I really feel like this is the next shift. Workflows let you benefit from the stochasticism of the agents while still retaining control via a deterministic process. It makes such a difference in terms of reliability, output quality, and confidence. Things still go wrong and drift which is why I've found it incredibly important to also be able to steer mid run and interrupt agents inside of workflows as well to be able to course correct when things go wrong.

13hViews 21
Zak El Fassi@zakelfassi

@_lopopolo @JohnThilen gives them negtok/s

22hViews 20