You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the first framework adapter: guardloop.adapters.langgraph.guarded_graph
returns a GuardLoop-compatible agent you pass to GuardLoop.run(...). LangGraph
nodes call LangChain chat models, which do not flow through the ctx.openai /
ctx.anthropic wrappers, so the adapter binds a synchronous LangChain
BaseCallbackHandler (raise_error=True, run_inline=True) to the RunContext: it
runs the pre-flight budget check before each LLM call, records actual usage
afterward, and routes tool calls through the per-tool circuit breaker and the
tool-call budget. Cost / token / time caps, breakers, and llm_call / tool_call
OpenTelemetry spans all apply inside a LangGraph run; the verifier retry loop
wraps the whole graph run, with feedback injected into a copy of the input state.
- new guardloop.adapters subpackage; guardloop.adapters.langgraph exports
guarded_graph and GuardLoopCallbackHandler (not re-exported from the top-level
package, so `import guardloop` stays dependency-light)
- guarded_graph(..., reserved_output_tokens=N) sets the pre-flight output-token
reservation, since LangChain chat models often omit max_tokens
- public RunContext.circuit_breakers accessor (used by the adapter)
- new `langgraph` optional extra; langgraph + langchain-core in the dev group
- tests/test_langgraph_adapter.py (16 tests) + tests/langchain_fakes.py
- examples/langgraph_guarded.py (no-key demo)
- .github/workflows/ci.yml: pytest + ruff + pyright on push/PR, Python 3.11-3.13
- bump to 0.4.0; CHANGELOG, README, and docs/{roadmap,design,project-overview,
pypi-publishing}.md updated
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments