Skip to content
This repository was archived by the owner on Sep 21, 2026. It is now read-only.
coderiftsPublic archive

About

CodeRifts integration example for LangChain LangGraph

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

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 for LangChain LangGraph

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages