~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
"""Egress policy subsystem.
A self-contained guardrail that constrains where a research run's traffic,
LLM calls, embeddings, and URL fetches may go. See ``README.md`` in this
package for the full design, threat model, and the list of enforcement
points (PEPs) scattered across the codebase.
This ``__init__`` re-exports the public API so callers can simply do
``from local_deep_research.security.egress import evaluate_url, EgressScope``.
The implementation lives in:
- ``policy.py`` — the PDP (decisions) + context construction
- ``audit_hook.py`` — the process-wide PEP-578 socket.connect net
"""
from .policy import (
Decision,
EngineClassification,
EgressContext,
EgressScope,
MAX_DENIED_FETCHES_PER_RUN,
PolicyDeniedError,
context_from_snapshot,
build_run_egress_context,
classify_engine,
evaluate_embeddings,
evaluate_engine,
evaluate_llm_endpoint,
evaluate_retriever,
evaluate_url,
filter_candidates_by_egress,
filter_engines_by_egress,
)
from .audit_hook import (
active_egress_context,
clear_active_context,
get_active_context,
install_audit_hook,
is_installed,
set_active_context,
)
__all__ = [
# policy / PDP
"Decision",
"EngineClassification",
"EgressContext",
"EgressScope",
"MAX_DENIED_FETCHES_PER_RUN",
"PolicyDeniedError",
"context_from_snapshot",
"build_run_egress_context",
"classify_engine",
"evaluate_embeddings",
"evaluate_engine",
"evaluate_llm_endpoint",
"evaluate_retriever",
"evaluate_url",
"filter_candidates_by_egress",
"filter_engines_by_egress",
# audit hook / process-wide PEP
"active_egress_context",
"clear_active_context",
"get_active_context",
"install_audit_hook",
"is_installed",
"set_active_context",
]