[GH-ISSUE #3816] [langgraph]: [examples] Add self-correcting code agent with human-in-the-loop #2765

Open
opened 2026-06-05 17:26:40 -04:00 by yindo · 0 comments
Owner

Originally created by @ShubhamKosaiker on GitHub (Apr 30, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/3816

Type of issue

issue / bug

Language

Python

Description

Hi, I'd like to contribute a new example to the examples/ folder.

The example is a self-correcting code agent that takes a task, generates Python code, runs it in a sandbox, reads the error if it fails, and fixes it in a loop. It uses interrupt() for human approval before every execution.

I think this is useful because it shows cyclic graphs, HITL with interrupt/Command, and conditional routing together in one practical pattern. I have the code written with tests ready.

Happy to open a PR if this fits.

Originally created by @ShubhamKosaiker on GitHub (Apr 30, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/3816 ### Type of issue issue / bug ### Language Python ### Description Hi, I'd like to contribute a new example to the examples/ folder. The example is a self-correcting code agent that takes a task, generates Python code, runs it in a sandbox, reads the error if it fails, and fixes it in a loop. It uses interrupt() for human approval before every execution. I think this is useful because it shows cyclic graphs, HITL with interrupt/Command, and conditional routing together in one practical pattern. I have the code written with tests ready. Happy to open a PR if this fits.
yindo added the langgraphexternal labels 2026-06-05 17:26:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2765