Current collected state Current
Observed since 21 Oct, 08:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agent-web-search-engine
AI Agent web search & intelligent filtering engine — bundled with SearXNG-core
Python 核心引擎,提供搜索编排、网页爬取、内容提取和向量检索能力。
SearXNG-core 已打包在 wheel 中,安装后引擎自动管理 SearXNG 子进程,无需额外部署。
# 克隆仓库(含 searxng-core submodule)
git clone --recurse-submodules <repo-url>
cd AgentWebSearchingTool/engine
# 打包 searxng-core 到包中(仅开发模式需要)
python scripts/prepare_build.py
# 创建虚拟环境并安装
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev,retrieval]"
# 运行测试
pytest
# 启动服务(SearXNG 会自动在后台启动)
uvicorn src.router:app --reload --port 8000
pip 安装用户:
pip install agent-web-search-engine后,SearXNG 已内置在包中,引擎会自动启动它。
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /health | 健康检查(含 SearXNG 状态) |
| POST | /search | 执行搜索(自动使用内置 SearXNG) |
| POST | /fetch | 抓取单页 + 内容提取 |
| POST | /scrape | 批量抓取多页 |
| POST | /filter | 向量检索筛选 |
src/
├── router.py # FastAPI 路由编排(含 SearXNG 生命周期管理)
├── searxng_runner.py # SearXNG 子进程管理器(启动/停止/健康检查)
├── config.py # YAML 配置加载
├── search/ # SearchProvider 接口 + SearXNG 适配器
├── fetch/ # HTTP + Playwright 混合爬取
├── extract/ # trafilatura 内容提取
└── retrieval/ # Embedding + Cross-encoder 两阶段检索
编辑 config.yaml 或通过环境变量覆盖:
# SearXNG 配置(内置,通常无需修改)
SEARXNG_PORT=8888
SEARXNG_BIND_ADDRESS=127.0.0.1
SEARXNG_SECRET=my-secret-key # 建议设置
# Engine 配置
SEARXNG_URL=http://127.0.0.1:8888
ENGINE_PORT=8000
DASHSCOPE_API_KEY=sk-xxx # DashScope Embedding
| 用途 | 安装方式 |
|---|---|
| 核心(含 SearXNG-core) | pip install agent-web-search-engine |
| 开发 + 测试 | pip install -e ".[dev]" |
| 检索 | pip install -e ".[retrieval]" (dashscope, openai, torch, transformers) |
| 浏览器爬取 | pip install -e ".[playwright]" + playwright install chromium |
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
fastapiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | fastapi>=0.100 | runtime |
uvicornEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | uvicorn>=0.23 | runtime |
httpxEnvironment{
"extras": "http2",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | httpx[http2]>=0.25 | runtime |
httpx-socksEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | httpx-socks>=0.10 | runtime |
trafilaturaEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | trafilatura>=1.6 | runtime |
lxmlEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | lxml>=5.0 | runtime |
lxml_html_cleanEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | lxml_html_clean>=0.1 | runtime |
pyyamlEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | pyyaml>=6.0 | runtime |
numpyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | numpy>=1.24 | runtime |
flaskEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | flask>=3.0 | runtime |
python-dateutilEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | python-dateutil>=2.9 | runtime |
certifiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | certifi>=2024.0 | runtime |
markdown-it-pyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | markdown-it-py>=4.0 | runtime |
msgspecEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | msgspec>=0.21 | runtime |
isodateEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | isodate>=0.7 | runtime |
typerEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | typer>=0.26 | runtime |
typing-extensionsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | typing-extensions>=4.16 | runtime |
async-timeoutEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | async-timeout>=4.0.3 | runtime |
valkeyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | valkey>=6.1 | runtime |
sniffioEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | sniffio>=1.3 | runtime |
Flask-BabelEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | Flask-Babel>=4.0 | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | pytest>=7.0; extra == "dev" | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio>=0.21; extra == "dev" | runtime |
pytest-covEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | pytest-cov>=4.0; extra == "dev" | runtime |
ruffEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | ruff>=0.1; extra == "dev" | runtime |
httpx-socksEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | httpx-socks>=0.10; extra == "dev" | runtime |
playwrightEnvironment{
"extras": "",
"marker": "extra == \"playwright\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | playwright>=1.40; extra == "playwright" | runtime |
dashscopeEnvironment{
"extras": "",
"marker": "extra == \"retrieval\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | dashscope>=1.14; extra == "retrieval" | runtime |
openaiEnvironment{
"extras": "",
"marker": "extra == \"retrieval\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | openai>=1.0; extra == "retrieval" | runtime |
sentence-transformersEnvironment{
"extras": "",
"marker": "extra == \"retrieval\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | sentence-transformers>=2.2; extra == "retrieval" | runtime |
transformersEnvironment{
"extras": "",
"marker": "extra == \"retrieval\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | transformers>=4.36; extra == "retrieval" | runtime |
torchEnvironment{
"extras": "",
"marker": "extra == \"retrieval\"",
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | torch>=2.0; extra == "retrieval" | runtime |
bdist_wheel · 3,665.21 KB · Python py3
sdist · 3,437.77 KB · Python source
Observed since 21 Oct, 08:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:d7df5f5fcb4fe5b112aa8f4fcf6253dbd3bc248e258fa1f13cef7f75b55788ab