Entropy0 Trust Control Plane tool for LangChain agents — evaluate domains and URLs before your agent fetches content from them.
Project description
entropy0-langchain
Entropy0 Trust Control Plane tool for LangChain agents.
Evaluates any domain or URL through the Entropy0 /v1/decide endpoint before your agent fetches content from it. Returns a machine-readable recommended action the agent can reason about directly.
Install
pip install entropy0-langchain
Usage
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI
from entropy0_langchain import Entropy0Tool
llm = ChatOpenAI(model="gpt-4o")
tools = [
Entropy0Tool(api_key="sk_ent0_xxxx")
]
agent = initialize_agent(
tools,
llm,
agent=AgentType.OPENAI_FUNCTIONS,
verbose=True,
)
# The agent will call entropy0_trust_check before fetching any external URL
agent.invoke("Summarize the content at https://suspicious-domain.xyz/report")
The agent receives structured trust output:
Trust evaluation for suspicious-domain.xyz: recommended_action=sandbox
(confidence=81%), uncertainty=medium, signals=[NEWLY_REGISTERED_DOMAIN,
HOSTING_PATTERN_SUSPICIOUS, LOW_REPUTATION_EVIDENCE].
It can then decide to proceed, apply caution, or refuse — without you writing any decision logic.
Configuration
Entropy0Tool(
api_key="sk_ent0_xxxx", # required
policy="strict", # open | balanced | strict | critical
interaction_kind="fetch", # navigate | fetch | enrich | download_file | ...
interaction_mode="read_only", # read_only | transactional | privileged
interaction_sensitivity="high", # low | medium | high | critical
timeout=10.0, # seconds
)
How it works
Each call to entropy0_trust_check sends a POST /v1/decide request with the target and your interaction context. The Entropy0 engine runs a deterministic 7-step pipeline:
- Classifies the target into one of six states (Clear Threat → Safe Known)
- Looks up the base action from a policy routing table
- Shifts strictness based on interaction risk tier
- Applies confidence clamps (low-confidence negatives never hard-deny)
- Returns
recommended_action+ reason codes + uncertainty + bounded validity
The same inputs always produce the same output. No probabilistic scoring, no black-box models.
Requirements
- Python 3.9+
langchain-core >= 0.1.0httpx >= 0.24.0
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file entropy0_langchain-0.1.0.tar.gz.
File metadata
- Download URL: entropy0_langchain-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b5d6a8ed17d87a777238e4540e50af1b54d15baa3d43cea606c661e2f2ea01
|
|
| MD5 |
fdde2a6dfbee75c7bd1cb4ed678424a8
|
|
| BLAKE2b-256 |
08b03c343b113cd75cf44f3eba4c3644a62ac5d866732d06191eacc2a145994c
|
File details
Details for the file entropy0_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: entropy0_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3861a104e5a8fd883d3d337e8d6f3e8cc5ec2b70eef27d117e4c2dbebcc37dc6
|
|
| MD5 |
3495e6917a7e6bd731c379ea2db28250
|
|
| BLAKE2b-256 |
d851ef42f1ab7cb26305e7468ee8087fc3b5e2684b7d8324df4830fdaa668dc0
|