Skip to main content

nerq-langchain

Trust-gate your LangChain agents with Nerq. Preflight trust checks before every tool call.

Install

pip install nerq-langchain

Quick Start — trust_gate (3 lines)

from nerq_langchain import trust_gate

agent = initialize_agent(tools, llm)
agent = trust_gate(agent, min_trust=60)
# Every tool call now gets a preflight trust check

Before each tool call, trust_gate checks the tool's trust score via nerq.ai/v1/preflight:

  • PROCEED (trust >= 70): runs silently
  • CAUTION (trust 40-69): logs warning, proceeds
  • DENY (trust < 40): raises TrustError
  • UNKNOWN (not in index): proceeds with warning
  • Network failure: proceeds with warning (never blocks)

NerqPreflight — Check trust on any agent

from nerq_langchain import NerqPreflight

tool = NerqPreflight()
print(tool.run("SWE-agent"))
# Nerq Preflight: SWE-agent
# Recommendation: PROCEED
# Trust Score: 92.5/100
# Grade: A+
# Verified: Yes

NerqSearch — Find agents for a task

from nerq_langchain import NerqSearch

tool = NerqSearch()
print(tool.run("code review"))
# Nerq Search: 'code review' — 5 results
# 1. SWE-agent/SWE-agent — Trust: 92.5, Category: security
# ...

In a LangChain agent

from langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
from nerq_langchain import NerqPreflight, NerqSearch, trust_gate

llm = ChatOpenAI(model="gpt-4")
tools = [NerqPreflight(), NerqSearch()]
agent = initialize_agent(tools, llm, agent=AgentType.OPENAI_FUNCTIONS)
agent = trust_gate(agent, min_trust=60)

result = agent.run("Is SWE-agent safe to use for code review?")

With LangGraph

from nerq_langchain import NerqPreflight, NerqSearch
from langgraph.prebuilt import create_react_agent

tools = [NerqPreflight(), NerqSearch()]
agent = create_react_agent(model, tools)

Error handling

from nerq_langchain import trust_gate, TrustError

agent = trust_gate(agent, min_trust=70)

try:
    result = agent.run("Use low-trust-tool to analyze data")
except TrustError as e:
    print(f"Blocked: {e.tool_name} (trust={e.trust_score})")

API

  • Endpoint: GET https://nerq.ai/v1/preflight?target={name}
  • Auth: None required
  • Rate limit: Generous (no hard cap during beta)
  • Coverage: 204K+ agents and tools
  • Latency: <50ms typical

Links

Metadata

Release files for nerq-langchain 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nerq-langchain 0.2.0
File Size Uploaded Provenance
nerq_langchain-0.2.0.tar.gz 5.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nerq-langchain 0.2.0
File Interpreter ABI Platform
nerq_langchain-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / nerq_langchain-0.2.0.tar.gz

Download URL nerq_langchain-0.2.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8dc17909f80a5aa9c7faa2ffa9c7d1b0dd4ab07606934177a91f17ca9d8a4b52
BLAKE2b-256 checksum
How to use checksums
301719bda2d6b1f40df6cbc4ca29a7749cafa7a6ebdd30c95bd19189c19f3ed3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / nerq_langchain-0.2.0-py3-none-any.whl

Download URL nerq_langchain-0.2.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
380e3ee0ee58b6416713860206518617f6432e6035e4d80d9e9f08c199e55012
BLAKE2b-256 checksum
How to use checksums
f58aab0a147e40b572148344b322488a44d05f9bca5d0261e87e2c93b7863824
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for nerq-langchain 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page