AI Skill Hub 推荐使用:开源AI工作流:AI Search Agents at Scale 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
开源AI工作流:AI Search Agents at Scale 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
开源AI工作流:AI Search Agents at Scale 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 克隆仓库 git clone https://github.com/cjerzak/asa-software cd asa-software # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 asa-software --help # 基本运行 asa-software [options] <input> # 详细使用说明请查阅文档 # https://github.com/cjerzak/asa-software
# asa-software 配置说明 # 查看配置选项 asa-software --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export ASA_SOFTWARE_CONFIG="/path/to/config.yml"
AI Search Agent for Large-Scale Research Automation
An R package for running LLM-powered research tasks at scale. Unlike search-enabled APIs that charge ~$10 per 1,000 searches with limited control, asa provides full customizability over search behavior, LLM backends, and temporal filtering at minimal cost. Uses a ReAct (Reasoning + Acting) agent pattern with web search capabilities, implemented via LangGraph in Python and orchestrated from R.
The package includes multiple layers of anti-detection for high-volume workloads (1000+ queries/day):
Proactive Tor Circuit Rotation: - Automatically rotates Tor exit node every 15 requests (not just on errors) - Gets fresh IP before detection thresholds are reached
Adaptive Rate Limiting: - Dynamically adjusts delays based on success/error patterns - On CAPTCHA/block: delays increase by 50% (caps at 5x) - After 10 consecutive successes: delays decrease by 10% (floor at 0.5x)
Session Reset: - Every 50 requests, resets session identity - Shuffles user-agent pool and clears timing state - Each batch appears as a different user
Humanized Timing: - Log-normal delay distribution (most quick, occasional long pauses) - Micro-stutters and fatigue curves simulate human behavior - 5% chance of "thinking pauses" (0.5-2s hesitation)
All features are enabled by default. For very high-volume work, consider: ```r
pydantic.v1 warnings in LangChain)Optional: - Claude Code CLI (for asa_audit() with backend = "claude_code") - processx (recommended for robust CLI invocations; base system2() fallback is used if unavailable) - Tor + stealth Chrome support (requires system Tor plus Python packages undetected-chromedriver and stem, installed by asa::build_backend())
```r
devtools::install_github("cjerzak/asa-software/asa")
devtools::install("path/to/asa") ```
asa::build_backend()
asa::build_backend(conda_env = "asa_env", python_version = "3.12", force = TRUE) ```
```r
agent <- asa::initialize_agent(
backend = "openai",
model = "gpt-4.1-mini",
proxy = NA, # NA=auto from env; NULL=disable; set socks5h://127.0.0.1:9050 for Tor
timeout = 120, # Request timeout in seconds
rate_limit = 0.1 # Requests per second (conservative default)
)
| Parameter | Default | Description |
|---|---|---|
proxy | NA | Proxy URL for search tools (NA = auto from env; NULL = disable) |
timeout | 120 | Request timeout in seconds |
rate_limit | 0.1 | Max requests per second (conservative default for heavy workloads) |
verbose | TRUE | Print initialization status messages |
search | NULL | search_options() object for search configuration |
use_memory_folding | TRUE | Enable memory compression |
memory_threshold | 10 | Message count before triggering fold |
memory_keep_recent | 4 | Recent exchanges to keep after fold |
fold_char_budget | 30000 | Character budget triggering fold |
use_observational_memory | FALSE | Enable observational memory subsystem |
tor | tor_options() | Tor routing configuration |
recursion_limit | NULL | Max LangGraph steps (NULL = framework default) |
The package provides typed configuration classes for organized settings management:
```r
temporal <- asa::temporal_options( time_filter = "y", # DuckDuckGo time filter after = "2023-01-01", # ISO 8601 date before = "2024-12-01" )
search <- asa::search_options( max_retries = 5, inter_search_delay = 1.0 )
config <- asa::asa_config( backend = "openai", model = "gpt-4.1-mini", workers = 4, temporal = temporal, search = search )
When enabled, the agent can open full webpages (not just search snippets) and extract the most relevant excerpts. This is disabled by default and must be explicitly turned on per call or via search_options(). Relevance selection uses embeddings when available (local sentence-transformers or OpenAI embeddings via OPENAI_API_KEY), otherwise falls back to lexical overlap. Within a single run, repeated opens of the same URL are cached to avoid re-fetching.
```r
search <- asa::search_options( allow_read_webpages = TRUE, webpage_relevance_mode = "embeddings", webpage_embedding_provider = "openai", webpage_embedding_model = "text-embedding-3-small", # Optional: allow larger excerpts (defaults are conservative) webpage_max_chars = 30000, webpage_max_chunks = 10, webpage_chunk_chars = 2000 )
result <- asa::run_task( "Find the exact wording of the mission statement and quote it.", config = asa::asa_config(search = search) )
**In the agent trace:** Each opened page appears as an `OpenWebpage` tool message in `result$trace_json` (preferred) or `result$raw_output`. The tool output is plain text like:
text URL: https://example.com/page Final URL: https://example.com/page Title: Example Bytes read: 12345 Cache: MISS
Relevant excerpts:
[1] ... ```
Memory folding compresses older conversation messages into summaries, enabling longer research sessions without exceeding context limits. This follows the DeepAgent paper methodology.
```r
agent <- asa::initialize_agent( backend = "openai", model = "gpt-4.1-mini", use_memory_folding = TRUE, # Enable memory compression (default) memory_threshold = 6, # Fold after 6 messages (default: 10) memory_keep_recent = 3 # Keep 3 recent exchanges after fold (default: 4) )
Fine-tune search behavior globally:
```r
asa::configure_search( max_results = 15, # Results per search (default: 10) timeout = 20, # Request timeout in seconds (default: 30) max_retries = 5, # Retry attempts (default: 3) retry_delay = 3, # Seconds between retries (default: 2) backoff_multiplier = 2.0, # Exponential backoff factor (default: 1.5) inter_search_delay = 3.0 # Delay between searches in seconds (default: 1.5) )
asa::configure_tor_registry(registry_path = tor_cfg$registry_path) ```
asa::configure_search(inter_search_delay = 4.0) agent <- asa::initialize_agent(rate_limit = 0.05) ```
export ASA_TOR_CONTROL_COOKIE="/path/to/control_auth_cookie"
R -q -e 'devtools::test("asa", filter = "tor-proxy-integration")' ```
If ASA_RUN_TOR_TESTS=true and Tor is not reachable, these tests fail fast by design.
Cost considerations: - Web search (DuckDuckGo, Wikipedia): Free - LLM costs vary by backend: OpenAI ~$0.01-0.10/task, Groq ~$0.001/task
Tor integration tests are opt-in outside CI and verify: - egress is routed through Tor (IsTor=true), - Tor SOCKS/control ports are reachable, - control-port rotation sanity (NEWNYM path) works.
```bash export ASA_RUN_TOR_TESTS=true export ASA_TOR_TEST_PROXY="socks5h://127.0.0.1:9050" export ASA_TOR_TEST_CONTROL_PORT="9051"
asa::configure_search_logging("DEBUG") # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL ```
| Parameter | Default | Description |
|---|---|---|
inter_search_delay | 1.5 | Seconds between consecutive searches (humanized with jitter) |
max_results | 10 | Maximum results per search |
timeout | 30 | HTTP request timeout in seconds |
max_retries | 3 | Retry attempts on failure |
retry_delay | 2 | Initial delay between retries |
backoff_multiplier | 1.5 | Exponential backoff factor |
Rate limited or CAPTCHA blocks? - The package now has adaptive rate limiting (enabled by default) that automatically slows down on errors - For persistent issues, increase delays: configure_search(inter_search_delay = 4.0) - Enable debug logging to see what's happening: configure_search_logging("DEBUG") - Use Tor proxy for IP rotation: rotate_tor_circuit() - Using Tor + stealth Chrome? Rebuild the backend so undetected-chromedriver and stem are installed (asa::build_backend(force = TRUE)), and set TOR_CONTROL_PORT per worker (env is read at call time).
API key not recognized? ```r
asa 是一个专为大规模研究自动化设计的 AI Search Agent R 语言包。它利用 LLM(大语言模型)驱动的研究任务,旨在解决传统搜索 API 成本高昂(如每 1,000 次搜索约 10 美元)且控制力不足的问题。通过 asa,开发者可以实现高效率、可扩展的自动化信息检索与研究流程。
该项目具备强大的反检测(Anti-Detection)功能,专为每日 1,000 次以上的高频查询任务���计。核心特性包括:主动的 Tor 线路轮换机制,每 15 次请求自动更换 Tor 出口节点以规避检测;以及自适应速率限制(Adaptive Rate Limiting),能够根据成功率或错误模式动态调整请求延迟,在遇到 CAPTCHA 或封禁时自动增加等待时间。
运行本项目需要满足以下环境要求:R 语言版本需 $\ge$ 4.0;Python 版本需为 3.12 或 3.13(建议通过 conda 管理,以避免 LangChain 在 3.14 版本中出现的 pydantic.v1 警告);同时需安装 reticulate、jsonlite 和 rlang 等 R 包。此外,若需使用 `asa_audit()` 的 Claude Code 后端,建议安装 Claude Code CLI。
您可以通过以下两种方式进行安装:1. 直接从 GitHub 安装:使用 `devtools::install_github("cjerzak/asa-software/asa")` 命令;2. 本地安装:如果您已下载源码,可以使用 `devtools::install("path/to/asa")` 进行部署。请确保您的开发环境已配置好必要的 R 和 Python 依赖。
快速上手非常简单。您可以通过调用 `asa::initialize_agent()` 函数来初始化 Agent。在初始化时,您可以指定后端模型(如 `backend = "openai"`)、模型名称(如 `model = "gpt-4.1-mini"`)以及代理设置。请注意,若需通过 Tor 进行请求,请将 `proxy` 参数设置为对应的 SOCKS5 地址。
项目提供了类型化的配置类(Configuration Classes)以实现结构化的设置管理。开发者可以通过 `initialize_agent` 函数精细控制 `timeout`(请求超时时间)和 `rate_limit`(每秒请求数)等关键参数。对于高级用户,可以通过配置环境变量或特定的配置对象来管理复杂的 Agent 行为。
本章节提供了详细的 API 参考文档。通过查看参数说明表,您可以了解 `inter_search_delay`(搜索间隔延迟,包含随机抖动以模拟人类行为)和 `max_results`(单次搜索最大结果数)等参数的具体含义与默认值,从而实现对搜索行为的精准控制。
本项目包含完善的 Tor 集成测试工作流。在 CI 环境之外,用户可以手动开启 Tor 集成测试(通过设置 `export ASA_RUN_TOR_TESTS=true`),以验证流量是否正确通过 Tor 出口、SOCKS/control 端口是否可达,以及 `NEWNYM` 路径下的控制端口轮换机制是否工作正常,确保大规模爬取任务的稳定性。
针对常见问题,如遇到速率限制(Rate limited)或 CAPTCHA 封禁,系统默认已启用自适应速率限制功能。如果问题持续存在,建议通过 `configure_search(inter_search_delay = 4.0)` 手动增加延迟。此外,您可以使用 `asa::configure_search_logging("DEBUG")` 开启调试日志,以便实时监控运行状态并排查故障。
开源AI工作流:AI Search Agents at Scale是一个值得关注的项目,提供了一个开源的AI工作流解决方案,帮助用户快速开发和部署AI工作流,提高工作效率和准确率。虽然项目质量较高,但仍然需要进一步完善和测试。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,开源AI工作流:AI Search Agents at Scale 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | asa-software |
| 原始描述 | 开源AI工作流:AI Search Agents at Scale。⭐6 · R |
| Topics | workflowr |
| GitHub | https://github.com/cjerzak/asa-software |
| License | MIT |
| 语言 | R |
收录时间:2026-05-19 · 更新时间:2026-05-20 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端