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
Release files for entropy0-langchain 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| entropy0_langchain-0.1.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| entropy0_langchain-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / entropy0_langchain-0.1.0.tar.gz
| Download URL | entropy0_langchain-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19b5d6a8ed17d87a777238e4540e50af1b54d15baa3d43cea606c661e2f2ea01
|
|
BLAKE2b-256 checksum How to use checksums |
08b03c343b113cd75cf44f3eba4c3644a62ac5d866732d06191eacc2a145994c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / entropy0_langchain-0.1.0-py3-none-any.whl
| Download URL | entropy0_langchain-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3861a104e5a8fd883d3d337e8d6f3e8cc5ec2b70eef27d117e4c2dbebcc37dc6
|
|
BLAKE2b-256 checksum How to use checksums |
d851ef42f1ab7cb26305e7468ee8087fc3b5e2684b7d8324df4830fdaa668dc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|