Skip to content

Run the agent loop as a LangGraph graph - #9

Merged
sbkashif merged 8 commits into
mainfrom
langgraph-agent
Nov 12, 2026
Merged

sbkashif merged 8 commits into
mainfrom
langgraph-agent

Conversation

@sbkashif

Copy link
Copy Markdown
Owner
  • agent/graph.py runs the MLIP training agent's loop as a LangGraph graph, with resume after a crash and an approval pause; agent/test_graph.py covers it with a scripted LLM and fake tools (6 tests pass locally in the mlip-agent env).
  • New website page "The loop as a graph" (website/agent/05_the_graph.md), marked Draft; page 4's Next points to it.
  • CHANGELOG and agent/README.md updated; a preview config for the web-edits worktree in .claude/launch.json.

🤖 Generated with Claude Code

sbkashif and others added 8 commits November 12, 2026 01:07
… approval

agent/graph.py runs harness.py's loop as a LangGraph graph, using
LangChain's ChatOllama and tool binding. Goal, tools, limit checks and log
format are harness.py's; harness.py is unchanged.

- The run is saved after every node to a SQLite file, so --resume carries
  on a stopped run. A cut-off training reruns and counts once, after its
  leftover MACE checkpoints are deleted.
- Earlier reasoning is left out of the history sent to the LLM, as in
  harness.py (ChatOllama would send it back).
- --approve pauses before each training; a refusal goes back to the LLM.

agent/test_graph.py covers each path with a scripted LLM and fake tools.
environment.yml pins the LangChain/LangGraph packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Page 5 of the agent module walks through agent/graph.py: the graph, the
state, resume after a crash, the approval pause, and how the graph run
compares with the harness run. Page 4's Next now points to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The opening now argues that a run without errors is not necessarily
correct, and that realistic systems need more than default options. The
detail on the engine, the topics in this release and the choice of C++
moves below the learning-approach cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "simple loop" links to the loop figure on the homepage.
- The Simulator panel section explains the table as averages over many
  configurations.
- "Behind the buttons" drops the unit-conversion details.
- History and the AI usage statement are rewritten.
- Long C++ names in the Programming column wrap inside their box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 MolSimWorkbench | 🛠️ Build #35841450 | 📁 Comparing 6f350ca against latest (151a81b)

  🔍 Preview build  

2 files changed
+ agent/05_the_graph.html
± agent/04_the_code.html

@sbkashif
sbkashif merged commit f48e09b into main Nov 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant