Skip to content

coderifts/example-langgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

CodeRifts — LangGraph Integration Example

Demonstrates how to add a CodeRifts guard node to a LangGraph agent that aborts execution when the API is unsafe.

Quick Start

pip install requests
python main.py

Architecture

[START] → [coderifts_guard] → (should_continue?) → [execute_tool] → [END]
                                      ↓ BLOCK
                                    [END]

The coderifts_guard node calls the public preflight endpoint. The should_continue conditional edge routes to END if the decision is BLOCK, preventing the agent from calling an unsafe API.

Key Pattern

def should_continue(state):
    if state["coderifts_decision"] == "BLOCK":
        return "END"  # Abort the graph
    return "execute"  # Continue to tool execution

Links

About

CodeRifts integration example — example-langgraph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages