1. 总体结论
GitHub 上 AI Agent 项目的编程语言分布大致呈现:
| 语言 | 估计占比 | 主要使用场景 |
|---|---|---|
| Python | 60% - 75% | 通用 Agent、Multi-Agent、RAG Agent、科研实验、LLM 编排、数据分析、Coding Agent |
| TypeScript / JavaScript | 15% - 30% | Web Agent、前端/全栈 Agent、浏览器 Agent、聊天机器人、Agent UI、Node.js Agent 框架 |
| Jupyter Notebook | 3% - 8% | 原型实验、论文复现、教程、评测 |
| Go | 1% - 4% | 高性能服务端 Agent、DevOps Agent、云原生工具 |
| Java | 1% - 4% | 企业级 Agent、后端系统、Spring AI 生态 |
| C# / .NET | 1% - 3% | 企业应用、Microsoft 生态、Semantic Kernel 相关项目 |
| Rust | < 2% | 高性能 Agent Runtime、CLI Agent、边缘端工具 |
| C++ | < 2% | 机器人、具身智能、仿真、推理引擎集成 |
总体来看:
Python 是 AI Agent 开发的绝对主力语言;TypeScript/JavaScript 是 Web 化、浏览器化、产品化 Agent 的主要语言;Java、C#、Go 更多出现在企业级、后端服务和工程化场景。
2. 按 AI Agent 类型划分的语言统计
2.1 通用自主 Agent / Autonomous Agent
代表方向:
- AutoGPT 类
- BabyAGI 类
- AgentGPT 类
- Jarvis / JARVIS-like Agent
- 通用任务规划、工具调用、记忆系统、自主执行
典型项目:
- AutoGPT
- BabyAGI
- SuperAGI
- OpenAGI
- AgentGPT
- MetaGPT 部分能力
- CrewAI 部分能力
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 70% - 80% |
| TypeScript / JavaScript | 10% - 20% |
| Jupyter Notebook | 3% - 5% |
| Go / Java / C# / Rust | 5% 左右 |
特点:
- 早期 AI Agent 项目大量基于 LangChain、OpenAI SDK、向量数据库、Python 工具链构建。
- Python 生态更适合快速集成 LLM、RAG、工具调用、爬虫、自动化、数据处理。
- TypeScript 项目多用于 Web UI、Agent 可视化和在线执行平台。
总结:
通用自主 Agent 基本是 Python 主导,TS/JS 主要负责前端和 Web 产品化。
2.2 Multi-Agent / 多智能体协作框架
代表方向:
- 多角色协作
- Agent 团队
- 任务分解
- Workflow + Agent
- 软件公司模拟
- 群体决策
- Multi-Agent Simulation
典型项目:
- AutoGen
- CrewAI
- MetaGPT
- ChatDev
- CAMEL
- AgentVerse
- LangGraph
- OpenBMB AgentVerse
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 75% - 85% |
| TypeScript / JavaScript | 5% - 10% |
| Jupyter Notebook | 5% - 8% |
| Java / Go / C# | 3% - 5% |
| Rust / C++ | 较少 |
特点:
- 多智能体系统需要 LLM 调用、Prompt 管理、状态机、消息传递、工具调用、记忆系统。
- Python 在这些能力上的生态最成熟。
- 很多 Multi-Agent 框架来自研究机构、论文项目,因此 Python 和 Notebook 占比较高。
总结:
多智能体框架是 Python 最集中的领域之一,科研属性明显。
2.3 Coding Agent / 软件开发 Agent
代表方向:
- 自动写代码
- 自动修 Bug
- 代码审查
- SWE Bench Agent
- DevOps Agent
- AI IDE Agent
- CLI Coding Assistant
典型项目:
- OpenHands / OpenDevin
- SWE-agent
- Aider
- GPT Engineer
- Smol Developer
- Continue
- Tabby
- Devin-like 开源实现
- Cursor/IDE 插件生态相关项目
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 40% - 55% |
| TypeScript / JavaScript | 25% - 40% |
| Go | 3% - 8% |
| Rust | 2% - 6% |
| Shell | 3% - 6% |
| Java / C# | 较少,但在 IDE 插件中存在 |
特点:
- Python 常用于 Agent 核心逻辑、代码分析、任务规划、LLM 调用。
- TypeScript 常用于 VS Code 插件、Web IDE、前端交互。
- Rust/Go 出现在 CLI 工具、代码索引、执行沙箱、高性能服务中。
- Shell/Dockerfile 比例也较高,因为 Coding Agent 经常需要运行、测试、构建项目。
总结:
Coding Agent 是 Python 与 TypeScript/JavaScript 双核心生态,Python 负责智能体逻辑,TS/JS 负责 IDE、前端和插件。
2.4 Browser Agent / Web Agent / GUI Agent
代表方向:
- 自动浏览网页
- 表单填写
- 网页任务执行
- RPA + LLM
- Playwright/Selenium Agent
- Computer Use Agent
- UI 操作 Agent
典型项目:
- Browser-use
- WebVoyager
- Agent-E
- OpenAI Computer Use 相关开源实现
- Playwright Agent
- Selenium Agent
- WebArena 相关项目
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 40% - 55% |
| TypeScript / JavaScript | 35% - 50% |
| Go | 2% - 5% |
| Java | 2% - 4% |
| C# | 少量 |
| Rust | 少量 |
特点:
- 浏览器自动化生态中,Playwright 和 Puppeteer 的 TypeScript/JavaScript 基础很强。
- Python 也通过 Playwright Python、Selenium、browser-use 等项目占据重要位置。
- GUI Agent 越靠近桌面自动化、截图分析、OCR,Python 占比越高。
- 越靠近浏览器插件、网页应用、前端交互,TypeScript 占比越高。
总结:
Browser Agent 是 Python 和 TypeScript/JavaScript 最接近五五开的 Agent 类型。
2.5 RAG Agent / Knowledge Agent / 企业知识库 Agent
代表方向:
- 文档问答
- 企业知识库
- 检索增强生成
- 工具调用 + RAG
- 数据库 Agent
- Search Agent
典型项目:
- LangChain 生态项目
- LlamaIndex 生态项目
- Dify
- FastGPT
- AnythingLLM
- RAGFlow
- Flowise
- Haystack
- DB-GPT
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 55% - 70% |
| TypeScript / JavaScript | 20% - 35% |
| Java | 3% - 8% |
| Go | 2% - 5% |
| C# | 1% - 3% |
| SQL | 辅助角色 |
| Jupyter Notebook | 3% - 5% |
特点:
- Python 用于 RAG Pipeline、Embedding、向量数据库、文档解析、LLM 调用。
- TypeScript/JavaScript 用于 SaaS 化、可视化编排、Web 后台。
- Java 在企业知识库、Spring AI、传统后端集成中有一定占比。
- Go 常用于高并发 API 服务、网关和中间件。
总结:
RAG Agent 是 Python 主导,但 TS/JS 和 Java 在产品化、企业化场景中增长明显。
2.6 Workflow Agent / Agent 编排平台
代表方向:
- 可视化工作流
- Agent Orchestration
- Low-code / No-code Agent
- Prompt Flow
- Tool Flow
- 企业自动化
典型项目:
- Dify
- Flowise
- LangFlow
- n8n AI Agent 生态
- AutoGen Studio
- PromptFlow
- LobeChat Agent 能力
- Coze 类开源替代项目
语言分布估计:
| 语言 | 占比 |
|---|---|
| TypeScript / JavaScript | 35% - 50% |
| Python | 35% - 50% |
| Go | 3% - 8% |
| Java | 2% - 5% |
| C# | 少量 |
| Rust | 少量 |
特点:
- 这类项目往往是完整产品,需要前端、后端、数据库、工作流引擎。
- TypeScript/JavaScript 比例较高,因为低代码编排平台通常有复杂 UI。
- Python 常用于 LLM 调用、Agent 执行器、插件系统、文档处理。
- Go 适合做工作流引擎、任务调度、后端服务。
总结:
Workflow Agent 平台是 TypeScript/JavaScript 占比最高的 AI Agent 类型之一。
2.7 Chatbot Agent / 对话式 Agent
代表方向:
- 客服 Agent
- Telegram/Discord/Slack Bot
- 企业微信/飞书 Agent
- 个人助理
- 多工具聊天助手
典型项目:
- ChatGPT-Next-Web 类项目
- LobeChat
- Chatbot UI
- Botpress 相关项目
- Rasa + LLM Agent
- LangChain Chatbot
- Telegram GPT Bot
- Discord GPT Bot
语言分布估计:
| 语言 | 占比 |
|---|---|
| TypeScript / JavaScript | 35% - 50% |
| Python | 30% - 45% |
| Java | 5% - 10% |
| C# | 2% - 5% |
| Go | 2% - 5% |
| PHP / Ruby | 少量 |
特点:
- 前端聊天界面、Bot 平台 SDK、Node.js 服务推动 TS/JS 占比较高。
- Python 仍常用于 LLM Agent 核心逻辑和后端。
- Java/C# 在企业 IM、客服系统、内部平台中有一定存在。
总结:
对话式 Agent 更偏产品应用,因此 TypeScript/JavaScript 占比通常高于纯研究型 Agent。
2.8 Data Agent / 数据分析 Agent
代表方向:
- 自然语言查数
- Text-to-SQL Agent
- Pandas Agent
- BI Agent
- 数据分析助手
- 数据科学 Agent
典型项目:
- PandasAI
- DB-GPT
- SQLChat
- Vanna
- Dataherald
- LangChain SQL Agent 示例
- LlamaIndex SQL Agent 示例
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 70% - 85% |
| TypeScript / JavaScript | 8% - 18% |
| SQL | 辅助角色 |
| Jupyter Notebook | 5% - 10% |
| Java / Go | 少量 |
特点:
- 数据分析生态天然以 Python 为核心。
- Pandas、NumPy、SQLAlchemy、DuckDB、Jupyter、Matplotlib、Plotly 等工具链集中在 Python。
- TS/JS 多用于 Dashboard、BI 前端、查询界面。
总结:
数据分析类 Agent 是 Python 占比最高的方向之一。
2.9 Robotic Agent / Embodied Agent / 具身智能 Agent
代表方向:
- 机器人 Agent
- 仿真环境
- 游戏 Agent
- 视觉语言动作模型
- 自动控制
- ROS Agent
典型项目:
- Voyager Minecraft Agent
- MineDojo
- Habitat 相关 Agent
- ALFWorld
- WebShop / MiniWoB 相关环境
- ROS + LLM Agent 项目
语言分布估计:
| 语言 | 占比 |
|---|---|
| Python | 45% - 60% |
| C++ | 15% - 30% |
| Jupyter Notebook | 5% - 10% |
| TypeScript / JavaScript | 5% - 10% |
| Lua / C# | 特定游戏或仿真环境中出现 |
| Rust / Go | 少量 |
特点:
- Python 用于模型推理、训练、策略、Agent 调度。
- C++ 用于机器人控制、ROS、仿真引擎、底层性能模块。
- 游戏 Agent 可能涉及 C#、Lua、JavaScript 等具体引擎语言。
总结:
具身智能 Agent 是少数 C++ 占比较高的 AI Agent 类型。
3. 汇总表:不同 Agent 类型的语言倾向
| Agent 类型 | 第一语言 | 第二语言 | 语言特点 |
|---|---|---|---|
| 通用自主 Agent | Python | TypeScript | Python 快速集成 LLM 与工具链 |
| Multi-Agent | Python | Jupyter / TS | 研究属性强,Python 绝对主导 |
| Coding Agent | Python | TypeScript | Python 做 Agent 核心,TS 做 IDE/插件/UI |
| Browser Agent | Python / TypeScript | JavaScript | 浏览器自动化推动 TS/JS 占比高 |
| RAG Agent | Python | TypeScript / Java | Python 做检索和推理,TS/Java 做产品化 |
| Workflow Agent | TypeScript / Python | Go | 低代码平台和 UI 导致 TS 占比高 |
| Chatbot Agent | TypeScript / Python | Java / C# | 产品化、Web 化明显 |
| Data Agent | Python | SQL / Notebook | 数据科学生态决定 Python 主导 |
| Robotic Agent | Python | C++ | 控制、仿真、ROS 带来 C++ 占比 |
4. GitHub AI Agent 项目的语言趋势
4.1 Python 仍是核心语言
原因:
- LLM SDK 和 Agent 框架最早以 Python 为主。
- LangChain、LlamaIndex、AutoGen、CrewAI、Haystack 等生态成熟。
- Python 易于集成向量数据库、爬虫、数据处理、自动化、模型推理。
- 研究人员和 AI 工程师更熟悉 Python。
典型使用:
Agent Core
Tool Calling
RAG Pipeline
Memory
Planner
Executor
Evaluation
Fine-tuning
Embedding
4.2 TypeScript/JavaScript 增长很快
增长场景:
- Web Agent
- Browser Agent
- Chatbot UI
- 低代码 Agent 平台
- VS Code 插件
- Agent SaaS 产品
- 前后端一体化应用
典型使用:
Next.js
Node.js
React
Vue
Express
NestJS
Playwright
Puppeteer
VS Code Extension
Electron
趋势判断:
越接近用户界面和产品交付,TypeScript 占比越高。
4.3 Java、C# 主要在企业 Agent 场景
Java 典型场景:
- Spring AI
- 企业知识库
- ERP/CRM Agent
- 微服务 Agent
- 金融、政企、传统 IT 系统
C# 典型场景:
- Semantic Kernel
- Microsoft Copilot 生态
- Office / Teams / Azure 集成
- 企业内部 Agent
趋势判断:
Java 和 C# 在 GitHub 开源热度上不如 Python/TS,但在企业内部落地中占比可能更高。
4.4 Go 和 Rust 偏工程化、运行时和基础设施
Go 典型场景:
- Agent 服务端
- 高并发 API
- 调度系统
- 云原生工具
- DevOps Agent
Rust 典型场景:
- 高性能 CLI
- 本地 Agent Runtime
- 代码索引
- 安全沙箱
- 推理服务组件
趋势判断:
Go/Rust 在 repo 数量上不大,但在高性能和工程化 Agent 项目中价值较高。
5. 如果按 Star 权重看,语言分布可能有所变化
如果不是按仓库数量,而是按 GitHub Star 数量加权,TypeScript/JavaScript 的比例通常会上升。
原因:
- 面向用户的聊天 UI、Agent 平台、可视化工具更容易获得 Star。
- Next.js、React、Node.js 项目用户群更大。
- 很多 Python Agent 框架虽然技术核心强,但前端项目传播更广。
大致估计:
| 统计口径 | Python | TS/JS | Java/C#/Go/Rust | Notebook/其他 |
|---|---|---|---|---|
| 按仓库数量 | 60% - 75% | 15% - 25% | 5% - 10% | 5% - 10% |
| 按 Star 加权 | 50% - 65% | 25% - 40% | 5% - 10% | 3% - 8% |
| 按企业落地 | 40% - 55% | 20% - 30% | 15% - 30% | 较少 |
6. 可复现的 GitHub 统计方法
如果你想做严格统计,可以按以下流程:
6.1 GitHub 搜索关键词
建议使用这些关键词和 topic:
ai-agent
llm-agent
autonomous-agent
multi-agent
agent-framework
rag-agent
coding-agent
browser-agent
web-agent
llm-agents
autogpt
babyagi
crewai
autogen
langgraph
llamaindex-agent
langchain-agent
GitHub 搜索示例:
topic:ai-agent stars:>10
topic:llm-agent stars:>10
topic:multi-agent stars:>10
"AI Agent" stars:>10
"LLM Agent" stars:>10
"autonomous agent" stars:>10
"coding agent" stars:>10
"browser agent" stars:>10
6.2 分类维度
可以用关键词把项目粗分为:
categories = {
"autonomous_agent": ["autogpt", "babyagi", "autonomous", "planner", "executor"],
"multi_agent": ["multi-agent", "multiagent", "crew", "autogen", "metagpt", "chatdev", "camel"],
"coding_agent": ["coding", "swe", "developer", "devin", "code", "programming", "aider"],
"browser_agent": ["browser", "web", "playwright", "selenium", "puppeteer", "webarena"],
"rag_agent": ["rag", "retrieval", "knowledge", "vector", "document", "search"],
"workflow_agent": ["workflow", "flow", "orchestration", "low-code", "no-code"],
"chatbot_agent": ["chatbot", "assistant", "discord", "telegram", "slack", "wechat"],
"data_agent": ["data", "sql", "pandas", "bi", "analytics"],
"robotic_agent": ["robot", "embodied", "ros", "minecraft", "simulation", "habitat"]
}
6.3 GitHub API 统计脚本示例
下面是一个简化版 Python 脚本,用于搜索 GitHub 仓库并统计语言。
需要先申请 GitHub Token:
export GITHUB_TOKEN=你的_token
脚本:
import os
import time
import requests
from collections import defaultdict, Counter
TOKEN = os.getenv("GITHUB_TOKEN")
HEADERS = {
"Authorization": f"Bearer {TOKEN}",
"Accept": "application/vnd.github+json"
}
QUERIES = [ 'topic:ai-agent stars:>10', 'topic:llm-agent stars:>10', 'topic:multi-agent stars:>10', '"AI Agent" stars:>10', '"LLM Agent" stars:>10', '"autonomous agent" stars:>10', '"coding agent" stars:>10', '"browser agent" stars:>10', '"rag agent" stars:>10']
CATEGORY_KEYWORDS = {
"autonomous_agent": ["autogpt", "babyagi", "autonomous", "planner", "executor"],
"multi_agent": ["multi-agent", "multiagent", "crew", "autogen", "metagpt", "chatdev", "camel"],
"coding_agent": ["coding", "swe", "developer", "devin", "code", "programming", "aider"],
"browser_agent": ["browser", "web", "playwright", "selenium", "puppeteer", "webarena"],
"rag_agent": ["rag", "retrieval", "knowledge", "vector", "document", "search"],
"workflow_agent": ["workflow", "flow", "orchestration", "low-code", "no-code"],
"chatbot_agent": ["chatbot", "assistant", "discord", "telegram", "slack", "wechat"],
"data_agent": ["data", "sql", "pandas", "bi", "analytics"],
"robotic_agent": ["robot", "embodied", "ros", "minecraft", "simulation", "habitat"]
}
def github_search(query, page=1):
url = "https://api.github.com/search/repositories"
params = {
"q": query,
"sort": "stars",
"order": "desc",
"per_page": 100,
"page": page
}
resp = requests.get(url, headers=HEADERS, params=params)
resp.raise_for_status()
return resp.json()
def get_languages(languages_url):
resp = requests.get(languages_url, headers=HEADERS)
resp.raise_for_status()
return resp.json()
def classify_repo(repo):
text = " ".join([
repo.get("name") or "",
repo.get("description") or "",
" ".join(repo.get("topics") or [])
]).lower()
matched = []
for category, keywords in CATEGORY_KEYWORDS.items():
if any(keyword.lower() in text for keyword in keywords):
matched.append(category)
if not matched:
matched.append("other_agent")
return matched
def main():
repos = {}
for query in QUERIES:
for page in range(1, 4):
data = github_search(query, page)
items = data.get("items", [])
if not items:
break
for repo in items:
repos[repo["full_name"]] = repo
time.sleep(1)
print(f"Total unique repos: {len(repos)}")
overall_primary_language = Counter()
overall_language_bytes = defaultdict(int)
category_primary_language = defaultdict(Counter)
category_language_bytes = defaultdict(lambda: defaultdict(int))
for full_name, repo in repos.items():
primary_language = repo.get("language") or "Unknown"
categories = classify_repo(repo)
overall_primary_language[primary_language] += 1
try:
languages = get_languages(repo["languages_url"])
except Exception as e:
print("language fetch failed:", full_name, e)
languages = {}
for lang, bytes_count in languages.items():
overall_language_bytes[lang] += bytes_count
for category in categories:
category_primary_language[category][primary_language] += 1
for lang, bytes_count in languages.items():
category_language_bytes[category][lang] += bytes_count
time.sleep(0.5)
print("\n=== Overall primary language by repo count ===")
for lang, count in overall_primary_language.most_common(20):
print(lang, count)
print("\n=== Overall language by bytes ===")
for lang, count in sorted(overall_language_bytes.items(), key=lambda x: x[1], reverse=True)[:20]:
print(lang, count)
print("\n=== Category primary language ===")
for category, counter in category_primary_language.items():
print(f"\n[{category}]")
for lang, count in counter.most_common(10):
print(lang, count)
if __name__ == "__main__":
main()
7. 统计时需要注意的问题
7.1 GitHub 的主语言不一定等于 Agent 核心语言
GitHub 的 primary language 由代码字节数决定。
例如:
- 一个 Python Agent 项目如果带了大量前端代码,可能显示为 TypeScript。
- 一个 TypeScript 平台如果嵌入 Python 执行器,可能仍显示 TypeScript。
- Notebook 项目可能只是教程,不一定是完整 Agent 框架。
所以建议同时统计:
- 仓库 primary language
languages_url返回的语言字节占比- README 中技术栈
- 目录结构
- Star / Fork 权重
- 最近更新时间
7.2 AI Agent 的定义比较宽泛
GitHub 上很多项目会把以下项目都标成 AI Agent:
- Chatbot
- RAG 应用
- Workflow 工具
- Prompt Flow
- AutoGPT 类工具
- Bot
- LLM App
- Copilot 插件
所以如果要严谨统计,最好先定义:
AI Agent = 具备感知输入、任务规划、工具调用、状态记忆、执行反馈中至少两项能力的 LLM 应用。
否则统计结果会被普通 ChatGPT Wrapper 干扰。
8. 技术选型建议
如果你要开发自己的 AI Agent,可以按类型选语言:
| 目标 | 推荐语言 |
|---|---|
| 快速做 Agent 原型 | Python |
| 做 Multi-Agent 框架 | Python |
| 做 RAG / 数据 Agent | Python |
| 做 Web Agent / 浏览器自动化 | Python 或 TypeScript |
| 做 VS Code / IDE Agent | TypeScript + Python |
| 做企业知识库 Agent | Python + Java / Go / TypeScript |
| 做低代码 Agent 平台 | TypeScript + Python |
| 做聊天助手产品 | TypeScript + Python |
| 做高并发后端 Agent 服务 | Go / Java + Python |
| 做本地高性能 CLI Agent | Rust / Go + Python |
| 做机器人 / 具身智能 Agent | Python + C++ |
9. 最终总结
GitHub 上 AI Agent 项目的语言格局可以概括为:
- Python 是绝对主流,尤其在通用 Agent、多 Agent、RAG、数据分析、科研项目中。
- TypeScript/JavaScript 是产品化主力,尤其在 Web Agent、Chatbot、低代码平台、前端 UI、浏览器自动化中。
- Java 和 C# 偏企业生态,在开源 GitHub 上声量不如 Python/TS,但在实际企业落地中重要性更高。
- Go 和 Rust 偏底层工程化,适合高性能、CLI、运行时、调度和基础设施。
- C++ 主要集中在机器人、仿真和具身智能 Agent。
- 如果按仓库数统计,Python 占比最高;如果按 Star 加权,TypeScript/JavaScript 占比会明显上升。
一句话结论:
GitHub AI Agent 生态当前是“Python 做智能核心,TypeScript/JavaScript 做产品界面,Java/C#/Go 做企业工程化,Rust/C++ 做高性能和底层能力”的格局。