Crawl4AI 技术指南:从 LLM 友好的 Markdown 爬取到 Docker 部署与智能抓取进阶
Crawl4AI 是一个开源的、面向 LLM 与 AI Agent 的 Python 网页爬虫与数据抓取框架,核心能力是把网页快速转换成干净的 Markdown,并支持无 LLM 的 CSS/XPath 结构化抽取、LLM 驱动抽取、深度爬取、自适应爬取与 Docker 服务化部署。本文以仓库根目录的 README-first.md 为主线,结合 crawl4ai/ 包的实际源码,完整覆盖安装、最小可运行示例、Markdown 生成与内容过滤、结构化抽取、浏览器控制、0.7.0 智能特性(Adaptive / Virtual Scroll / Link Preview / URL Seeder)、Docker 部署与版本策略,读完后可直接复制示例运行,并理解每个配置项在源码中的落点。
项目定位:为什么专为 LLM 而设计
README 将 Crawl4AI 定位为"LLM Friendly Web Crawler & Scraper",官方给出的六个设计出发点(见 README-first.md 的 "Why Crawl4AI" 一节):
- 为 LLM 构建:生成简洁、结构良好的 Markdown,适配 RAG 与微调场景;
- 快速:实时、低成本的抓取性能;
- 灵活的浏览器控制:会话管理、代理、自定义 Hooks;
- 启发式智能:用算法而非昂贵的模型完成大部分抽取;
- 开源可部署:无需 API Key,开箱即用 Docker 与云集成;
- 社区驱动:由活跃社区维护。
从源码结构看,这些能力对应清晰的模块划分:crawl4ai/async_webcrawler.py 是异步爬取主入口,crawl4ai/async_configs.py 集中定义 BrowserConfig、CrawlerRunConfig、LLMConfig、ProxyConfig、GeolocationConfig、SeedingConfig、VirtualScrollConfig、LinkPreviewConfig 等配置类,crawl4ai/markdown_generation_strategy.py、crawl4ai/extraction_strategy.py、crawl4ai/content_filter_strategy.py 分别承载 Markdown 生成、结构化抽取与内容过滤三类可插拔策略。所有对外 API 统一由 crawl4ai/init.py 导出,from crawl4ai import * 即可拿到 AsyncWebCrawler、BrowserConfig、CrawlerRunConfig、LLMExtractionStrategy、JsonCssExtractionStrategy、AdaptiveCrawler、AsyncUrlSeeder 等符号(见该文件 __all__ 列表)。
README 同时列出了六大特性域,可据此建立整体认知:
| 特性域 | 能力要点 | 对应源码/资源 |
|---|---|---|
| Markdown 生成 | Clean/Fit Markdown、引用与参考文献、BM25 过滤、自定义策略 | markdown_generation_strategy.py、content_filter_strategy.py |
| 结构化抽取 | LLM 驱动(任意 LiteLLM 兼容供应商)、分块策略、余弦相似度、CSS/XPath、Schema 定义 | extraction_strategy.py |
| 浏览器集成 | 自有浏览器托管、CDP 远程连接、浏览器 Profiler、会话、代理、多浏览器、动态视口 | browser_manager.py、browser_adapter.py、browser_profiler.py |
| 爬取与抓取 | 媒体抽取(srcset/picture)、动态 JS 等待、截图、raw:/file:// 输入、链接/iframe 抽取、Hooks、缓存、懒加载、整页滚动 |
async_crawler_strategy.py |
| 部署 | Docker + FastAPI 镜像、JWT 认证、API 网关、可扩展架构 | Dockerfile、deploy/docker/ |
| 附加 | 隐身模式、标签抽取、链接分析、错误处理、CORS 与静态服务 | antibot_detector.py、link_preview.py |
安装:pip、预发布版本与开发模式
README 提供的安装路径共有三种,命令均可直接复制执行。
1. 基本安装(pip)
# 安装主包
pip install -U crawl4ai
# 预发布版本
pip install crawl4ai --pre
# 运行安装后设置(自动安装 Playwright 与浏览器依赖)
crawl4ai-setup
# 验证安装
crawl4ai-doctor
默认安装的是异步版本,底层依赖 Playwright。README 提醒:若 crawl4ai-setup 未能自动完成 Playwright 安装,出现浏览器相关报错时可手动执行:
python -m playwright install --with-deps chromium
README 还给出了更简化的两步式写法:pip install crawl4ai + crawl4ai-setup;若 playwright install 无效,python -m playwright install chromium 在部分环境下更可靠。
2. 同步版本(已废弃)
pip install crawl4ai[sync]
README 明确说明同步版(基于 Selenium)已废弃并将在未来版本移除;从 crawl4ai/init.py 也能印证——WebCrawler 的相关导入整段被注释掉,当前主路径是 AsyncWebCrawler。
3. 开发安装(可编辑模式 + 可选依赖组)
git clone https://gitcode.com/GitHub_Trending/craw/crawl4ai.git
cd crawl4ai
pip install -e . # 基础可编辑安装
README 列出的可选特性组:
pip install -e ".[torch]" # PyTorch 能力
pip install -e ".[transformer]" # Transformer 能力
pip install -e ".[cosine]" # 余弦相似度能力
pip install -e ".[sync]" # 同步爬取(Selenium)
pip install -e ".[all]" # 全部可选特性
快速上手:Python API 与 CLI 两种入口
Python 最小示例
README 给出的最小示例只依赖 AsyncWebCrawler 与 arun():
import asyncio
from crawl4ai import *
async def main():
async with AsyncWebCrawler() as crawler:
result = await crawler.arun(
url="https://www.nbcnews.com/business",
)
print(result.markdown)
if __name__ == "__main__":
asyncio.run(main())
结合 crawl4ai/async_webcrawler.py 的 arun() 签名与文档字符串,有三个源码级细节值得注意:
arun()推荐通过CrawlerRunConfig传参;旧的散参写法(如screenshot=True直接传给arun)仍被兼容,但官方文档字符串已标注 "Old way (deprecated)";- 当
config.cache_mode未显式指定时,运行时默认落到CacheMode.ENABLED(见 async_webcrawler.py),需要绕过缓存时必须显式传CacheMode.BYPASS; arun()返回CrawlResultContainer,它把属性访问代理到底层CrawlResult,因此result.markdown、result.html、result.extracted_content等写法均可用。
命令行接口(crwl)
README 给出了三种典型 CLI 用法:
# 基础爬取,输出 Markdown
crwl https://www.nbcnews.com/business -o markdown
# 深度爬取:BFS 策略,最多 10 页
crwl https://docs.crawl4ai.com --deep-crawl bfs --max-pages 10
# 带自然语言问题的 LLM 抽取
crwl https://www.example.com/products -q "Extract all product prices"
CLI 入口实现位于 crawl4ai/cli.py,其中 crawl 子命令(crawl_cmd,约 L1013 起)负责解析 URL 与各类 YAML 配置(浏览器、爬虫、过滤),与 docs/examples/cli/ 目录下的 browser.yml、crawler.yml、extract.yml 等配置文件配合使用。
启发式 Markdown 生成:Clean / Fit 双通道与内容过滤
这是 README "Heuristic Markdown Generation" 示例的核心。示例完整代码如下:
import asyncio
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode
from crawl4ai.content_filter_strategy import PruningContentFilter, BM25ContentFilter
from crawl4ai.markdown_generation_strategy import DefaultMarkdownGenerator
async def main():
browser_config = BrowserConfig(
headless=True,
verbose=True,
)
run_config = CrawlerRunConfig(
cache_mode=CacheMode.ENABLED,
markdown_generator=DefaultMarkdownGenerator(
content_filter=PruningContentFilter(threshold=0.48, threshold_type="fixed", min_word_threshold=0)
),
# markdown_generator=DefaultMarkdownGenerator(
# content_filter=BM25ContentFilter(user_query="WHEN_WE_FOCUS_BASED_ON_A_USER_QUERY", bm25_threshold=1.0)
# ),
)
async with AsyncWebCrawler(config=browser_config) as crawler:
result = await crawler.arun(
url="https://docs.micronaut.io/4.7.6/guide/",
config=run_config
)
print(len(result.markdown.raw_markdown))
print(len(result.markdown.fit_markdown))
if __name__ == "__main__":
asyncio.run(main())
从 crawl4ai/markdown_generation_strategy.py 的 DefaultMarkdownGenerator.generate_markdown()(约 L148 起)看,其内部流水线是固定的四步:
- 用内置
CustomHTML2Text(默认关闭自动换行body_width=0、保留代码块标记等)从选定的输入 HTML 生成raw_markdown; - 通过预编译正则
LINK_PATTERN调用convert_links_to_citations(),把正文中的text改写为text⟨n⟩形式,并生成## References编号引用列表(相对链接会用fast_urljoin()结合base_url解析为绝对 URL); - 若提供了
content_filter,则对 HTML 先过滤再转换为fit_markdown,实现"去噪后的 AI 友好版本"; - 返回
MarkdownGenerationResult,包含raw_markdown、markdown_with_citations、references_markdown、fit_markdown、fit_html五个字段——这正是示例中同时打印raw_markdown与fit_markdown长度的原因。
两个内容过滤器均可从 crawl4ai.content_filter_strategy 导入(PruningContentFilter、BM25ContentFilter,另导出 LLMContentFilter、RelevantContentFilter,见 crawl4ai/init.py):
PruningContentFilter(threshold=0.48, threshold_type="fixed", min_word_threshold=0):基于标签文本量统计的启发式剪枝,阈值控制保留强度;BM25ContentFilter(user_query=..., bm25_threshold=1.0):以用户查询为锚,用 BM25 打分只保留高相关段落,适合"聚焦某个问题"的场景。
全局默认行为参数(分块 token 阈值 2048、重叠率 0.1、图片评分阈值 IMAGE_SCORE_THRESHOLD=2、页面超时 60000ms 等)集中在 crawl4ai/config.py 中定义,理解这些常量有助于解释默认 Markdown 质量与图片保留策略。
结构化数据抽取:无 LLM 的 CSS 方案与 LLM 方案
无 LLM:执行 JS + JsonCssExtractionStrategy
README 的第二个高级示例展示"先执行 JS 打开 Tab,再按 Schema 抽取 JSON"的两段式技巧,关键片段:
from crawl4ai import JsonCssExtractionStrategy
schema = {
"name": "KidoCode Courses",
"baseSelector": "section.charge-methodology .w-tab-content > div",
"fields": [
{"name": "section_title", "selector": "h3.heading-50", "type": "text"},
{"name": "section_description", "selector": ".charge-content", "type": "text"},
{"name": "course_name", "selector": ".text-block-93", "type": "text"},
{"name": "course_description", "selector": ".course-content-text", "type": "text"},
{"name": "course_icon", "selector": ".image-92", "type": "attribute", "attribute": "src"},
]
}
extraction_strategy = JsonCssExtractionStrategy(schema, verbose=True)
run_config = CrawlerRunConfig(
extraction_strategy=extraction_strategy,
js_code=[(async () => { /* 依次 scrollIntoView + click 每个 tab,间隔 500ms */ })()],
cache_mode=CacheMode.BYPASS
)
async with AsyncWebCrawler(config=browser_config) as crawler:
result = await crawler.arun(url="https://www.kidocode.com/degrees/technology", config=run_config)
companies = json.loads(result.extracted_content)
该模式的要点:baseSelector 锁定重复卡片容器,fields 中每项指定 selector、type(text 取文本 / attribute 取属性并指定 attribute 名),js_code 列表用于在页面加载后模拟交互(本例逐个点击 Tab 让隐藏内容渲染出来),最后 result.extracted_content 直接是 JSON 字符串。JsonCssExtractionStrategy 定义于 crawl4ai/extraction_strategy.py;同一文件中还导出 JsonXPathExtractionStrategy、JsonLxmlExtractionStrategy、RegexExtractionStrategy、CosineStrategy 等替代实现,可按站点技术栈选择。
有 LLM:LLMExtractionStrategy + Pydantic Schema
README 的第三个高级示例以 OpenAI 定价页为对象,抽取"模型名 + 输入/输出费用":
import os, asyncio
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode, LLMConfig
from crawl4ai import LLMExtractionStrategy
from pydantic import BaseModel, Field
class OpenAIModelFee(BaseModel):
model_name: str = Field(..., description="Name of the OpenAI model.")
input_fee: str = Field(..., description="Fee for input token for the OpenAI model.")
output_fee: str = Field(..., description="Fee for output token for the OpenAI model.")
async def main():
browser_config = BrowserConfig(verbose=True)
run_config = CrawlerRunConfig(
word_count_threshold=1,
extraction_strategy=LLMExtractionStrategy(
# 任意 LiteLLM 支持的供应商均可,例如本地模型:
# provider="ollama/qwen2", api_token="no-token",
llm_config=LLMConfig(provider="openai/gpt-4o", api_token=os.getenv('OPENAI_API_KEY')),
schema=OpenAIModelFee.schema(),
extraction_type="schema",
instruction="""From the crawled content, extract all mentioned model names along with
their fees for input and output tokens. Do not miss any models..."""
),
cache_mode=CacheMode.BYPASS,
)
async with AsyncWebCrawler(config=browser_config) as crawler:
result = await crawler.arun(url='https://openai.com/api/pricing/', config=run_config)
print(result.extracted_content)
要点解析:
LLMConfig(provider, api_token)的 provider 采用 LiteLLM 的供应商/模型命名;从 crawl4ai/config.py 看,内置映射覆盖ollama、groq、openai、anthropic、gemini、deepseek、bedrock等前缀,token 默认从对应环境变量(如OPENAI_API_KEY、ANTHROPIC_API_KEY)读取;schema传 Pydantic 模型的.schema(),extraction_type="schema"表示按结构约束输出;instruction提供自然语言任务描述;word_count_threshold=1用于放宽正文最短字数限制,保证小页面也能进入 LLM 抽取;- 仓库中还有 docs/examples/llm_extraction_openai_pricing.py 与 docs/examples/extraction_strategies_examples.py 可作为该方案的更完整参照。
浏览器控制:持久化 Profile 与自有浏览器
README 的 "Using Your own Browser with Custom User Profile" 示例演示用持久化用户目录绕过登录态/挑战类站点:
import os, asyncio
from pathlib import Path
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode
async def test_news_crawl():
user_data_dir = os.path.join(Path.home(), ".crawl4ai", "browser_profile")
os.makedirs(user_data_dir, exist_ok=True)
browser_config = BrowserConfig(
verbose=True,
headless=True,
user_data_dir=user_data_dir,
use_persistent_context=True,
)
run_config = CrawlerRunConfig(cache_mode=CacheMode.BYPASS)
async with AsyncWebCrawler(config=browser_config) as crawler:
url = "ADDRESS_OF_A_CHALLENGING_WEBSITE"
result = await crawler.arun(url, config=run_config, magic=True)
print(f"Successfully crawled {url}")
print(f"Content length: {len(result.markdown)}")
从源码结构看,这条能力链由三个模块协作:crawl4ai/browser_manager.py 负责浏览器实例与上下文生命周期(含持久化上下文),crawl4ai/browser_profiler.py 提供 BrowserProfiler 用于创建与管理可复用 Profile(保存认证状态、cookies、设置),crawl4ai/browser_adapter.py 提供 PlaywrightAdapter / UndetectedAdapter 等浏览器适配器,支撑隐身模式与反检测场景。代理方面,ProxyConfig 与 RoundRobinProxyStrategy / ProxyRotationStrategy(见 crawl4ai/proxy_strategy.py)覆盖认证代理与轮换。
0.7.0 智能特性:Adaptive 爬取、虚拟滚动、链接评分与 URL 种子
README 的 "Recent Updates" 一节把 0.7.0(The Adaptive Intelligence Update)的四个核心新特性整理为可直接使用的代码骨架。以下逐一给出官方示例,并对照源码参数说明。
1. AdaptiveCrawler:自动学习站点模式的自适应爬取
config = AdaptiveConfig(
confidence_threshold=0.7, # 停止爬取所需的最小置信度
max_depth=5, # 最大爬取深度
max_pages=20, # 最大爬取页面数
strategy="statistical"
)
async with AsyncWebCrawler() as crawler:
adaptive_crawler = AdaptiveCrawler(crawler, config)
state = await adaptive_crawler.digest(
start_url="https://news.example.com",
query="latest news content"
)
# 爬取器随时间学习模式并改进抽取
AdaptiveCrawler 与 AdaptiveConfig 由 crawl4ai/adaptive_crawler.py 实现并经 crawl4ai/init.py 导出(同文件还导出 CrawlState、CrawlStrategy、StatisticalStrategy),配套示例在 docs/examples/adaptive_crawling/(含 basic_usage.py、advanced_configuration.py、embedding_strategy.py 等)。
2. VirtualScrollConfig:无限滚动页面的完整内容捕获
scroll_config = VirtualScrollConfig(
container_selector="[data-testid='feed']",
scroll_count=20,
scroll_by="container_height",
wait_after_scroll=1.0
)
result = await crawler.arun(url, config=CrawlerRunConfig(
virtual_scroll_config=scroll_config
))
对照 crawl4ai/async_configs.py 的定义,参数含义与默认值为:
| 参数 | 默认值 | 说明 |
|---|---|---|
container_selector |
必填 | 可滚动容器的 CSS 选择器 |
scroll_count |
10 |
最大滚动次数 |
scroll_by |
"container_height" |
取 "container_height"、"page_height" 或固定像素 int |
wait_after_scroll |
0.5 |
每次滚动后等待秒数 |
该配置面向 Twitter、Instagram 类"DOM 节点随滚动被回收"的虚拟化列表;仓库中 docs/examples/virtual_scroll_example.py 与 docs/examples/assets/virtual_scroll_*.html 提供了可本地运行的样例页面,tests/test_virtual_scroll.py 覆盖对应行为。
3. LinkPreviewConfig:三层评分的智能链接分析
link_config = LinkPreviewConfig(
query="machine learning tutorials",
score_threshold=0.3,
concurrent_requests=10
)
result = await crawler.arun(url, config=CrawlerRunConfig(
link_preview_config=link_config,
score_links=True
))
# 链接按相关性与质量排序
注意 README 示例中的 concurrent_requests 与当前源码签名略有差异:crawl4ai/async_configs.py 中 LinkPreviewConfig 的实参是 concurrency(默认 10),并内置校验(concurrency/timeout/max_links 必须为正、score_threshold 必须在 0.0–1.0、include_internal 与 include_external 至少一个为真)。完整参数还包括 include_patterns / exclude_patterns(glob 过滤)、timeout(单链接 head 抽取超时,默认 5s)、max_links(默认 100,防止过载)。评分逻辑位于 crawl4ai/link_preview.py(LinkPreview 类),示例见 docs/examples/link_head_extraction_example.py,测试见 tests/test_link_extractor.py。
4. AsyncUrlSeeder:秒级发现海量 URL
seeder = AsyncUrlSeeder(SeedingConfig(
source="sitemap+cc",
pattern="*/blog/*",
query="python tutorials",
score_threshold=0.4
))
urls = await seeder.discover("https://example.com")
AsyncUrlSeeder / SeedingConfig 分别位于 crawl4ai/async_url_seeder.py 与 crawl4ai/async_configs.py,source 支持 sitemap、Common Crawl 等来源组合,pattern 做 glob 过滤,query + score_threshold 做相关性打分。教程与演示在 docs/examples/url_seeder/(url_seeder_demo.py、tutorial_url_seeder.md 等)。
此外 README 将"性能提升"(优化的资源处理与内存效率)一并列入 0.7.0 亮点;0.7.0 的完整说明可查阅仓库内的 docs/blog/release-v0.7.0.md 与 CHANGELOG.md。
Docker 部署:镜像、Playground 与 API 快速测试
README 的 Docker 小节说明新版 Docker 实现包含:浏览器池化与页面预热、交互式 Playground、MCP 集成(可直接连接 Claude Code 等 AI 工具)、覆盖 HTML 抽取/截图/PDF 生成/JS 执行的完整 API 端点、AMD64/ARM64 多架构自动检测与资源优化。快速启动:
# 拉取并运行
docker pull unclecode/crawl4ai:0.7.0
docker run -d -p 11235:11235 --name crawl4ai --shm-size=1g unclecode/crawl4ai:0.7.0
# Playground 地址:http://localhost:11235/playground
仓库侧可对应到 Dockerfile 与 deploy/docker/ 目录(api.py、server.py、auth.py 提供 FastAPI + JWT 认证,static/playground/index.html 与 static/monitor/index.html 即 Playground 与监控面板,mcp_bridge.py 对应 MCP 集成)。
提交一个爬取任务的快速测试脚本(README 原文,兼容上述 Docker 方案):
import requests
# 提交爬取任务
response = requests.post(
"http://localhost:11235/crawl",
json={"urls": ["https://example.com"], "priority": 10}
)
if response.status_code == 200:
print("Crawl job submitted successfully.")
if "results" in response.json():
results = response.json()["results"]
print("Crawl job completed. Results:")
for result in results:
print(result)
else:
task_id = response.json()["task_id"]
print(f"Crawl job submitted. Task ID:: {task_id}")
result = requests.get(f"http://localhost:11235/task/{task_id}")
即"同步短任务直接返回 results,异步任务返回 task_id 后轮询 /task/{task_id}"两种返回形态。更多客户端用法可参考 docs/examples/docker_example.py、docs/examples/docker/docker_python_sdk.py 与 docs/examples/docker/demo_docker_api.py,服务侧测试在 deploy/docker/tests/ 与 tests/docker/。
版本策略:PEP 440 与预发布后缀
README 专门解释了 Crawl4AI 的版本编号约定(遵循 PEP 440):
- 版本号格式为
MAJOR.MINOR.PATCH(如 0.4.3); - 预发布后缀:
dev(开发版,不稳定,如0.4.3dev1)、a(Alpha,实验特性)、b(Beta,功能完整待测试)、rc(Release Candidate,潜在最终版); - 稳定版:
pip install -U crawl4ai;预发布版:pip install crawl4ai --pre;固定版本:pip install crawl4ai==0.4.3b1。
README 建议生产环境使用稳定版,特性预研再启用 --pre。对照仓库实际状态:crawl4ai/version.py 中当前开发版本为 0.9.0,并预留了 __nightly_version__ 用于夜间构建;README 正文聚焦于 0.7.0 的功能亮点,因此引用其中 API 时应以当前仓库源码签名(如 LinkPreviewConfig 的 concurrency)为准。
许可、署名与引用
项目采用 Apache License 2.0(见 LICENSE)。README 建议使用者保留署名,可选两种方式:
- 徽章署名(推荐):使用仓库 docs/assets/ 下提供的四种主题 SVG 徽章,例如 powered-by-disco.svg、powered-by-night.svg、powered-by-dark.svg、powered-by-light.svg,附在 README/文档/网站上,或退而使用 shields.io 的 "Powered by Crawl4AI" 徽章;
- 文字署名:在文档中加入一行 "This project uses Crawl4AI (...) for web data extraction."。
用于研究引用时,README 给出的 BibTeX 模板:
@software{crawl4ai2024,
author = {UncleCode},
title = {Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper},
year = {2024},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/unclecode/crawl4ai}},
commit = {Please use the commit hash you're working with}
}
路线图与延伸阅读
README 列出的开发 TODO(Graph Crawler 已勾选完成,其余 11 项涵盖问题驱动爬取、知识最优化爬取、Agentic 爬虫、自动 Schema 生成、领域专用 Scraper、Web Embedding 索引、交互式 Playground、性能监控、云集成等)指向 ROADMAP.md;数据民主化与数据资产化的使命陈述见 MISSION.md。继续深入的仓库路径:
- 更多示例:docs/examples/(深度爬取、代理轮换、隐身模式、截图与 PDF、网络/控制台捕获等);
- 0.7.0–0.9.0 发布说明:docs/blog/release-v0.7.0.md、docs/blog/release-v0.9.0.md 等;
- 核心文档:docs/md_v2/core/(安装、快速上手、深度爬取、会话管理、代理安全、虚拟滚动等);
- 测试基线:tests/ 下按主题分组的回归与功能测试(如 tests/test_virtual_scroll.py、tests/deep_crawling/、tests/proxy/),可用于验证各特性行为。
按 README 的主线串起来,Crawl4AI 的典型使用路径是:crawl4ai-setup 完成浏览器准备 → AsyncWebCrawler.arun() 以 CrawlerRunConfig 组合"Markdown 生成器 + 内容过滤器 + 抽取策略 + 滚动/链接配置" → 用 CSS Schema 或 LLM Schema 产出结构化 JSON → 需要规模与服务化时切到 Docker 镜像并通过 REST/MCP 调用。所有示例代码均可从本文直接复制运行,参数语义则以 crawl4ai/async_configs.py 与上文引用的源码文件为准。
atomcodeClaude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get StartedRust0623
Hy4-previewHy4 preview 是由腾讯混元团队研发的新一代混合专家(MoE)旗舰模型。模型总参数量 770B,每个 token 激活 49B,主干共包含78层,第一层采用标准 FFN,其余 77 层均为 MoE 结构,每层包含 256 个路由专家与 1 个共享专家,每个 token 激活 top-8 路由专家及共享专家。主干之外原生内置 1 层 MTP(总参数量 10B,激活 0.7B)以支持投机解码。Python00
GLM-5.3GLM-5.3 与 GLM-5.2 使用相同的基座模型——所有提升均来自后训练。与 GLM-5.2 相比,它在复杂编程和长程任务上的表现显著提升。Jinja00
GLM-5.3-FlashGLM-5.3-Flash (320B-A18B),是GLM-5系列的首个原生多模态模型。320B总参数,能力超过GLM-5.2Jinja00
Spark-X2.5-4BSpark-X2.5-4B 旨在让强大的 AI 更实用、更高效、更易获得。在广泛日常任务中表现强劲,涵盖对话、写作、翻译、推理、编码、工具调用以及智能体工作流,并在同等规模的开源模型中取得领先成绩。Spark-X2.5 将面向效率的架构与最高 1M tokens 的原生上下文窗口相结合,并支持 200 多种语言。Python00
Spark-X2.5-1.7BSpark-X2.5-1.7B 旨在让强大的 AI 更加实用、高效且易于获取。这些模型在广泛的日常任务中表现出色,涵盖对话、写作、翻译、推理、编程、工具调用和智能体工作流,并在同等规模的开源模型中取得领先结果。Spark-X2.5 将面向效率的架构与最高 1M tokens 的原生上下文窗口相结合,并支持 200 多种语言。Python00