Show HN: Agentic Design Patterns – Python Edition, from the Codex Codebase

Show HN (score: 5)
Found: October 07, 2025
ID: 1770

Description

Other
Show HN: Agentic Design Patterns – Python Edition, from the Codex Codebase While reading Agentic Design Patterns by Antonio Gulli, I wanted to see how these patterns look in real code. I cloned the OpenAI Codex repo (the open-source AI coding assistant that recently trended on HN) — but it was in Rust.

So, I used an Cursor to help me extract and translate 18+ agentic patterns from Codex’s codebase into Python. That small experiment turned into a full open-source guide: GitHub: Codex Agentic Patterns https://github.com/artvandelay/codex-agentic-patterns

Each pattern comes with:

A short explanation and code sample

A runnable exercise and agent snippet

A summary of how Codex used the pattern (e.g., prompt chaining, tool orchestration, reflection loops, sandbox escalation)

One full working Python agent that ties it all together

If you’ve read the agentic design patterns book or explored Codex, this is a bridge between theory and practice — focused on runnable, open examples instead of abstract diagrams.

It’s completely free and open-source. Would love feedback, ideas, or even new patterns from your own agent experiments.

More from Show

Show HN: Widen – Open-source Mac Postgres GUI with local or cloud text-to-SQL

Show HN: Widen – Open-source Mac Postgres GUI with local or cloud text-to-SQL Github: <a href="https:&#x2F;&#x2F;github.com&#x2F;betocmn&#x2F;widen" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;betocmn&#x2F;widen</a><p>I was paying for DataGrip for several years as my desktop database GUI but if I wanted text-to-SQL with LLMs I&#x27;d have to pay even more on top. So I decided to build my own and I&#x27;ve been using it for a few weeks now.<p>At any time I&#x27;m usually working with 3 to 6 databases, and having them set up in something like Conductor (for parallel agentic coding), but for Postgres databases, lets me quickly start a session, ask questions to my database in plain English, get a data export, move on and close the session. It&#x27;s been working well and I thought I would share it here.<p>It&#x27;s a native Mac app (Swift), free and open source (MIT). For the LLM you bring your own OpenRouter key, or there&#x27;s an experimental on-device mode using Apple&#x27;s local model, where nothing leaves your Mac. Cloud mode only sends the question and schema metadata, not your data, unless you explicitly turn that on per connection.

No other tools from this source yet.