Skip to main content

Trust-check node for LangGraph agents. Verify AI agent safety before execution.

Project description

nerq-langgraph

Trust-check node for LangGraph agents. Verify AI agent safety before execution with the Nerq Trust Index.

Install

pip install nerq-langgraph

Quick Start — 3 Lines

from nerq_langgraph import trust_check_node
from langgraph.graph import StateGraph

graph = StateGraph(dict)
graph.add_node("trust_check", trust_check_node(min_trust=70))
# trust_check returns state with trust_score, trust_grade, trust_approved

Full Example

from nerq_langgraph import trust_check_node
from langgraph.graph import StateGraph, END

def agent_action(state):
    if not state.get("trust_approved", False):
        return {**state, "result": "Blocked: agent failed trust check"}
    return {**state, "result": f"Executed with trust score {state['trust_score']}"}

graph = StateGraph(dict)
graph.add_node("trust_check", trust_check_node(min_trust=70))
graph.add_node("action", agent_action)
graph.set_entry_point("trust_check")
graph.add_edge("trust_check", "action")
graph.add_edge("action", END)

app = graph.compile()
result = app.invoke({"agent_name": "langchain"})
print(result["trust_approved"])  # True/False
print(result["trust_score"])     # 88.5

Configuration

Parameter Default Description
min_trust 60 Minimum trust score to approve
api_base https://nerq.ai Nerq API endpoint
cache_ttl 300 Cache TTL in seconds

State Keys

The node reads agent_name or target from state and adds:

  • trust_score — numeric score (0-100)
  • trust_grade — letter grade (A+, A, B+, etc.)
  • trust_approved — boolean

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nerq_langgraph-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nerq_langgraph-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file nerq_langgraph-0.1.0.tar.gz.

File metadata

  • Download URL: nerq_langgraph-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nerq_langgraph-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9c9d4fc2d1a8f3cbbceba08a8513bf7e6d90b886333b350454d2cebe5af11f60
MD5 566e2eaf29a8ef4517a6a45b766ef489
BLAKE2b-256 3d9962209784e355bf8560474f3b65f8f2ec18262ceefe0b79cfbf23300f58ee

See more details on using hashes here.

File details

Details for the file nerq_langgraph-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nerq_langgraph-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nerq_langgraph-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd299bbfe6dd51c24b5264c853961f2680368e7be00a3ebdb9bc9cad02427aa
MD5 4201ebad4cbdc0bfd3ecfcae2790bd74
BLAKE2b-256 568cd68acc561e43faf98701ac66c5cedfd992f5b30546fca66cb0d636a09e7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page