Action-node integration
FreshCtx + LangGraph
Map langgraph_action_node() around the graph node that performs the external write, keeping dependency IDs in graph state.
What FreshCtx protects
FreshCtx protects the external evidence a LangGraph action node depends on. A blocking result propagates as FreshnessBlocked before the node body starts.
Where the pre-action boundary sits
The boundary sits immediately before the node that performs the external write. Keep observation or reasoning identifiers in graph state and resolve only the dependencies for that action.
Limitations
- LangGraph continues to own graph routing, checkpointing, interrupts, retries, and state reconciliation.
- FreshCtx validates declared external evidence only; it does not reconcile graph state.
- The mapping uses the experimental pre-action contract and is not part of the stable public API.
Installation
python -m pip install 'freshctx[langgraph]==0.9.0'Minimal example
from freshctx.integrations.langgraph import langgraph_action_node
protected_write = langgraph_action_node(
write_record,
depends_on=lambda state: [state["freshctx_decision"]],
store=store,
action_name="write_record",
execution_id=lambda state: state.get("run_id"),
)Continue
FreshCtx quickstartFreshCtx homepageExamples ↗AgnoOpenAI Agents SDKGoogle Agent Development KitMCP Guard
Third-party names and logos are trademarks of their respective owners. Their appearance identifies compatible integration surfaces and does not imply endorsement or partnership.