qa1145 commited on
Commit
8ede856
·
verified ·
1 Parent(s): aa92fa7

Upload 1245 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .dockerignore +23 -0
  2. .gitattributes +2 -0
  3. .github/FUNDING.yml +15 -0
  4. .github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml +57 -0
  5. .github/ISSUE_TEMPLATE/bug-report.yml +80 -0
  6. .github/ISSUE_TEMPLATE/feature-request.yml +40 -0
  7. .github/PULL_REQUEST_TEMPLATE.md +27 -0
  8. .github/auto_assign.yml +38 -0
  9. .github/copilot-instructions.md +62 -0
  10. .github/dependabot.yml +13 -0
  11. .github/workflows/build-docs.yml +43 -0
  12. .github/workflows/code-format.yml +34 -0
  13. .github/workflows/codeql.yml +93 -0
  14. .github/workflows/coverage_test.yml +45 -0
  15. .github/workflows/dashboard_ci.yml +55 -0
  16. .github/workflows/docker-image.yml +198 -0
  17. .github/workflows/release.yml +245 -0
  18. .github/workflows/smoke_test.yml +58 -0
  19. .github/workflows/stale.yml +64 -0
  20. .github/workflows/sync-wiki.yml +68 -0
  21. .gitignore +65 -0
  22. .pre-commit-config.yaml +25 -0
  23. .python-version +1 -0
  24. AGENTS.md +34 -0
  25. CODE_OF_CONDUCT.md +128 -0
  26. CONTRIBUTING.md +142 -0
  27. Dockerfile +35 -0
  28. EULA.md +244 -0
  29. FIRST_NOTICE.en-US.md +14 -0
  30. FIRST_NOTICE.md +14 -0
  31. LICENSE +661 -0
  32. Makefile +41 -0
  33. README.md +282 -6
  34. README_fr.md +262 -0
  35. README_ja.md +263 -0
  36. README_ru.md +263 -0
  37. README_zh-TW.md +266 -0
  38. README_zh.md +277 -0
  39. astrbot/__init__.py +3 -0
  40. astrbot/api/__init__.py +19 -0
  41. astrbot/api/all.py +54 -0
  42. astrbot/api/event/__init__.py +17 -0
  43. astrbot/api/event/filter/__init__.py +68 -0
  44. astrbot/api/message_components.py +1 -0
  45. astrbot/api/platform/__init__.py +22 -0
  46. astrbot/api/provider/__init__.py +18 -0
  47. astrbot/api/star/__init__.py +7 -0
  48. astrbot/api/util/__init__.py +7 -0
  49. astrbot/builtin_stars/astrbot/long_term_memory.py +188 -0
  50. astrbot/builtin_stars/astrbot/main.py +118 -0
.dockerignore ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
2
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
3
+ # github actions
4
+ .git
5
+ .github/
6
+ .*ignore
7
+ # User-specific stuff
8
+ .idea/
9
+ # Byte-compiled / optimized / DLL files
10
+ __pycache__/
11
+ # Environments
12
+ .env
13
+ .venv
14
+ env/
15
+ venv*/
16
+ ENV/
17
+ .conda/
18
+ dashboard/
19
+ data/
20
+ tests/
21
+ .ruff_cache/
22
+ .astrbot
23
+ astrbot.lock
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ docs/public/404-seio.png filter=lfs diff=lfs merge=lfs -text
37
+ samples/stt_health_check.wav filter=lfs diff=lfs merge=lfs -text
.github/FUNDING.yml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: astrbot
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
+ polar: # Replace with a single Polar username
13
+ buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14
+ thanks_dev: # Replace with a single thanks.dev username
15
+ custom: ['https://afdian.com/a/astrbot_team']
.github/ISSUE_TEMPLATE/PLUGIN_PUBLISH.yml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: 🥳 发布插件
2
+ description: 提交插件到插件市场
3
+ title: "[Plugin] 插件名"
4
+ labels: ["plugin-publish"]
5
+ assignees: []
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ 欢迎发布插件到插件市场!
11
+
12
+ - type: markdown
13
+ attributes:
14
+ value: |
15
+ ## 插件基本信息
16
+
17
+ 请将插件信息填写到下方的 JSON 代码块中。其中 `tags`(插件标签)和 `social_link`(社交链接)选填。
18
+
19
+ 不熟悉 JSON ?可以从 [此站](https://plugins.astrbot.app) 右下角提交。
20
+
21
+ - type: textarea
22
+ id: plugin-info
23
+ attributes:
24
+ label: 插件信息
25
+ description: 请在下方代码块中填写您的插件信息,确保反引号包裹了JSON
26
+ value: |
27
+ ```json
28
+ {
29
+ "name": "插件名,请以 astrbot_plugin_ 开头",
30
+ "display_name": "用于展示的插件名,方便人类阅读",
31
+ "desc": "插件的简短介绍",
32
+ "author": "作者名",
33
+ "repo": "插件仓库链接",
34
+ "tags": [],
35
+ "social_link": "",
36
+ }
37
+ ```
38
+ validations:
39
+ required: true
40
+
41
+ - type: markdown
42
+ attributes:
43
+ value: |
44
+ ## 检查
45
+
46
+ - type: checkboxes
47
+ id: checks
48
+ attributes:
49
+ label: 插件检查清单
50
+ description: 请确认以下所有项目
51
+ options:
52
+ - label: 我的插件经过完整的测试
53
+ required: true
54
+ - label: 我的插件不包含恶意代码
55
+ required: true
56
+ - label: 我已阅读并同意遵守该项目的 [行为准则](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
57
+ required: true
.github/ISSUE_TEMPLATE/bug-report.yml ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: '🐛 Report Bug / 报告 Bug'
2
+ title: '[Bug]'
3
+ description: Submit bug report to help us improve. / 提交报告帮助我们改进。
4
+ labels: [ 'bug' ]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thank you for taking the time to report this issue! Please describe your problem accurately. If possible, please provide a reproducible snippet (this will help resolve the issue more quickly). Please note that issues that are not detailed or have no logs will be closed immediately. Thank you for your understanding. / 感谢您抽出时间报告问题!请准确解释您的问题。如果可能,请提供一个可复现的片段(这有助于更快地解决问题)。请注意,不详细 / 没有日志的 issue 会被直接关闭,谢谢理解。
10
+ - type: textarea
11
+ attributes:
12
+ label: What happened / 发生了什么
13
+ description: Description
14
+ placeholder: >
15
+ Please provide a clear and specific description of what this exception is. Please note that issues that are not detailed or have no logs will be closed immediately. Thank you for your understanding. / 一个清晰且具体的描述这个异常是什么。请注意,不详细 / 没有日志的 issue 会被直接关闭,谢谢理解。
16
+ validations:
17
+ required: true
18
+
19
+ - type: textarea
20
+ attributes:
21
+ label: Reproduce / 如何复现?
22
+ description: >
23
+ The steps to reproduce the issue. / 复现该问题的步骤
24
+ placeholder: >
25
+ Example: 1. Open '...'
26
+ validations:
27
+ required: true
28
+
29
+ - type: textarea
30
+ attributes:
31
+ label: AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
32
+ placeholder: >
33
+ Example: 4.5.7 Docker, 3.1.7 Windows Launcher
34
+ validations:
35
+ required: true
36
+
37
+ - type: dropdown
38
+ attributes:
39
+ label: OS
40
+ description: |
41
+ On which operating system did you encounter this problem? / 你在哪个操作系统上遇到了这个问题?
42
+ multiple: false
43
+ options:
44
+ - 'Windows'
45
+ - 'macOS'
46
+ - 'Linux'
47
+ - 'Other'
48
+ - 'Not sure'
49
+ validations:
50
+ required: true
51
+
52
+ - type: textarea
53
+ attributes:
54
+ label: Logs / 报错日志
55
+ description: >
56
+ Please provide complete Debug-level logs, such as error logs and screenshots. Don't worry if they're long! Please note that issues with insufficient details or no logs will be closed immediately. Thank you for your understanding. / 如报错日志、截图等。请提供完整的 Debug 级别的日志,不要介意它很长!请注意,不详细 / 没有日志的 issue 会被直接关闭,谢谢理解。
57
+ placeholder: >
58
+ Please provide a complete error log or screenshot. / 请提供完整的报错日志或截图。
59
+ validations:
60
+ required: true
61
+
62
+ - type: checkboxes
63
+ attributes:
64
+ label: Are you willing to submit a PR? / 你愿意提交 PR 吗?
65
+ description: >
66
+ This is not required, but we would be happy to provide guidance during the contribution process, especially if you already have a good understanding of how to implement the fix. / 这不是必需的,但我们很乐意在贡献过程中为您提供指导特别是如果你已经很好地理解了如何实现修复。
67
+ options:
68
+ - label: Yes!
69
+
70
+ - type: checkboxes
71
+ attributes:
72
+ label: Code of Conduct
73
+ options:
74
+ - label: >
75
+ I have read and agree to abide by the project's [Code of Conduct](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
76
+ required: true
77
+
78
+ - type: markdown
79
+ attributes:
80
+ value: "Thank you for filling out our form! / 感谢您填写我们的表单!"
.github/ISSUE_TEMPLATE/feature-request.yml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ name: '🎉 Feature Request / 功能建议'
3
+ title: "[Feature]"
4
+ description: Submit a suggestion to help us improve. / 提交建议帮助我们改进。
5
+ labels: [ "enhancement" ]
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Thank you for taking the time to suggest a new feature! Please explain your idea clearly and accurately. / 感谢您抽出时间提出新功能建议,请准确解释您的想法。
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: Description / 描述
15
+ description: Please describe the feature you want to be added in detail. / 请详细描述您希望添加的功能。
16
+
17
+ - type: textarea
18
+ attributes:
19
+ label: Use Case / 使用场景
20
+ description: Please describe the use case for this feature. / 请描述这个功能的使用场景。
21
+
22
+ - type: checkboxes
23
+ attributes:
24
+ label: Willing to Submit PR? / 是否愿意提交PR?
25
+ description: >
26
+ This is not required, but if you are willing to submit a PR to implement this feature, it would be greatly appreciated! / 这不是必需的,但如果您愿意提交 PR 来实现这个功能,我们将不胜感激!
27
+ options:
28
+ - label: Yes, I am willing to submit a PR. / 是的,我愿意提交 PR。
29
+
30
+ - type: checkboxes
31
+ attributes:
32
+ label: Code of Conduct
33
+ options:
34
+ - label: >
35
+ I have read and agree to abide by the project's [Code of Conduct](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct). /
36
+ required: true
37
+
38
+ - type: markdown
39
+ attributes:
40
+ value: "Thank you for filling out our form!"
.github/PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--Please describe the motivation for this change: What problem does it solve? (e.g., Fixes XX issue, adds YY feature)-->
2
+ <!--请描述此项更改的动机:它解决了什么问题?(例如:修复了 XX issue,添加了 YY 功能)-->
3
+
4
+ ### Modifications / 改动点
5
+
6
+ <!--请总结你的改动:哪些核心文件被修改了?实现了什么功能?-->
7
+ <!--Please summarize your changes: What core files were modified? What functionality was implemented?-->
8
+
9
+ - [x] This is NOT a breaking change. / 这不是一个破坏性变更。
10
+ <!-- If your changes is a breaking change, please uncheck the checkbox above -->
11
+
12
+ ### Screenshots or Test Results / 运行截图或测试结果
13
+
14
+ <!--Please paste screenshots, GIFs, or test logs here as evidence of executing the "Verification Steps" to prove this change is effective.-->
15
+ <!--请粘贴截图、GIF 或测试日志,作为执行“验证步骤”的证据,证明此改动有效。-->
16
+
17
+ ---
18
+
19
+ ### Checklist / 检查清单
20
+
21
+ <!--If merged, your code will serve tens of thousands of users! Please double-check the following items before submitting.-->
22
+ <!--如果分支被合并,您的代码将服务于数万名用户!在提交前,请核查一下几点内容。-->
23
+
24
+ - [ ] 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
25
+ - [ ] 👀 我的更改经过了良好的测试,**并已在上方提供了“验证步骤”和“运行截图”**。/ My changes have been well-tested, **and "Verification Steps" and "Screenshots" have been provided above**.
26
+ - [ ] 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 `requirements.txt` 和 `pyproject.toml` 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in `requirements.txt` and `pyproject.toml`.
27
+ - [ ] 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.
.github/auto_assign.yml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Set to true to add reviewers to pull requests
2
+ addReviewers: true
3
+
4
+ # Set to true to add assignees to pull requests
5
+ addAssignees: false
6
+
7
+ # A list of reviewers to be added to pull requests (GitHub user name)
8
+ reviewers:
9
+ - Soulter
10
+ - Raven95676
11
+ - Larch-C
12
+ - anka-afk
13
+ - advent259141
14
+ - Fridemn
15
+ - LIghtJUNction
16
+ # - zouyonghe
17
+
18
+ # A number of reviewers added to the pull request
19
+ # Set 0 to add all the reviewers (default: 0)
20
+ numberOfReviewers: 2
21
+
22
+ # A list of assignees, overrides reviewers if set
23
+ # assignees:
24
+ # - assigneeA
25
+
26
+ # A number of assignees to add to the pull request
27
+ # Set to 0 to add all of the assignees.
28
+ # Uses numberOfReviewers if unset.
29
+ # numberOfAssignees: 2
30
+
31
+ # A list of keywords to be skipped the process that add reviewers if pull requests include it
32
+ skipKeywords:
33
+ - wip
34
+ - draft
35
+
36
+ # A list of users to be skipped by both the add reviewers and add assignees processes
37
+ # skipUsers:
38
+ # - dependabot[bot]
.github/copilot-instructions.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AstrBot Development Instructions
2
+
3
+ AstrBot is a multi-platform LLM chatbot and development framework written in Python with a Vue.js dashboard. It supports multiple messaging platforms (QQ, Telegram, Discord, etc.) and various LLM providers (OpenAI, Anthropic, Google Gemini, etc.).
4
+
5
+ Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
6
+
7
+ ## Working Effectively
8
+
9
+ ### Bootstrap and Install Dependencies
10
+ - **Python 3.10+ required** - Check `.python-version` file
11
+ - Install UV package manager: `pip install uv`
12
+ - Install project dependencies: `uv sync` -- takes 6-7 minutes. NEVER CANCEL. Set timeout to 10+ minutes.
13
+ - Create required directories: `mkdir -p data/plugins data/config data/temp`
14
+
15
+ ### Running the Application
16
+ - Run main application: `uv run main.py` -- starts in ~3 seconds
17
+ - Application creates WebUI on http://localhost:7860 (default credentials: `astrbot`/`astrbot`)
18
+
19
+ ### Dashboard Build (Vue.js/Node.js)
20
+ - **Prerequisites**: Node.js 20+ and npm 10+ required
21
+ - Navigate to dashboard: `cd dashboard`
22
+ - Install dashboard dependencies: `npm install` -- takes 2-3 minutes. NEVER CANCEL. Set timeout to 5+ minutes.
23
+ - Build dashboard: `npm run build` -- takes 25-30 seconds. NEVER CANCEL.
24
+ - Dashboard creates optimized production build in `dashboard/dist/`
25
+
26
+ ### Testing
27
+ - Do not generate test files for now.
28
+
29
+ ### Code Quality and Linting
30
+ - Install ruff linter: `uv add --dev ruff`
31
+ - Check code style: `uv run ruff check .` -- takes <1 second
32
+ - Check formatting: `uv run ruff format --check .` -- takes <1 second
33
+ - Fix formatting: `uv run ruff format .`
34
+ - **ALWAYS** run `uv run ruff check .` and `uv run ruff format .` before committing changes
35
+
36
+ ### Plugin Development
37
+ - Plugins load from `astrbot/builtin_stars/` (built-in) and `data/plugins/` (user-installed)
38
+ - Plugin system supports function tools and message handlers
39
+ - Key plugins: python_interpreter, web_searcher, astrbot, reminder, session_controller
40
+
41
+ ### Common Issues and Workarounds
42
+ - **Dashboard download fails**: Known issue with "division by zero" error - application still works
43
+ - **Import errors in tests**: Ensure `uv run` is used to run tests in proper environment
44
+ =- **Build timeouts**: Always set appropriate timeouts (10+ minutes for uv sync, 5+ minutes for npm install)
45
+
46
+ ## CI/CD Integration
47
+ - GitHub Actions workflows in `.github/workflows/`
48
+ - Docker builds supported via `Dockerfile`
49
+ - Pre-commit hooks enforce ruff formatting and linting
50
+
51
+ ## Docker Support
52
+ - Primary deployment method: `docker run soulter/astrbot:latest`
53
+ - Compose file available: `compose.yml`
54
+ - Exposes ports: 7860 (WebUI), 6195 (WeChat), 6199 (QQ), etc.
55
+ - Volume mount required: `./data:/AstrBot/data`
56
+
57
+ ## Multi-language Support
58
+ - Documentation in Chinese (README.md), English (README_en.md), Japanese (README_ja.md)
59
+ - UI supports internationalization
60
+ - Default language is Chinese
61
+
62
+ Remember: This is a production chatbot framework with real users. Always test thoroughly and ensure changes don't break existing functionality.
.github/dependabot.yml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Keep GitHub Actions up to date with GitHub's Dependabot...
2
+ # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
3
+ # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: github-actions
7
+ directory: /
8
+ groups:
9
+ github-actions:
10
+ patterns:
11
+ - "*" # Group all Actions updates into a single larger pull request
12
+ schedule:
13
+ interval: weekly
.github/workflows/build-docs.yml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest # 运行环境
12
+ steps:
13
+ - name: checkout
14
+ uses: actions/checkout@v6
15
+ - name: nodejs installation
16
+ uses: actions/setup-node@v6
17
+ with:
18
+ node-version: "18"
19
+ - name: npm install
20
+ run: npm add -D vitepress
21
+ working-directory: './docs' # working-directory 指定 shell 命令运行目录
22
+ - name: npm run build
23
+ run: npm run docs:build
24
+ working-directory: './docs'
25
+ - name: scp
26
+ uses: appleboy/scp-action@v1.0.0
27
+ with:
28
+ host: ${{ secrets.HOST_NEKO }}
29
+ username: ${{ secrets.USERNAME }}
30
+ password: ${{ secrets.PASSWORDNEKO }}
31
+ source: 'docs/.vitepress/dist/*'
32
+ target: '/tmp/'
33
+ - name: script
34
+ uses: appleboy/ssh-action@v1.2.5
35
+ with:
36
+ host: ${{ secrets.HOST_NEKO }}
37
+ username: ${{ secrets.USERNAME }}
38
+ password: ${{ secrets.PASSWORDNEKO }}
39
+ script: |
40
+ mkdir -p /root/docker_data/caddy/caddy_data/static_site/abv4/
41
+ rm -rf /root/docker_data/caddy/caddy_data/static_site/abv4/*
42
+ mv /tmp/docs/.vitepress/dist/* /root/docker_data/caddy/caddy_data/static_site/abv4/
43
+ rm -rf /tmp/docs/
.github/workflows/code-format.yml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Code Format Check
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ master ]
6
+ push:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ format-check:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v6
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v6
19
+ with:
20
+ python-version: '3.12'
21
+
22
+ - name: Install UV
23
+ run: pip install uv
24
+
25
+ - name: Install dependencies
26
+ run: uv sync
27
+
28
+ - name: Check code formatting with ruff
29
+ run: |
30
+ uv run ruff format --check .
31
+
32
+ - name: Check code style with ruff
33
+ run: |
34
+ uv run ruff check .
.github/workflows/codeql.yml ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "master" ]
17
+ pull_request:
18
+ branches: [ "master" ]
19
+ schedule:
20
+ - cron: '21 15 * * 5'
21
+
22
+ jobs:
23
+ analyze:
24
+ name: Analyze (${{ matrix.language }})
25
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
26
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
27
+ # - https://gh.io/supported-runners-and-hardware-resources
28
+ # - https://gh.io/using-larger-runners (GitHub.com only)
29
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
30
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31
+ timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32
+ permissions:
33
+ # required for all workflows
34
+ security-events: write
35
+
36
+ # required to fetch internal or private CodeQL packs
37
+ packages: read
38
+
39
+ # only required for workflows in private repositories
40
+ actions: read
41
+ contents: read
42
+
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ include:
47
+ - language: python
48
+ build-mode: none
49
+ # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
50
+ # Use `c-cpp` to analyze code written in C, C++ or both
51
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
52
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
53
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
54
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
55
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
56
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
57
+ steps:
58
+ - name: Checkout repository
59
+ uses: actions/checkout@v6
60
+
61
+ # Initializes the CodeQL tools for scanning.
62
+ - name: Initialize CodeQL
63
+ uses: github/codeql-action/init@v4
64
+ with:
65
+ languages: ${{ matrix.language }}
66
+ build-mode: ${{ matrix.build-mode }}
67
+ # If you wish to specify custom queries, you can do so here or in a config file.
68
+ # By default, queries listed here will override any specified in a config file.
69
+ # Prefix the list here with "+" to use these queries and those in the config file.
70
+
71
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
72
+ # queries: security-extended,security-and-quality
73
+
74
+ # If the analyze step fails for one of the languages you are analyzing with
75
+ # "We were unable to automatically build your code", modify the matrix above
76
+ # to set the build mode to "manual" for that language. Then modify this step
77
+ # to build your code.
78
+ # ℹ️ Command-line programs to run using the OS shell.
79
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80
+ - if: matrix.build-mode == 'manual'
81
+ shell: bash
82
+ run: |
83
+ echo 'If you are using a "manual" build mode for one or more of the' \
84
+ 'languages you are analyzing, replace this with the commands to build' \
85
+ 'your code, for example:'
86
+ echo ' make bootstrap'
87
+ echo ' make release'
88
+ exit 1
89
+
90
+ - name: Perform CodeQL Analysis
91
+ uses: github/codeql-action/analyze@v4
92
+ with:
93
+ category: "/language:${{matrix.language}}"
.github/workflows/coverage_test.yml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Run tests and upload coverage
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths-ignore:
8
+ - 'README.md'
9
+ - 'changelogs/**'
10
+ - 'dashboard/**'
11
+ pull_request:
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ test:
16
+ name: Run tests and collect coverage
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v6
21
+ with:
22
+ fetch-depth: 0
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v6
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install pytest pytest-asyncio pytest-cov
31
+ pip install --editable .
32
+
33
+ - name: Run tests
34
+ run: |
35
+ mkdir -p data/plugins
36
+ mkdir -p data/config
37
+ mkdir -p data/temp
38
+ export TESTING=true
39
+ export ZHIPU_API_KEY=${{ secrets.OPENAI_API_KEY }}
40
+ pytest --cov=astrbot -v -o log_cli=true -o log_level=DEBUG
41
+
42
+ - name: Upload results to Codecov
43
+ uses: codecov/codecov-action@v5
44
+ with:
45
+ token: ${{ secrets.CODECOV_TOKEN }}
.github/workflows/dashboard_ci.yml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: AstrBot Dashboard CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v6
15
+
16
+ - name: Setup Node.js
17
+ uses: actions/setup-node@v6
18
+ with:
19
+ node-version: '24.13.0'
20
+
21
+ - name: npm install, build
22
+ run: |
23
+ cd dashboard
24
+ npm install pnpm -g
25
+ pnpm install
26
+ pnpm i --save-dev @types/markdown-it
27
+ pnpm run build
28
+
29
+ - name: Inject Commit SHA
30
+ id: get_sha
31
+ run: |
32
+ echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
33
+ mkdir -p dashboard/dist/assets
34
+ echo $COMMIT_SHA > dashboard/dist/assets/version
35
+ cd dashboard
36
+ zip -r dist.zip dist
37
+
38
+ - name: Archive production artifacts
39
+ uses: actions/upload-artifact@v7
40
+ with:
41
+ name: dist-without-markdown
42
+ path: |
43
+ dashboard/dist
44
+ !dist/**/*.md
45
+
46
+ - name: Create GitHub Release
47
+ if: github.event_name == 'push'
48
+ uses: ncipollo/release-action@v1.20.0
49
+ with:
50
+ tag: release-${{ github.sha }}
51
+ owner: AstrBotDevs
52
+ repo: astrbot-release-harbour
53
+ body: "Automated release from commit ${{ github.sha }}"
54
+ token: ${{ secrets.ASTRBOT_HARBOUR_TOKEN }}
55
+ artifacts: "dashboard/dist.zip"
.github/workflows/docker-image.yml ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Docker Image CI/CD
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ schedule:
8
+ # Run at 00:00 UTC every day
9
+ - cron: "0 0 * * *"
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ build-nightly-image:
14
+ if: github.event_name == 'schedule'
15
+ runs-on: ubuntu-latest
16
+ env:
17
+ DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
18
+ GHCR_OWNER: astrbotdevs
19
+ HAS_GHCR_TOKEN: ${{ secrets.GHCR_GITHUB_TOKEN != '' }}
20
+
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v6
24
+ with:
25
+ fetch-depth: 1
26
+ fetch-tag: true
27
+
28
+ - name: Check for new commits today
29
+ if: github.event_name == 'schedule'
30
+ id: check-commits
31
+ run: |
32
+ # Get commits from the last 24 hours
33
+ commits=$(git log --since="24 hours ago" --oneline)
34
+ if [ -z "$commits" ]; then
35
+ echo "No commits in the last 24 hours, skipping build"
36
+ echo "has_commits=false" >> $GITHUB_OUTPUT
37
+ else
38
+ echo "Found commits in the last 24 hours:"
39
+ echo "$commits"
40
+ echo "has_commits=true" >> $GITHUB_OUTPUT
41
+ fi
42
+
43
+ - name: Exit if no commits
44
+ if: github.event_name == 'schedule' && steps.check-commits.outputs.has_commits == 'false'
45
+ run: exit 0
46
+
47
+ - name: Build Dashboard
48
+ run: |
49
+ cd dashboard
50
+ npm install
51
+ npm run build
52
+ mkdir -p dist/assets
53
+ echo $(git rev-parse HEAD) > dist/assets/version
54
+ cd ..
55
+ mkdir -p data
56
+ cp -r dashboard/dist data/
57
+
58
+ - name: Determine test image tags
59
+ id: test-meta
60
+ run: |
61
+ short_sha=$(echo "${GITHUB_SHA}" | cut -c1-12)
62
+ build_date=$(date +%Y%m%d)
63
+ echo "short_sha=$short_sha" >> $GITHUB_OUTPUT
64
+ echo "build_date=$build_date" >> $GITHUB_OUTPUT
65
+
66
+ - name: Set QEMU
67
+ uses: docker/setup-qemu-action@v4.0.0
68
+
69
+ - name: Set Docker Buildx
70
+ uses: docker/setup-buildx-action@v4.0.0
71
+
72
+ - name: Log in to DockerHub
73
+ uses: docker/login-action@v4.0.0
74
+ with:
75
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
76
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
77
+
78
+ - name: Login to GitHub Container Registry
79
+ if: env.HAS_GHCR_TOKEN == 'true'
80
+ uses: docker/login-action@v4.0.0
81
+ with:
82
+ registry: ghcr.io
83
+ username: ${{ env.GHCR_OWNER }}
84
+ password: ${{ secrets.GHCR_GITHUB_TOKEN }}
85
+
86
+ - name: Build nightly image tags list
87
+ id: test-tags
88
+ run: |
89
+ TAGS="${{ env.DOCKER_HUB_USERNAME }}/astrbot:nightly-latest
90
+ ${{ env.DOCKER_HUB_USERNAME }}/astrbot:nightly-${{ steps.test-meta.outputs.build_date }}-${{ steps.test-meta.outputs.short_sha }}"
91
+ if [ "${{ env.HAS_GHCR_TOKEN }}" = "true" ]; then
92
+ TAGS="$TAGS
93
+ ghcr.io/${{ env.GHCR_OWNER }}/astrbot:nightly-latest
94
+ ghcr.io/${{ env.GHCR_OWNER }}/astrbot:nightly-${{ steps.test-meta.outputs.build_date }}-${{ steps.test-meta.outputs.short_sha }}"
95
+ fi
96
+ echo "tags<<EOF" >> $GITHUB_OUTPUT
97
+ echo "$TAGS" >> $GITHUB_OUTPUT
98
+ echo "EOF" >> $GITHUB_OUTPUT
99
+
100
+ - name: Build and Push Nightly Image
101
+ uses: docker/build-push-action@v7.0.0
102
+ with:
103
+ context: .
104
+ platforms: linux/amd64,linux/arm64
105
+ push: true
106
+ tags: ${{ steps.test-tags.outputs.tags }}
107
+
108
+ - name: Post build notifications
109
+ run: echo "Test Docker image has been built and pushed successfully"
110
+
111
+ build-release-image:
112
+ if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
113
+ runs-on: ubuntu-latest
114
+ env:
115
+ DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
116
+ GHCR_OWNER: astrbotdevs
117
+ HAS_GHCR_TOKEN: ${{ secrets.GHCR_GITHUB_TOKEN != '' }}
118
+
119
+ steps:
120
+ - name: Checkout
121
+ uses: actions/checkout@v6
122
+ with:
123
+ fetch-depth: 1
124
+ fetch-tag: true
125
+
126
+ - name: Get latest tag (only on manual trigger)
127
+ id: get-latest-tag
128
+ if: github.event_name == 'workflow_dispatch'
129
+ run: |
130
+ tag=$(git describe --tags --abbrev=0)
131
+ echo "latest_tag=$tag" >> $GITHUB_OUTPUT
132
+
133
+ - name: Checkout to latest tag (only on manual trigger)
134
+ if: github.event_name == 'workflow_dispatch'
135
+ run: git checkout ${{ steps.get-latest-tag.outputs.latest_tag }}
136
+
137
+ - name: Compute release metadata
138
+ id: release-meta
139
+ run: |
140
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
141
+ version="${{ steps.get-latest-tag.outputs.latest_tag }}"
142
+ else
143
+ version="${GITHUB_REF#refs/tags/}"
144
+ fi
145
+ if [[ "$version" == *"beta"* ]] || [[ "$version" == *"alpha"* ]]; then
146
+ echo "is_prerelease=true" >> $GITHUB_OUTPUT
147
+ echo "Version $version marked as pre-release"
148
+ else
149
+ echo "is_prerelease=false" >> $GITHUB_OUTPUT
150
+ echo "Version $version marked as stable"
151
+ fi
152
+ echo "version=$version" >> $GITHUB_OUTPUT
153
+
154
+ - name: Build Dashboard
155
+ run: |
156
+ cd dashboard
157
+ npm install
158
+ npm run build
159
+ mkdir -p dist/assets
160
+ echo $(git rev-parse HEAD) > dist/assets/version
161
+ cd ..
162
+ mkdir -p data
163
+ cp -r dashboard/dist data/
164
+
165
+ - name: Set QEMU
166
+ uses: docker/setup-qemu-action@v4.0.0
167
+
168
+ - name: Set Docker Buildx
169
+ uses: docker/setup-buildx-action@v4.0.0
170
+
171
+ - name: Log in to DockerHub
172
+ uses: docker/login-action@v4.0.0
173
+ with:
174
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
175
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
176
+
177
+ - name: Login to GitHub Container Registry
178
+ if: env.HAS_GHCR_TOKEN == 'true'
179
+ uses: docker/login-action@v4.0.0
180
+ with:
181
+ registry: ghcr.io
182
+ username: ${{ env.GHCR_OWNER }}
183
+ password: ${{ secrets.GHCR_GITHUB_TOKEN }}
184
+
185
+ - name: Build and Push Release Image
186
+ uses: docker/build-push-action@v7.0.0
187
+ with:
188
+ context: .
189
+ platforms: linux/amd64,linux/arm64
190
+ push: true
191
+ tags: |
192
+ ${{ steps.release-meta.outputs.is_prerelease == 'false' && format('{0}/astrbot:latest', env.DOCKER_HUB_USERNAME) || '' }}
193
+ ${{ steps.release-meta.outputs.is_prerelease == 'false' && env.HAS_GHCR_TOKEN == 'true' && format('ghcr.io/{0}/astrbot:latest', env.GHCR_OWNER) || '' }}
194
+ ${{ format('{0}/astrbot:{1}', env.DOCKER_HUB_USERNAME, steps.release-meta.outputs.version) }}
195
+ ${{ env.HAS_GHCR_TOKEN == 'true' && format('ghcr.io/{0}/astrbot:{1}', env.GHCR_OWNER, steps.release-meta.outputs.version) || '' }}
196
+
197
+ - name: Post build notifications
198
+ run: echo "Release Docker image has been built and pushed successfully"
.github/workflows/release.yml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ ref:
10
+ description: "Git ref to build (branch/tag/SHA)"
11
+ required: false
12
+ default: "master"
13
+ tag:
14
+ description: "Release tag to publish assets to (for example: v4.14.6)"
15
+ required: false
16
+
17
+ permissions:
18
+ contents: write
19
+
20
+ jobs:
21
+ build-dashboard:
22
+ name: Build Dashboard
23
+ runs-on: ubuntu-24.04
24
+ env:
25
+ R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
26
+ R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
27
+ R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v6
31
+ with:
32
+ fetch-depth: 0
33
+ ref: ${{ inputs.ref || github.ref }}
34
+
35
+ - name: Resolve tag
36
+ id: tag
37
+ shell: bash
38
+ run: |
39
+ if [ "${{ github.event_name }}" = "push" ]; then
40
+ tag="${GITHUB_REF_NAME}"
41
+ elif [ -n "${{ inputs.tag }}" ]; then
42
+ tag="${{ inputs.tag }}"
43
+ else
44
+ tag="$(git describe --tags --abbrev=0)"
45
+ fi
46
+ if [ -z "$tag" ]; then
47
+ echo "Failed to resolve tag." >&2
48
+ exit 1
49
+ fi
50
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
51
+
52
+ - name: Setup pnpm
53
+ uses: pnpm/action-setup@v4.4.0
54
+ with:
55
+ version: 10.28.2
56
+
57
+ - name: Setup Node.js
58
+ uses: actions/setup-node@v6
59
+ with:
60
+ node-version: '24.13.0'
61
+ cache: "pnpm"
62
+ cache-dependency-path: dashboard/pnpm-lock.yaml
63
+
64
+ - name: Build dashboard dist
65
+ shell: bash
66
+ run: |
67
+ pnpm --dir dashboard install --frozen-lockfile
68
+ pnpm --dir dashboard run build
69
+ echo "${{ steps.tag.outputs.tag }}" > dashboard/dist/assets/version
70
+ cd dashboard
71
+ zip -r "AstrBot-${{ steps.tag.outputs.tag }}-dashboard.zip" dist
72
+
73
+ - name: Upload dashboard artifact
74
+ uses: actions/upload-artifact@v7
75
+ with:
76
+ name: Dashboard-${{ steps.tag.outputs.tag }}
77
+ if-no-files-found: error
78
+ path: dashboard/AstrBot-${{ steps.tag.outputs.tag }}-dashboard.zip
79
+
80
+ - name: Upload dashboard package to Cloudflare R2
81
+ if: ${{ env.R2_ACCOUNT_ID != '' && env.R2_ACCESS_KEY_ID != '' && env.R2_SECRET_ACCESS_KEY != '' }}
82
+ env:
83
+ R2_BUCKET_NAME: "astrbot"
84
+ R2_OBJECT_NAME: "astrbot-webui-latest.zip"
85
+ VERSION_TAG: ${{ steps.tag.outputs.tag }}
86
+ shell: bash
87
+ run: |
88
+ curl https://rclone.org/install.sh | sudo bash
89
+
90
+ mkdir -p ~/.config/rclone
91
+ cat <<EOF > ~/.config/rclone/rclone.conf
92
+ [r2]
93
+ type = s3
94
+ provider = Cloudflare
95
+ access_key_id = $R2_ACCESS_KEY_ID
96
+ secret_access_key = $R2_SECRET_ACCESS_KEY
97
+ endpoint = https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com
98
+ EOF
99
+
100
+ cp "dashboard/AstrBot-${VERSION_TAG}-dashboard.zip" "dashboard/${R2_OBJECT_NAME}"
101
+ rclone copy "dashboard/${R2_OBJECT_NAME}" "r2:${R2_BUCKET_NAME}" --progress
102
+ cp "dashboard/AstrBot-${VERSION_TAG}-dashboard.zip" "dashboard/astrbot-webui-${VERSION_TAG}.zip"
103
+ rclone copy "dashboard/astrbot-webui-${VERSION_TAG}.zip" "r2:${R2_BUCKET_NAME}" --progress
104
+
105
+ publish-release:
106
+ name: Publish GitHub Release
107
+ runs-on: ubuntu-24.04
108
+ needs:
109
+ - build-dashboard
110
+ steps:
111
+ - name: Checkout repository
112
+ uses: actions/checkout@v6
113
+ with:
114
+ fetch-depth: 0
115
+ ref: ${{ inputs.ref || github.ref }}
116
+
117
+ - name: Resolve tag
118
+ id: tag
119
+ shell: bash
120
+ run: |
121
+ if [ "${{ github.event_name }}" = "push" ]; then
122
+ tag="${GITHUB_REF_NAME}"
123
+ elif [ -n "${{ inputs.tag }}" ]; then
124
+ tag="${{ inputs.tag }}"
125
+ else
126
+ tag="$(git describe --tags --abbrev=0)"
127
+ fi
128
+ if [ -z "$tag" ]; then
129
+ echo "Failed to resolve tag." >&2
130
+ exit 1
131
+ fi
132
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
133
+
134
+ - name: Download dashboard artifact
135
+ uses: actions/download-artifact@v8
136
+ with:
137
+ name: Dashboard-${{ steps.tag.outputs.tag }}
138
+ path: release-assets
139
+
140
+
141
+ - name: Resolve release notes
142
+ id: notes
143
+ shell: bash
144
+ run: |
145
+ note_file="changelogs/${{ steps.tag.outputs.tag }}.md"
146
+ if [ ! -f "$note_file" ]; then
147
+ note_file="$(mktemp)"
148
+ echo "Release ${{ steps.tag.outputs.tag }}" > "$note_file"
149
+ fi
150
+ echo "file=$note_file" >> "$GITHUB_OUTPUT"
151
+
152
+ - name: Ensure release exists
153
+ env:
154
+ GH_TOKEN: ${{ github.token }}
155
+ shell: bash
156
+ run: |
157
+ tag="${{ steps.tag.outputs.tag }}"
158
+ if ! gh release view "$tag" >/dev/null 2>&1; then
159
+ gh release create "$tag" --title "$tag" --notes-file "${{ steps.notes.outputs.file }}"
160
+ fi
161
+
162
+ - name: Remove stale assets from release
163
+ env:
164
+ GH_TOKEN: ${{ github.token }}
165
+ shell: bash
166
+ run: |
167
+ tag="${{ steps.tag.outputs.tag }}"
168
+ while IFS= read -r asset; do
169
+ case "$asset" in
170
+ *.AppImage|*.dmg|*.zip|*.exe|*.blockmap)
171
+ gh release delete-asset "$tag" "$asset" -y || true
172
+ ;;
173
+ esac
174
+ done < <(gh release view "$tag" --json assets --jq '.assets[].name')
175
+
176
+ - name: Upload assets to release
177
+ env:
178
+ GH_TOKEN: ${{ github.token }}
179
+ shell: bash
180
+ run: |
181
+ tag="${{ steps.tag.outputs.tag }}"
182
+ gh release upload "$tag" release-assets/* --clobber
183
+
184
+ publish-pypi:
185
+ name: Publish PyPI
186
+ runs-on: ubuntu-24.04
187
+ needs:
188
+ - publish-release
189
+ steps:
190
+ - name: Checkout repository
191
+ uses: actions/checkout@v6
192
+ with:
193
+ fetch-depth: 0
194
+ ref: ${{ inputs.ref || github.ref }}
195
+
196
+ - name: Resolve tag
197
+ id: tag
198
+ shell: bash
199
+ run: |
200
+ if [ "${{ github.event_name }}" = "push" ]; then
201
+ tag="${GITHUB_REF_NAME}"
202
+ elif [ -n "${{ inputs.tag }}" ]; then
203
+ tag="${{ inputs.tag }}"
204
+ else
205
+ tag="$(git describe --tags --abbrev=0)"
206
+ fi
207
+ if [ -z "$tag" ]; then
208
+ echo "Failed to resolve tag." >&2
209
+ exit 1
210
+ fi
211
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
212
+
213
+ - name: Download dashboard artifact
214
+ uses: actions/download-artifact@v8
215
+ with:
216
+ name: Dashboard-${{ steps.tag.outputs.tag }}
217
+ path: dashboard-artifact
218
+
219
+ - name: Unpack dashboard dist into package tree
220
+ shell: bash
221
+ run: |
222
+ mkdir -p astrbot/dashboard/dist
223
+ unzip -q "dashboard-artifact/AstrBot-${{ steps.tag.outputs.tag }}-dashboard.zip" -d dashboard-artifact/unpacked
224
+ cp -r dashboard-artifact/unpacked/dist/. astrbot/dashboard/dist/
225
+
226
+ - name: Set up Python
227
+ uses: actions/setup-python@v6
228
+ with:
229
+ python-version: "3.10"
230
+
231
+ - name: Install uv
232
+ shell: bash
233
+ run: python -m pip install uv
234
+
235
+ - name: Build package
236
+ shell: bash
237
+ # Dashboard assets are already in astrbot/dashboard/dist/;
238
+ # ASTRBOT_BUILD_DASHBOARD is intentionally unset so the hatch hook skips npm.
239
+ run: uv build
240
+
241
+ - name: Publish to PyPI
242
+ env:
243
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
244
+ shell: bash
245
+ run: uv publish
.github/workflows/smoke_test.yml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Smoke Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths-ignore:
8
+ - 'README*.md'
9
+ - 'changelogs/**'
10
+ - 'dashboard/**'
11
+ pull_request:
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ smoke-test:
16
+ name: Run smoke tests
17
+ runs-on: ubuntu-latest
18
+ timeout-minutes: 10
19
+
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v6
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v6
28
+ with:
29
+ python-version: '3.12'
30
+
31
+ - name: Install UV package manager
32
+ run: |
33
+ pip install uv
34
+
35
+ - name: Install dependencies
36
+ run: |
37
+ uv sync
38
+ timeout-minutes: 15
39
+
40
+ - name: Run smoke tests
41
+ run: |
42
+ uv run main.py &
43
+ APP_PID=$!
44
+
45
+ echo "Waiting for application to start..."
46
+ for i in {1..60}; do
47
+ if curl -f http://localhost:7860 > /dev/null 2>&1; then
48
+ echo "Application started successfully!"
49
+ kill $APP_PID
50
+ exit 0
51
+ fi
52
+ sleep 1
53
+ done
54
+
55
+ echo "Application failed to start within 30 seconds"
56
+ kill $APP_PID 2>/dev/null || true
57
+ exit 1
58
+ timeout-minutes: 2
.github/workflows/stale.yml ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 本工作流用于标记并关闭长期不活跃的 Issue。
2
+ # 目前仅针对带 `bug` 标签的 Issue 生效,不会处理 PR。
3
+ #
4
+ # 文档: https://github.com/actions/stale
5
+ name: Mark stale bug issues
6
+
7
+ on:
8
+ schedule:
9
+ # 每天 UTC 08:30 执行 (北京时间 16:30)
10
+ - cron: '30 8 * * *'
11
+ workflow_dispatch:
12
+ inputs:
13
+ dry-run:
14
+ description: '仅预览, 不实际执行 (Dry run mode)'
15
+ required: false
16
+ default: true
17
+ type: boolean
18
+
19
+ jobs:
20
+ stale:
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ issues: write
24
+
25
+ steps:
26
+ - uses: actions/stale@v10
27
+ with:
28
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
29
+ operations-per-run: 200
30
+
31
+ # 只处理带 bug 标签的 Issue
32
+ any-of-labels: 'bug'
33
+
34
+ # 不处理 PR
35
+ days-before-pr-stale: -1
36
+ days-before-pr-close: -1
37
+
38
+ # 不活跃判定与关闭策略: 先标记 stale, 再延迟关闭
39
+ days-before-issue-stale: 60
40
+ days-before-issue-close: 30
41
+
42
+ stale-issue-label: 'stale'
43
+ stale-issue-message: |
44
+ This issue has been automatically marked as **stale** because it has not had any activity.
45
+ It will be closed in a certain period of time if no further activity occurs.
46
+ If this issue is still relevant, please leave a comment.
47
+
48
+ ---
49
+
50
+ 该 Issue 已较长时间无活动, 已被标记为 `stale`。
51
+ 如无后续活动, 将在一段时间后自动关闭。
52
+ 如仍需跟进, 请回复评论。
53
+ close-issue-message: |
54
+ This issue has been automatically closed due to inactivity.
55
+ If the problem still exists, feel free to reopen or create a new issue with updated information.
56
+
57
+ ---
58
+
59
+ 该 Issue 因长期无活动已自动关闭。
60
+ 如问题仍存在, 欢迎补充复现信息并重新打开或新建 Issue。
61
+
62
+ remove-stale-when-updated: true
63
+
64
+ debug-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run }}
.github/workflows/sync-wiki.yml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: sync wiki
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - master
8
+ paths:
9
+ - '.github/workflows/sync-wiki.yml'
10
+ - 'docs/scripts/sync_docs_to_wiki.py'
11
+ - 'docs/tests/test_sync_docs_to_wiki.py'
12
+ - 'docs/zh/**'
13
+ - 'docs/en/**'
14
+
15
+ concurrency:
16
+ group: sync-wiki-${{ github.ref }}
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ sync:
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+
25
+ steps:
26
+ - name: Validate manual ref
27
+ if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master'
28
+ run: |
29
+ echo "This workflow only publishes from refs/heads/master. Re-run it from the master branch."
30
+ exit 1
31
+
32
+ - name: Check out docs repository
33
+ uses: actions/checkout@v6
34
+
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: '3.11'
39
+
40
+ - name: Run sync unit tests
41
+ working-directory: docs
42
+ run: python -m unittest discover -s tests -p 'test_sync_docs_to_wiki.py' -v
43
+
44
+ - name: Validate internal doc links
45
+ run: python docs/scripts/sync_docs_to_wiki.py --source-root docs --check-links-only
46
+
47
+ - name: Clone AstrBot wiki
48
+ env:
49
+ WIKI_TOKEN: ${{ secrets.ASTRBOT_WIKI_TOKEN }}
50
+ run: |
51
+ test -n "$WIKI_TOKEN"
52
+ git clone "https://x-access-token:${WIKI_TOKEN}@github.com/AstrBotDevs/AstrBot.wiki.git" wiki
53
+
54
+ - name: Generate wiki pages
55
+ run: python docs/scripts/sync_docs_to_wiki.py --source-root docs --wiki-root wiki
56
+
57
+ - name: Commit and push wiki changes
58
+ working-directory: wiki
59
+ run: |
60
+ git config user.name "github-actions[bot]"
61
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
62
+ git add .
63
+ if git diff --cached --quiet; then
64
+ echo "No wiki changes to push"
65
+ exit 0
66
+ fi
67
+ git commit -m "docs: sync wiki from AstrBot-1/docs"
68
+ git push
.gitignore ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python related
2
+ __pycache__
3
+ .mypy_cache
4
+ .venv*
5
+ .conda/
6
+ uv.lock
7
+ .coverage
8
+
9
+ # IDE and editors
10
+ .vscode
11
+ .idea
12
+
13
+ # Logs and temporary files
14
+ botpy.log
15
+ logs/
16
+ temp
17
+ cookies.json
18
+
19
+ # Data files
20
+ data_v2.db
21
+ data_v3.db
22
+ data
23
+ configs/session
24
+ configs/config.yaml
25
+ cmd_config.json
26
+
27
+ # Plugins
28
+ addons/plugins
29
+ astrbot/builtin_stars/python_interpreter/workplace
30
+ tests/astrbot_plugin_openai
31
+
32
+ # Dashboard
33
+ dashboard/node_modules/
34
+ dashboard/dist/
35
+ .pnpm-store/
36
+ package-lock.json
37
+ yarn.lock
38
+
39
+ # Bundled dashboard dist (generated by hatch_build.py during pip wheel build)
40
+ astrbot/dashboard/dist/
41
+
42
+ # Operating System
43
+ **/.DS_Store
44
+ .DS_Store
45
+
46
+ # AstrBot specific
47
+ .astrbot
48
+ astrbot.lock
49
+
50
+ # Other
51
+ chroma
52
+ venv/*
53
+ pytest.ini
54
+ AGENTS.md
55
+ IFLOW.md
56
+
57
+ # genie_tts data
58
+ CharacterModels/
59
+ GenieData/
60
+ .agent/
61
+ .codex/
62
+ .opencode/
63
+ .kilocode/
64
+ .worktrees/
65
+
.pre-commit-config.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_install_hook_types: [pre-commit, prepare-commit-msg]
2
+ ci:
3
+ autofix_commit_msg: ":balloon: auto fixes by pre-commit hooks"
4
+ autofix_prs: true
5
+ autoupdate_branch: master
6
+ autoupdate_schedule: weekly
7
+ autoupdate_commit_msg: ":balloon: pre-commit autoupdate"
8
+ repos:
9
+ - repo: https://github.com/astral-sh/ruff-pre-commit
10
+ # Ruff version.
11
+ rev: v0.14.1
12
+ hooks:
13
+ # Run the linter.
14
+ - id: ruff-check
15
+ types_or: [ python, pyi ]
16
+ args: [ --fix ]
17
+ # Run the formatter.
18
+ - id: ruff-format
19
+ types_or: [ python, pyi ]
20
+
21
+ - repo: https://github.com/asottile/pyupgrade
22
+ rev: v3.21.0
23
+ hooks:
24
+ - id: pyupgrade
25
+ args: [--py310-plus]
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.12
AGENTS.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Setup commands
2
+
3
+ ### Core
4
+
5
+ ```
6
+ uv sync
7
+ uv run main.py
8
+ ```
9
+
10
+ Exposed an API server on `http://localhost:6185` by default.
11
+
12
+ ### Dashboard(WebUI)
13
+
14
+ ```
15
+ cd dashboard
16
+ pnpm install # First time only. Use npm install -g pnpm if pnpm is not installed.
17
+ pnpm dev
18
+ ```
19
+
20
+ Runs on `http://localhost:3000` by default.
21
+
22
+ ## Dev environment tips
23
+
24
+ 1. When modifying the WebUI, be sure to maintain componentization and clean code. Avoid duplicate code.
25
+ 2. Do not add any report files such as xxx_SUMMARY.md.
26
+ 3. After finishing, use `ruff format .` and `ruff check .` to format and check the code.
27
+ 4. When committing, ensure to use conventional commits messages, such as `feat: add new agent for data analysis` or `fix: resolve bug in provider manager`.
28
+ 5. Use English for all new comments.
29
+ 6. For path handling, use `pathlib.Path` instead of string paths, and use `astrbot.core.utils.path_utils` to get the AstrBot data and temp directory.
30
+
31
+ ## PR instructions
32
+
33
+ 1. Title format: use conventional commit messages
34
+ 2. Use English to write PR title and descriptions.
CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ SoulterL@outlook.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
CONTRIBUTING.md ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CONTRIBUTING
2
+
3
+ ## 贡献指南
4
+
5
+ 首先,感谢您花时间做出贡献!❤️
6
+
7
+ 所有类型的贡献都受到鼓励和重视。有关不同的帮助方式和处理方式的详细信息,请参阅[目录](#目录)。在做出贡献之前,请确保阅读相关部分。这将使我们维护人员的工作变得更加容易,并为所有参与者带来顺畅的体验。社区期待您的贡献。🎉
8
+
9
+ ### 目录
10
+
11
+ - [报告问题](#报告问题)
12
+ - [提交代码更改](#提交代码更改)
13
+
14
+ ### 报告问题
15
+
16
+ 如果您在使用 AstrBot 时遇到任何问题,请按照以下步骤报告:
17
+
18
+ 1. **检查现有问题**:在提交新问题之前,请先检查 [Issues](https://github.com/AstrBotDevs/AstrBot/issues) 中是否已经存在类似的问题。
19
+ 2. **创建新问题**:如果没有类似的问题,请创建一个新问题。请确保提供以下信息:
20
+ - 问题的简要描述
21
+ - 重现问题的步骤
22
+ - 预期结果和实际结果
23
+ - 相关日志或错误消息
24
+
25
+ ### 提交代码更改
26
+
27
+ #### 分支命名
28
+
29
+ 我们使用 `fix/` 前缀来修复错误,使用 `feat/` 前缀来添加新功能。对于 `fix/` 分支,请使用简短的描述,或者直接使用 Issue 编号。例如:`fix/1234` 或者 `fix/1234-login-typo`。对于 `feat/` 分支,请使用简短的描述,例如:`feat/add-user-profile`。
30
+
31
+ #### PR 描述
32
+
33
+ - 请使用英文描述您的 PR。
34
+ - 标题请使用 `fix: `, `feat: `, `docs: `, `style: `, `refactor: `, `test: `, `chore: ` 等语义化前缀,并简要描述更改内容。如:`fix: correct login page typo`。
35
+
36
+ #### 代码规范
37
+
38
+ ##### Core
39
+
40
+ 我们使用 Ruff 作为代码格式化和静态分析工具。在提交代码之前,请运行以下命令以确保代码符合规范:
41
+
42
+ ```bash
43
+ ruff format .
44
+ ruff check .
45
+ ```
46
+
47
+ 如果您使用 VSCode,可以安装 `Ruff` 插件。
48
+
49
+ ##### PR 功能完整性验证(推荐)
50
+
51
+ 如果您希望在本地做一套接近 CI 的完整验证,可使用:
52
+
53
+ ```bash
54
+ make pr-test-neo
55
+ ```
56
+
57
+ 该命令会执行:
58
+ - `uv sync --group dev`
59
+ - `ruff format --check .` 与 `ruff check .`
60
+ - Neo 相关关键测试
61
+ - `main.py` 启动 smoke test(检测 `http://localhost:7860`)
62
+
63
+ 需要全量验证时可使用:
64
+
65
+ ```bash
66
+ make pr-test-full
67
+ ```
68
+
69
+ 如果只想快速重复执行(跳过依赖同步和 dashboard 构建):
70
+
71
+ ```bash
72
+ make pr-test-full-fast
73
+ ```
74
+
75
+
76
+ ## Contributing Guide
77
+
78
+ First off, thanks for taking the time to contribute! ❤️
79
+
80
+ All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
81
+
82
+ ### Table of Contents
83
+
84
+ - [Reporting Issues](#reporting-issues)
85
+ - [Pull Requests](#pull-requests)
86
+
87
+ ### Reporting Issues
88
+
89
+ If you encounter any issues while using AstrBot, please follow these steps to report them:
90
+ 1. **Check Existing Issues**: Before submitting a new issue, please check if a similar issue already exists in the [Issues](https://github.com/AstrBotDevs/AstrBot/issues) section of the repository.
91
+ 2. **Create a New Issue**: If no similar issue exists, please create a new issue. Make sure to provide the following information:
92
+ - A brief description of the issue
93
+ - Steps to reproduce the issue
94
+ - Expected and actual results
95
+ - Relevant logs or error messages
96
+
97
+ ### Pull Requests
98
+
99
+ #### Branch Naming
100
+
101
+ We use the `fix/` prefix for bug fixes and the `feat/` prefix for new features. For `fix/` branches, please use a short description or directly use the Issue number, e.g., `fix/1234` or `fix/1234-login-typo`. For `feat/` branches, please use a short description, e.g., `feat/add-user-profile`.
102
+
103
+ #### PR Description
104
+ - Please use English to describe your PR.
105
+ - Use semantic prefixes like `fix: `, `feat: `, `docs: `, `style: `, `refactor: `, `test: `, `chore: ` in the title, followed by a brief description of the changes, e.g., `fix: correct login page typo`.
106
+
107
+ #### Code Style
108
+
109
+ ##### Core
110
+
111
+ We use Ruff as our code formatter and static analysis tool. Before submitting your code, please run the following commands to ensure your code adheres to the style guidelines:
112
+
113
+ ```bash
114
+ ruff format .
115
+ ruff check .
116
+ ```
117
+
118
+ ##### PR completeness checks (recommended)
119
+
120
+ To run a local validation flow close to CI, use:
121
+
122
+ ```bash
123
+ make pr-test-neo
124
+ ```
125
+
126
+ This command runs:
127
+ - `uv sync --group dev`
128
+ - `ruff format --check .` and `ruff check .`
129
+ - Neo-related critical tests
130
+ - a startup smoke test against `http://localhost:7860`
131
+
132
+ For full validation, use:
133
+
134
+ ```bash
135
+ make pr-test-full
136
+ ```
137
+
138
+ For faster repeated runs (skip dependency sync and dashboard build), use:
139
+
140
+ ```bash
141
+ make pr-test-full-fast
142
+ ```
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV UV_SYSTEM=1
6
+
7
+ WORKDIR /app
8
+
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ gcc \
11
+ build-essential \
12
+ python3-dev \
13
+ libffi-dev \
14
+ libssl-dev \
15
+ ca-certificates \
16
+ bash \
17
+ ffmpeg \
18
+ curl \
19
+ gnupg \
20
+ git \
21
+ && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
22
+ && apt-get install -y --no-install-recommends nodejs \
23
+ && apt-get clean \
24
+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25
+
26
+ COPY . /app/
27
+
28
+ RUN python -m pip install uv && \
29
+ uv lock && \
30
+ uv sync && \
31
+ uv pip install socksio uv pilk --no-cache-dir --system
32
+
33
+ EXPOSE 7860 7860
34
+
35
+ CMD ["uv", "run", "main.py"]
EULA.md ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 最终用户许可协议(EULA)
2
+
3
+ > 我们热爱开源软件,并始终致力于为所有用户提供健康、安全、可靠的使用体验。 ❤️
4
+
5
+ For English edition, please refer to the section below the Chinese version.
6
+
7
+ **最后更新:** 2026-01-12
8
+
9
+ 感谢您使用 **AstrBot**。
10
+ 在使用本项目之前,请仔细阅读以下声明内容。
11
+
12
+ **您一旦安装、运行或使用本项目,即表示您已阅读、理解并同意本声明中的全部内容。**
13
+
14
+ ## 1. 项目性质
15
+
16
+ AstrBot 是一个遵循 **GNU Affero General Public License v3(AGPLv3)** 协议发布的**免费开源软件项目**。
17
+
18
+ * 截至目前,AstrBot 项目未开展任何形式的商业化服务,AstrBot 团队也未通过本项目向用户提供任何收费服务。若您因使用 AstrBot 被要求付费,请务必提高警惕,谨防诈骗行为。
19
+ * AstrBot 的代码实现未对任何第三方系统进行逆向工程、破解、反编译或绕过安全机制等行为。AstrBot 仅使用并支持各即时通讯(IM)平台官方公开提供的机器人接入接口、开放平台能力或相关通信协议进行集成与通信。
20
+
21
+ ## 2. 无担保声明
22
+
23
+ AstrBot 按“**现状(as is)**”提供,不附带任何形式的明示或暗示担保。
24
+
25
+ AstrBot 团队不对以下内容作出任何保证:
26
+
27
+ * 系统本身的安全性、可靠性或稳定性;
28
+ * 任何第三方插件的安全性、正确性或可信度;
29
+ * 任何第三方 AI 模型或外部服务 API 的可用性、质量、准确性或安全性;
30
+ * 本软件对任何特定用途的适用性。
31
+
32
+ **您使用本软件所产生的一切风险均由您自行承担。**
33
+
34
+ ## 3. 第三方插件与服务
35
+
36
+ * AstrBot 支持第三方插件及外部 AI 服务接入;
37
+ * AstrBot 团队**不对任何第三方插件、扩展或服务进行审计、控制、背书或担保**;
38
+ * 因使用第三方插件或服务所产生的任何风险、损失、数据泄露或法律后果,均由用户自行承担。
39
+ * 第三方插件指代的是非 AstrBot 自带的插件,AstrBot 自带的插件指代的是插件实现代码已经包含在 AstrBotDevs/AstrBot 代码库中的插件。插件市场中的插件都是第三方插件。
40
+
41
+ ## 4. 使用与内容限制
42
+
43
+ 您同意不会将 AstrBot 用于以下行为:
44
+
45
+ * 输入、生成、传播或处理任何违法、极端、暴力、色情、仇恨、辱骂或其他有害内容;
46
+ * 从事违反您所在国家或地区法律法规,或任何适用国际法律的行为;
47
+ * 试图绕过、关闭、削弱或破坏本系统内置的安全机制或内容限制。
48
+ * 任何侵犯他人合法权益、损害他人和自己身心健康、涉及个人隐私、个人信息等敏感内容的内容。
49
+
50
+ ## 5. 项目用途说明
51
+
52
+ AstrBot 是一个**工具型对话与 Agent 系统**,在**安全、健康、友善**的前提下提供有限的人性化交互能力。
53
+
54
+ 项目的主要目标是:
55
+
56
+ * 提供 Agent 能力与自动化辅助;
57
+ * 帮助用户提升工作、学习和信息处理效率;
58
+ * 在合理范围内提供友好的人机交互体验。
59
+ * 辅助用户成长,提供有益于用户身心健康的内容。
60
+
61
+ ## 6. 安全措施说明
62
+
63
+ AstrBot 团队**已尽合理努力在技术和策略层面设置安全与内容约束机制**,以引导系统输出健康、友善、安全的内容。
64
+
65
+ 但请理解:
66
+
67
+ * 世界上任何的系统均无法保证完全无误、绝对安全或无法被滥用;
68
+ * 用户仍有责任自行合理配置、监督并正确使用本系统。
69
+
70
+ 如果您要关闭 AstrBot 默认启用的“健康模式”,请在 cmd_config.json 中将 `provider_settings.llm_safety_mode` 设置为 `False`。但请注意,关闭健康模式不是推荐的使用方式,可能导致系统输出不安全或不适当的内容。关闭该功能所产生的任何风险与后果,均由用户自行承担,AstrBot 团队不对此承担任何责任。
71
+
72
+ ## 7. 心理健康提示
73
+
74
+ 如果您在使用本项目过程中因系统输出内容而感到心理不适、情绪困扰,
75
+ 或您本身正处于心理压力较大、情绪不稳定、焦虑、抑郁等状态并因此使用本项目,
76
+ 请优先考虑寻求来自专业人士的帮助,例如心理咨询师、心理医生或当地心理援助机构。
77
+
78
+ 如遇紧急情况(例如存在自伤或他伤风险),请立即联系当地的紧急救助电话或专业机构。
79
+
80
+ ## 8. 统计信息与隐私说明
81
+
82
+ AstrBot 可能会收集有限的匿名统计信息,用于了解系统使用情况、发现问题以及持续改进项目。
83
+
84
+ 所收集的统计信息仅包括与系统运行和功能使用相关的基础技术指标,例如功能使用频率、错误信息等。
85
+
86
+ AstrBot **不会收集、上传或存储您的对话内容、消息正文、输入文本,或任何能够识别您个人身份的敏感信息**。
87
+
88
+ 您可以手动关闭此项功能,通过在系统环境变量中设置 `ASTRBOT_DISABLE_METRICS=1` 来禁用匿名统计信息收集。
89
+
90
+ ## 9. 责任限制
91
+
92
+ 在法律允许的���大范围内,AstrBot 团队不对因以下原因导致的任何直接或间接损失承担责任,包括但不限于:
93
+
94
+ * 使用或无法使用本软件;
95
+ * 使用第三方插件或服务;
96
+ * 系统生成的内容或输出;
97
+ * 数据丢失、服务中断或安全事件。
98
+
99
+ ## 10. 条款的接受
100
+
101
+ 您一旦安装、运行、修改或使用 AstrBot,即确认:
102
+
103
+ * 您已阅读并理解本声明内容;
104
+ * 您同意并接受上述所有条款;
105
+ * 您对自身使用行为承担全部责任。
106
+
107
+ 如您不同意本声明的任何内容,请勿使用本项目。
108
+
109
+ ## 11. 许可与版权
110
+
111
+ AstrBot 的源代码、文档及相关内容受版权法及相关法律保护。
112
+
113
+ 在遵守本声明及 AGPLv3 协议的前提下,AstrBot 授予您一项非独占、不可转让、不可再许可的许可,用于下载、安装、运行、修改和分发本软件。
114
+
115
+ 除非法律另有规定或本声明另有明确说明,AstrBot 团队保留本项目的所有未明确授予的权利。
116
+
117
+ ## 12. 适用法律
118
+
119
+ 本声明的解释与适用应遵循您所在地或项目发布地适用的法律法规。
120
+
121
+ 如本声明的任何条款被认定为无效或不可执行,其余条款仍然有效。
122
+
123
+ ---
124
+
125
+ # EULA
126
+
127
+ > We love open-source software and are always committed to providing all users with a healthy, safe, and reliable experience. ❤️
128
+
129
+ **Last updated:** January 12, 2026
130
+
131
+ Thank you for using **AstrBot**.
132
+ Please read the following notice carefully before using this project.
133
+
134
+ **By installing, running, or using this project, you acknowledge that you have read, understood, and agreed to all the terms stated below.**
135
+
136
+ ## 1. Nature of the Project
137
+
138
+ AstrBot is a **free and open-source software project** released under the **GNU Affero General Public License v3 (AGPLv3)**.
139
+
140
+ * AstrBot does not constitute any form of commercial service;
141
+ * The AstrBot Team does not provide any paid services through this project;
142
+ * AstrBot’s implementation does not involve reverse engineering, cracking, decompilation, or circumvention of security mechanisms of any third-party systems. AstrBot only uses and supports officially published bot integration interfaces, open platform capabilities, or related communication protocols provided by instant messaging (IM) platforms for integration and communication.
143
+
144
+ ## 2. No Warranty
145
+
146
+ AstrBot is provided **“as is”**, without any express or implied warranties.
147
+
148
+ The AstrBot Team makes no guarantees regarding:
149
+
150
+ * The security, reliability, or stability of the system;
151
+ * The security, correctness, or trustworthiness of any third-party plugins;
152
+ * The availability, quality, accuracy, or safety of any third-party AI model APIs or external services;
153
+ * The fitness of the software for any particular purpose.
154
+
155
+ **All risks arising from the use of this software are borne solely by the user.**
156
+
157
+ ## 3. Third-Party Plugins and Services
158
+
159
+ * AstrBot supports third-party plugins and external AI services;
160
+ * The AstrBot Team does **not audit, control, endorse, or guarantee** any third-party plugins, extensions, or services;
161
+ * Any risks, losses, data leaks, or legal consequences arising from the use of third-party plugins or services are solely the responsibility of the user;
162
+ * “Third-party plugins” refer to plugins that are not built into AstrBot. Built-in plugins are those whose implementation code is included in the AstrBotDevs/AstrBot repository. All plugins available in the plugin marketplace are third-party plugins.
163
+
164
+ ## 4. Usage and Content Restrictions
165
+
166
+ You agree not to use AstrBot for any of the following activities:
167
+
168
+ * Inputting, generating, distributing, or processing any illegal, extremist, violent, pornographic, hateful, abusive, or otherwise harmful content;
169
+ * Engaging in activities that violate the laws or regulations of your country or region, or any applicable international laws;
170
+ * Attempting to bypass, disable, weaken, or undermine the built-in safety mechanisms or content restrictions of the system;
171
+ * Any activities that infringe upon the legitimate rights and interests of others, harm the physical or mental well-being of yourself or others, or involve personal privacy or sensitive personal information.
172
+
173
+ ## 5. Intended Use
174
+
175
+ AstrBot is a **tool-oriented conversational and agent system** that provides limited human-like interaction capabilities under the principles of **safety, health, and friendliness**.
176
+
177
+ The primary goals of the project are to:
178
+
179
+ * Provide agent capabilities and automation assistance;
180
+ * Help users improve efficiency in work, study, and information processing;
181
+ * Offer a friendly human–computer interaction experience within reasonable boundaries;
182
+ * Support user growth and provide content beneficial to users’ physical and mental well-being.
183
+
184
+ ## 6. Safety Measures
185
+
186
+ The AstrBot Team has made **reasonable efforts** at both technical and policy levels to implement safety and content restriction mechanisms, guiding the system to produce healthy, friendly, and safe outputs.
187
+
188
+ However, please understand that:
189
+
190
+ * No system in the world can be guaranteed to be completely error-free, absolutely secure, or immune to misuse;
191
+ * Users remain responsible for properly configuring, supervising, and using the system.
192
+
193
+ If you wish to disable AstrBot’s default “Safety Mode,” please set `provider_settings.llm_safety_mode` to `False` in `cmd_config.json`. However, please note that disabling Safety Mode is not recommended and may lead to unsafe or inappropriate outputs. Any risks or consequences arising from disabling this feature are solely borne by the user, and the AstrBot Team assumes no responsibility.
194
+
195
+ ## 7. Mental Health Notice
196
+
197
+ If you experience psychological discomfort or emotional distress due to system outputs during use,
198
+ or if you are experiencing significant psychological stress, emotional instability, anxiety, or depression and are using this project for such reasons,
199
+ please prioritize seeking help from qualified professionals, such as psychologists, psychiatrists, or local mental health support services.
200
+
201
+ In case of emergency (for example, if there is a risk of self-harm or harm to others), please immediately contact your local emergency number or professional crisis support services.
202
+
203
+ ## 8. Metrics and Privacy
204
+
205
+ AstrBot may collect a limited amount of anonymous usage statistics to understand system usage, identify issues, and continuously improve the project.
206
+
207
+ Collected metrics are limited to basic technical indicators related to system operation and feature usage, such as feature usage frequency and error information.
208
+
209
+ AstrBot **does not collect, upload, or store your conversation content, message bodies, input text, or any personally identifiable or sensitive information**.
210
+
211
+ You may manually disable this feature by setting the environment variable `ASTRBOT_DISABLE_METRICS=1` to turn off anonymous metrics collection.
212
+
213
+ ## 9. Limitation of Liability
214
+
215
+ To the maximum extent permitted by law, the AstrBot Team shall not be liable for any direct or indirect losses arising from, including but not limited to:
216
+
217
+ * The use or inability to use this software;
218
+ * The use of third-party plugins or services;
219
+ * Generated content or system outputs;
220
+ * Data loss, service interruptions, or security incidents.
221
+
222
+ ## 10. Acceptance of Terms
223
+
224
+ By installing, running, modifying, or using AstrBot, you confirm that:
225
+
226
+ * You have read and understood this Notice;
227
+ * You agree to and accept all the terms stated above;
228
+ * You assume full responsibility for your use of the software.
229
+
230
+ If you do not agree with any part of this Notice, please do not use this project.
231
+
232
+ ## 11. License and Copyright
233
+
234
+ The source code, documentation, and related materials of AstrBot are protected by copyright laws and applicable regulations.
235
+
236
+ Subject to compliance with this Notice and the AGPLv3 license, AstrBot grants you a non-exclusive, non-transferable, non-sublicensable license to download, install, run, modify, and distribute this software.
237
+
238
+ Unless otherwise required by law or expressly stated in this Notice, the AstrBot Team reserves all rights not expressly granted.
239
+
240
+ ## 12. Governing Law
241
+
242
+ The interpretation and application of this Notice shall be governed by the laws and regulations applicable in your jurisdiction or the jurisdiction where the project is released.
243
+
244
+ If any provision of this Notice is held to be invalid or unenforceable, the remaining provisions shall remain in full force and effect.
FIRST_NOTICE.en-US.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Welcome to AstrBot
2
+
3
+ 🌟 Thank you for using AstrBot!
4
+
5
+ AstrBot is an Agentic AI assistant for personal and group chats, with support for multiple IM platforms and a wide range of built-in features. We hope it brings you an efficient and enjoyable experience. ❤️
6
+
7
+ Important notice:
8
+
9
+ AstrBot is a **free and open-source software project** protected by the AGPLv3 license. You can find the full source code and related resources on our [**official website**](https://astrbot.app) and [**GitHub**](https://github.com/astrbotdevs/astrbot).
10
+ As of now, AstrBot has **no commercial services of any kind**, and the official team **will never charge users any fees** under any name.
11
+
12
+ If anyone asks you to pay while using AstrBot, **you are likely being scammed**. Please request a refund immediately and report it to us by email.
13
+
14
+ 📮 Official email: [community@astrbot.app](mailto:community@astrbot.app)
FIRST_NOTICE.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## 欢迎使用 AstrBot
2
+
3
+ 🌟 感谢您使用 AstrBot!
4
+
5
+ AstrBot 是一款可接入多种 IM 平台的 Agentic AI 个人 / 群聊助手,内置多项强大功能,希望能为您带来高效、愉快的使用体验。❤️
6
+
7
+ 我们想特别说明:
8
+
9
+ AstrBot 是受 AGPLv3 开源协议保护的**免费开源软件项目**,您可以在[**官方网站**](https://astrbot.app)、[**GitHub**](https://github.com/astrbotdevs/astrbot) 上找到 AstrBot 的全部源代码及相关资源。
10
+ 截至目前,AstrBot 项目**未开展任何形式的商业化服务**,官方**不会以任何名义向用户收取费用**。
11
+
12
+ 如果您在使用 AstrBot 的过程中被要求付费,**表明您已经遭遇诈骗行为**。请立即向相关方申请退款,并及时通过邮件向我们反馈。
13
+
14
+ 📮 官方邮箱:[community@astrbot.app](mailto:community@astrbot.app)
LICENSE ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ our General Public Licenses are intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users.
19
+
20
+ When we speak of free software, we are referring to freedom, not
21
+ price. Our General Public Licenses are designed to make sure that you
22
+ have the freedom to distribute copies of free software (and charge for
23
+ them if you wish), that you receive source code or can get it if you
24
+ want it, that you can change the software or use pieces of it in new
25
+ free programs, and that you know you can do these things.
26
+
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ TERMS AND CONDITIONS
60
+
61
+ 0. Definitions.
62
+
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
64
+
65
+ "Copyright" also means copyright-like laws that apply to other kinds of
66
+ works, such as semiconductor masks.
67
+
68
+ "The Program" refers to any copyrightable work licensed under this
69
+ License. Each licensee is addressed as "you". "Licensees" and
70
+ "recipients" may be individuals or organizations.
71
+
72
+ To "modify" a work means to copy from or adapt all or part of the work
73
+ in a fashion requiring copyright permission, other than the making of an
74
+ exact copy. The resulting work is called a "modified version" of the
75
+ earlier work or a work "based on" the earlier work.
76
+
77
+ A "covered work" means either the unmodified Program or a work based
78
+ on the Program.
79
+
80
+ To "propagate" a work means to do anything with it that, without
81
+ permission, would make you directly or secondarily liable for
82
+ infringement under applicable copyright law, except executing it on a
83
+ computer or modifying a private copy. Propagation includes copying,
84
+ distribution (with or without modification), making available to the
85
+ public, and in some countries other activities as well.
86
+
87
+ To "convey" a work means any kind of propagation that enables other
88
+ parties to make or receive copies. Mere interaction with a user through
89
+ a computer network, with no transfer of a copy, is not conveying.
90
+
91
+ An interactive user interface displays "Appropriate Legal Notices"
92
+ to the extent that it includes a convenient and prominently visible
93
+ feature that (1) displays an appropriate copyright notice, and (2)
94
+ tells the user that there is no warranty for the work (except to the
95
+ extent that warranties are provided), that licensees may convey the
96
+ work under this License, and how to view a copy of this License. If
97
+ the interface presents a list of user commands or options, such as a
98
+ menu, a prominent item in the list meets this criterion.
99
+
100
+ 1. Source Code.
101
+
102
+ The "source code" for a work means the preferred form of the work
103
+ for making modifications to it. "Object code" means any non-source
104
+ form of a work.
105
+
106
+ A "Standard Interface" means an interface that either is an official
107
+ standard defined by a recognized standards body, or, in the case of
108
+ interfaces specified for a particular programming language, one that
109
+ is widely used among developers working in that language.
110
+
111
+ The "System Libraries" of an executable work include anything, other
112
+ than the work as a whole, that (a) is included in the normal form of
113
+ packaging a Major Component, but which is not part of that Major
114
+ Component, and (b) serves only to enable use of the work with that
115
+ Major Component, or to implement a Standard Interface for which an
116
+ implementation is available to the public in source code form. A
117
+ "Major Component", in this context, means a major essential component
118
+ (kernel, window system, and so on) of the specific operating system
119
+ (if any) on which the executable work runs, or a compiler used to
120
+ produce the work, or an object code interpreter used to run it.
121
+
122
+ The "Corresponding Source" for a work in object code form means all
123
+ the source code needed to generate, install, and (for an executable
124
+ work) run the object code and to modify the work, including scripts to
125
+ control those activities. However, it does not include the work's
126
+ System Libraries, or general-purpose tools or generally available free
127
+ programs which are used unmodified in performing those activities but
128
+ which are not part of the work. For example, Corresponding Source
129
+ includes interface definition files associated with source files for
130
+ the work, and the source code for shared libraries and dynamically
131
+ linked subprograms that the work is specifically designed to require,
132
+ such as by intimate data communication or control flow between those
133
+ subprograms and other parts of the work.
134
+
135
+ The Corresponding Source need not include anything that users
136
+ can regenerate automatically from other parts of the Corresponding
137
+ Source.
138
+
139
+ The Corresponding Source for a work in source code form is that
140
+ same work.
141
+
142
+ 2. Basic Permissions.
143
+
144
+ All rights granted under this License are granted for the term of
145
+ copyright on the Program, and are irrevocable provided the stated
146
+ conditions are met. This License explicitly affirms your unlimited
147
+ permission to run the unmodified Program. The output from running a
148
+ covered work is covered by this License only if the output, given its
149
+ content, constitutes a covered work. This License acknowledges your
150
+ rights of fair use or other equivalent, as provided by copyright law.
151
+
152
+ You may make, run and propagate covered works that you do not
153
+ convey, without conditions so long as your license otherwise remains
154
+ in force. You may convey covered works to others for the sole purpose
155
+ of having them make modifications exclusively for you, or provide you
156
+ with facilities for running those works, provided that you comply with
157
+ the terms of this License in conveying all material for which you do
158
+ not control copyright. Those thus making or running the covered works
159
+ for you must do so exclusively on your behalf, under your direction
160
+ and control, on terms that prohibit them from making any copies of
161
+ your copyrighted material outside their relationship with you.
162
+
163
+ Conveying under any other circumstances is permitted solely under
164
+ the conditions stated below. Sublicensing is not allowed; section 10
165
+ makes it unnecessary.
166
+
167
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168
+
169
+ No covered work shall be deemed part of an effective technological
170
+ measure under any applicable law fulfilling obligations under article
171
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172
+ similar laws prohibiting or restricting circumvention of such
173
+ measures.
174
+
175
+ When you convey a covered work, you waive any legal power to forbid
176
+ circumvention of technological measures to the extent such circumvention
177
+ is effected by exercising rights under this License with respect to
178
+ the covered work, and you disclaim any intention to limit operation or
179
+ modification of the work as a means of enforcing, against the work's
180
+ users, your or third parties' legal rights to forbid circumvention of
181
+ technological measures.
182
+
183
+ 4. Conveying Verbatim Copies.
184
+
185
+ You may convey verbatim copies of the Program's source code as you
186
+ receive it, in any medium, provided that you conspicuously and
187
+ appropriately publish on each copy an appropriate copyright notice;
188
+ keep intact all notices stating that this License and any
189
+ non-permissive terms added in accord with section 7 apply to the code;
190
+ keep intact all notices of the absence of any warranty; and give all
191
+ recipients a copy of this License along with the Program.
192
+
193
+ You may charge any price or no price for each copy that you convey,
194
+ and you may offer support or warranty protection for a fee.
195
+
196
+ 5. Conveying Modified Source Versions.
197
+
198
+ You may convey a work based on the Program, or the modifications to
199
+ produce it from the Program, in the form of source code under the
200
+ terms of section 4, provided that you also meet all of these conditions:
201
+
202
+ a) The work must carry prominent notices stating that you modified
203
+ it, and giving a relevant date.
204
+
205
+ b) The work must carry prominent notices stating that it is
206
+ released under this License and any conditions added under section
207
+ 7. This requirement modifies the requirement in section 4 to
208
+ "keep intact all notices".
209
+
210
+ c) You must license the entire work, as a whole, under this
211
+ License to anyone who comes into possession of a copy. This
212
+ License will therefore apply, along with any applicable section 7
213
+ additional terms, to the whole of the work, and all its parts,
214
+ regardless of how they are packaged. This License gives no
215
+ permission to license the work in any other way, but it does not
216
+ invalidate such permission if you have separately received it.
217
+
218
+ d) If the work has interactive user interfaces, each must display
219
+ Appropriate Legal Notices; however, if the Program has interactive
220
+ interfaces that do not display Appropriate Legal Notices, your
221
+ work need not make them do so.
222
+
223
+ A compilation of a covered work with other separate and independent
224
+ works, which are not by their nature extensions of the covered work,
225
+ and which are not combined with it such as to form a larger program,
226
+ in or on a volume of a storage or distribution medium, is called an
227
+ "aggregate" if the compilation and its resulting copyright are not
228
+ used to limit the access or legal rights of the compilation's users
229
+ beyond what the individual works permit. Inclusion of a covered work
230
+ in an aggregate does not cause this License to apply to the other
231
+ parts of the aggregate.
232
+
233
+ 6. Conveying Non-Source Forms.
234
+
235
+ You may convey a covered work in object code form under the terms
236
+ of sections 4 and 5, provided that you also convey the
237
+ machine-readable Corresponding Source under the terms of this License,
238
+ in one of these ways:
239
+
240
+ a) Convey the object code in, or embodied in, a physical product
241
+ (including a physical distribution medium), accompanied by the
242
+ Corresponding Source fixed on a durable physical medium
243
+ customarily used for software interchange.
244
+
245
+ b) Convey the object code in, or embodied in, a physical product
246
+ (including a physical distribution medium), accompanied by a
247
+ written offer, valid for at least three years and valid for as
248
+ long as you offer spare parts or customer support for that product
249
+ model, to give anyone who possesses the object code either (1) a
250
+ copy of the Corresponding Source for all the software in the
251
+ product that is covered by this License, on a durable physical
252
+ medium customarily used for software interchange, for a price no
253
+ more than your reasonable cost of physically performing this
254
+ conveying of source, or (2) access to copy the
255
+ Corresponding Source from a network server at no charge.
256
+
257
+ c) Convey individual copies of the object code with a copy of the
258
+ written offer to provide the Corresponding Source. This
259
+ alternative is allowed only occasionally and noncommercially, and
260
+ only if you received the object code with such an offer, in accord
261
+ with subsection 6b.
262
+
263
+ d) Convey the object code by offering access from a designated
264
+ place (gratis or for a charge), and offer equivalent access to the
265
+ Corresponding Source in the same way through the same place at no
266
+ further charge. You need not require recipients to copy the
267
+ Corresponding Source along with the object code. If the place to
268
+ copy the object code is a network server, the Corresponding Source
269
+ may be on a different server (operated by you or a third party)
270
+ that supports equivalent copying facilities, provided you maintain
271
+ clear directions next to the object code saying where to find the
272
+ Corresponding Source. Regardless of what server hosts the
273
+ Corresponding Source, you remain obligated to ensure that it is
274
+ available for as long as needed to satisfy these requirements.
275
+
276
+ e) Convey the object code using peer-to-peer transmission, provided
277
+ you inform other peers where the object code and Corresponding
278
+ Source of the work are being offered to the general public at no
279
+ charge under subsection 6d.
280
+
281
+ A separable portion of the object code, whose source code is excluded
282
+ from the Corresponding Source as a System Library, need not be
283
+ included in conveying the object code work.
284
+
285
+ A "User Product" is either (1) a "consumer product", which means any
286
+ tangible personal property which is normally used for personal, family,
287
+ or household purposes, or (2) anything designed or sold for incorporation
288
+ into a dwelling. In determining whether a product is a consumer product,
289
+ doubtful cases shall be resolved in favor of coverage. For a particular
290
+ product received by a particular user, "normally used" refers to a
291
+ typical or common use of that class of product, regardless of the status
292
+ of the particular user or of the way in which the particular user
293
+ actually uses, or expects or is expected to use, the product. A product
294
+ is a consumer product regardless of whether the product has substantial
295
+ commercial, industrial or non-consumer uses, unless such uses represent
296
+ the only significant mode of use of the product.
297
+
298
+ "Installation Information" for a User Product means any methods,
299
+ procedures, authorization keys, or other information required to install
300
+ and execute modified versions of a covered work in that User Product from
301
+ a modified version of its Corresponding Source. The information must
302
+ suffice to ensure that the continued functioning of the modified object
303
+ code is in no case prevented or interfered with solely because
304
+ modification has been made.
305
+
306
+ If you convey an object code work under this section in, or with, or
307
+ specifically for use in, a User Product, and the conveying occurs as
308
+ part of a transaction in which the right of possession and use of the
309
+ User Product is transferred to the recipient in perpetuity or for a
310
+ fixed term (regardless of how the transaction is characterized), the
311
+ Corresponding Source conveyed under this section must be accompanied
312
+ by the Installation Information. But this requirement does not apply
313
+ if neither you nor any third party retains the ability to install
314
+ modified object code on the User Product (for example, the work has
315
+ been installed in ROM).
316
+
317
+ The requirement to provide Installation Information does not include a
318
+ requirement to continue to provide support service, warranty, or updates
319
+ for a work that has been modified or installed by the recipient, or for
320
+ the User Product in which it has been modified or installed. Access to a
321
+ network may be denied when the modification itself materially and
322
+ adversely affects the operation of the network or violates the rules and
323
+ protocols for communication across the network.
324
+
325
+ Corresponding Source conveyed, and Installation Information provided,
326
+ in accord with this section must be in a format that is publicly
327
+ documented (and with an implementation available to the public in
328
+ source code form), and must require no special password or key for
329
+ unpacking, reading or copying.
330
+
331
+ 7. Additional Terms.
332
+
333
+ "Additional permissions" are terms that supplement the terms of this
334
+ License by making exceptions from one or more of its conditions.
335
+ Additional permissions that are applicable to the entire Program shall
336
+ be treated as though they were included in this License, to the extent
337
+ that they are valid under applicable law. If additional permissions
338
+ apply only to part of the Program, that part may be used separately
339
+ under those permissions, but the entire Program remains governed by
340
+ this License without regard to the additional permissions.
341
+
342
+ When you convey a copy of a covered work, you may at your option
343
+ remove any additional permissions from that copy, or from any part of
344
+ it. (Additional permissions may be written to require their own
345
+ removal in certain cases when you modify the work.) You may place
346
+ additional permissions on material, added by you to a covered work,
347
+ for which you have or can give appropriate copyright permission.
348
+
349
+ Notwithstanding any other provision of this License, for material you
350
+ add to a covered work, you may (if authorized by the copyright holders of
351
+ that material) supplement the terms of this License with terms:
352
+
353
+ a) Disclaiming warranty or limiting liability differently from the
354
+ terms of sections 15 and 16 of this License; or
355
+
356
+ b) Requiring preservation of specified reasonable legal notices or
357
+ author attributions in that material or in the Appropriate Legal
358
+ Notices displayed by works containing it; or
359
+
360
+ c) Prohibiting misrepresentation of the origin of that material, or
361
+ requiring that modified versions of such material be marked in
362
+ reasonable ways as different from the original version; or
363
+
364
+ d) Limiting the use for publicity purposes of names of licensors or
365
+ authors of the material; or
366
+
367
+ e) Declining to grant rights under trademark law for use of some
368
+ trade names, trademarks, or service marks; or
369
+
370
+ f) Requiring indemnification of licensors and authors of that
371
+ material by anyone who conveys the material (or modified versions of
372
+ it) with contractual assumptions of liability to the recipient, for
373
+ any liability that these contractual assumptions directly impose on
374
+ those licensors and authors.
375
+
376
+ All other non-permissive additional terms are considered "further
377
+ restrictions" within the meaning of section 10. If the Program as you
378
+ received it, or any part of it, contains a notice stating that it is
379
+ governed by this License along with a term that is a further
380
+ restriction, you may remove that term. If a license document contains
381
+ a further restriction but permits relicensing or conveying under this
382
+ License, you may add to a covered work material governed by the terms
383
+ of that license document, provided that the further restriction does
384
+ not survive such relicensing or conveying.
385
+
386
+ If you add terms to a covered work in accord with this section, you
387
+ must place, in the relevant source files, a statement of the
388
+ additional terms that apply to those files, or a notice indicating
389
+ where to find the applicable terms.
390
+
391
+ Additional terms, permissive or non-permissive, may be stated in the
392
+ form of a separately written license, or stated as exceptions;
393
+ the above requirements apply either way.
394
+
395
+ 8. Termination.
396
+
397
+ You may not propagate or modify a covered work except as expressly
398
+ provided under this License. Any attempt otherwise to propagate or
399
+ modify it is void, and will automatically terminate your rights under
400
+ this License (including any patent licenses granted under the third
401
+ paragraph of section 11).
402
+
403
+ However, if you cease all violation of this License, then your
404
+ license from a particular copyright holder is reinstated (a)
405
+ provisionally, unless and until the copyright holder explicitly and
406
+ finally terminates your license, and (b) permanently, if the copyright
407
+ holder fails to notify you of the violation by some reasonable means
408
+ prior to 60 days after the cessation.
409
+
410
+ Moreover, your license from a particular copyright holder is
411
+ reinstated permanently if the copyright holder notifies you of the
412
+ violation by some reasonable means, this is the first time you have
413
+ received notice of violation of this License (for any work) from that
414
+ copyright holder, and you cure the violation prior to 30 days after
415
+ your receipt of the notice.
416
+
417
+ Termination of your rights under this section does not terminate the
418
+ licenses of parties who have received copies or rights from you under
419
+ this License. If your rights have been terminated and not permanently
420
+ reinstated, you do not qualify to receive new licenses for the same
421
+ material under section 10.
422
+
423
+ 9. Acceptance Not Required for Having Copies.
424
+
425
+ You are not required to accept this License in order to receive or
426
+ run a copy of the Program. Ancillary propagation of a covered work
427
+ occurring solely as a consequence of using peer-to-peer transmission
428
+ to receive a copy likewise does not require acceptance. However,
429
+ nothing other than this License grants you permission to propagate or
430
+ modify any covered work. These actions infringe copyright if you do
431
+ not accept this License. Therefore, by modifying or propagating a
432
+ covered work, you indicate your acceptance of this License to do so.
433
+
434
+ 10. Automatic Licensing of Downstream Recipients.
435
+
436
+ Each time you convey a covered work, the recipient automatically
437
+ receives a license from the original licensors, to run, modify and
438
+ propagate that work, subject to this License. You are not responsible
439
+ for enforcing compliance by third parties with this License.
440
+
441
+ An "entity transaction" is a transaction transferring control of an
442
+ organization, or substantially all assets of one, or subdividing an
443
+ organization, or merging organizations. If propagation of a covered
444
+ work results from an entity transaction, each party to that
445
+ transaction who receives a copy of the work also receives whatever
446
+ licenses to the work the party's predecessor in interest had or could
447
+ give under the previous paragraph, plus a right to possession of the
448
+ Corresponding Source of the work from the predecessor in interest, if
449
+ the predecessor has it or can get it with reasonable efforts.
450
+
451
+ You may not impose any further restrictions on the exercise of the
452
+ rights granted or affirmed under this License. For example, you may
453
+ not impose a license fee, royalty, or other charge for exercise of
454
+ rights granted under this License, and you may not initiate litigation
455
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
456
+ any patent claim is infringed by making, using, selling, offering for
457
+ sale, or importing the Program or any portion of it.
458
+
459
+ 11. Patents.
460
+
461
+ A "contributor" is a copyright holder who authorizes use under this
462
+ License of the Program or a work on which the Program is based. The
463
+ work thus licensed is called the contributor's "contributor version".
464
+
465
+ A contributor's "essential patent claims" are all patent claims
466
+ owned or controlled by the contributor, whether already acquired or
467
+ hereafter acquired, that would be infringed by some manner, permitted
468
+ by this License, of making, using, or selling its contributor version,
469
+ but do not include claims that would be infringed only as a
470
+ consequence of further modification of the contributor version. For
471
+ purposes of this definition, "control" includes the right to grant
472
+ patent sublicenses in a manner consistent with the requirements of
473
+ this License.
474
+
475
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
476
+ patent license under the contributor's essential patent claims, to
477
+ make, use, sell, offer for sale, import and otherwise run, modify and
478
+ propagate the contents of its contributor version.
479
+
480
+ In the following three paragraphs, a "patent license" is any express
481
+ agreement or commitment, however denominated, not to enforce a patent
482
+ (such as an express permission to practice a patent or covenant not to
483
+ sue for patent infringement). To "grant" such a patent license to a
484
+ party means to make such an agreement or commitment not to enforce a
485
+ patent against the party.
486
+
487
+ If you convey a covered work, knowingly relying on a patent license,
488
+ and the Corresponding Source of the work is not available for anyone
489
+ to copy, free of charge and under the terms of this License, through a
490
+ publicly available network server or other readily accessible means,
491
+ then you must either (1) cause the Corresponding Source to be so
492
+ available, or (2) arrange to deprive yourself of the benefit of the
493
+ patent license for this particular work, or (3) arrange, in a manner
494
+ consistent with the requirements of this License, to extend the patent
495
+ license to downstream recipients. "Knowingly relying" means you have
496
+ actual knowledge that, but for the patent license, your conveying the
497
+ covered work in a country, or your recipient's use of the covered work
498
+ in a country, would infringe one or more identifiable patents in that
499
+ country that you have reason to believe are valid.
500
+
501
+ If, pursuant to or in connection with a single transaction or
502
+ arrangement, you convey, or propagate by procuring conveyance of, a
503
+ covered work, and grant a patent license to some of the parties
504
+ receiving the covered work authorizing them to use, propagate, modify
505
+ or convey a specific copy of the covered work, then the patent license
506
+ you grant is automatically extended to all recipients of the covered
507
+ work and works based on it.
508
+
509
+ A patent license is "discriminatory" if it does not include within
510
+ the scope of its coverage, prohibits the exercise of, or is
511
+ conditioned on the non-exercise of one or more of the rights that are
512
+ specifically granted under this License. You may not convey a covered
513
+ work if you are a party to an arrangement with a third party that is
514
+ in the business of distributing software, under which you make payment
515
+ to the third party based on the extent of your activity of conveying
516
+ the work, and under which the third party grants, to any of the
517
+ parties who would receive the covered work from you, a discriminatory
518
+ patent license (a) in connection with copies of the covered work
519
+ conveyed by you (or copies made from those copies), or (b) primarily
520
+ for and in connection with specific products or compilations that
521
+ contain the covered work, unless you entered into that arrangement,
522
+ or that patent license was granted, prior to 28 March 2007.
523
+
524
+ Nothing in this License shall be construed as excluding or limiting
525
+ any implied license or other defenses to infringement that may
526
+ otherwise be available to you under applicable patent law.
527
+
528
+ 12. No Surrender of Others' Freedom.
529
+
530
+ If conditions are imposed on you (whether by court order, agreement or
531
+ otherwise) that contradict the conditions of this License, they do not
532
+ excuse you from the conditions of this License. If you cannot convey a
533
+ covered work so as to satisfy simultaneously your obligations under this
534
+ License and any other pertinent obligations, then as a consequence you may
535
+ not convey it at all. For example, if you agree to terms that obligate you
536
+ to collect a royalty for further conveying from those to whom you convey
537
+ the Program, the only way you could satisfy both those terms and this
538
+ License would be to refrain entirely from conveying the Program.
539
+
540
+ 13. Remote Network Interaction; Use with the GNU General Public License.
541
+
542
+ Notwithstanding any other provision of this License, if you modify the
543
+ Program, your modified version must prominently offer all users
544
+ interacting with it remotely through a computer network (if your version
545
+ supports such interaction) an opportunity to receive the Corresponding
546
+ Source of your version by providing access to the Corresponding Source
547
+ from a network server at no charge, through some standard or customary
548
+ means of facilitating copying of software. This Corresponding Source
549
+ shall include the Corresponding Source for any work covered by version 3
550
+ of the GNU General Public License that is incorporated pursuant to the
551
+ following paragraph.
552
+
553
+ Notwithstanding any other provision of this License, you have
554
+ permission to link or combine any covered work with a work licensed
555
+ under version 3 of the GNU General Public License into a single
556
+ combined work, and to convey the resulting work. The terms of this
557
+ License will continue to apply to the part which is the covered work,
558
+ but the work with which it is combined will remain governed by version
559
+ 3 of the GNU General Public License.
560
+
561
+ 14. Revised Versions of this License.
562
+
563
+ The Free Software Foundation may publish revised and/or new versions of
564
+ the GNU Affero General Public License from time to time. Such new versions
565
+ will be similar in spirit to the present version, but may differ in detail to
566
+ address new problems or concerns.
567
+
568
+ Each version is given a distinguishing version number. If the
569
+ Program specifies that a certain numbered version of the GNU Affero General
570
+ Public License "or any later version" applies to it, you have the
571
+ option of following the terms and conditions either of that numbered
572
+ version or of any later version published by the Free Software
573
+ Foundation. If the Program does not specify a version number of the
574
+ GNU Affero General Public License, you may choose any version ever published
575
+ by the Free Software Foundation.
576
+
577
+ If the Program specifies that a proxy can decide which future
578
+ versions of the GNU Affero General Public License can be used, that proxy's
579
+ public statement of acceptance of a version permanently authorizes you
580
+ to choose that version for the Program.
581
+
582
+ Later license versions may give you additional or different
583
+ permissions. However, no additional obligations are imposed on any
584
+ author or copyright holder as a result of your choosing to follow a
585
+ later version.
586
+
587
+ 15. Disclaimer of Warranty.
588
+
589
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597
+
598
+ 16. Limitation of Liability.
599
+
600
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608
+ SUCH DAMAGES.
609
+
610
+ 17. Interpretation of Sections 15 and 16.
611
+
612
+ If the disclaimer of warranty and limitation of liability provided
613
+ above cannot be given local legal effect according to their terms,
614
+ reviewing courts shall apply local law that most closely approximates
615
+ an absolute waiver of all civil liability in connection with the
616
+ Program, unless a warranty or assumption of liability accompanies a
617
+ copy of the Program in return for a fee.
618
+
619
+ END OF TERMS AND CONDITIONS
620
+
621
+ How to Apply These Terms to Your New Programs
622
+
623
+ If you develop a new program, and you want it to be of the greatest
624
+ possible use to the public, the best way to achieve this is to make it
625
+ free software which everyone can redistribute and change under these terms.
626
+
627
+ To do so, attach the following notices to the program. It is safest
628
+ to attach them to the start of each source file to most effectively
629
+ state the exclusion of warranty; and each file should have at least
630
+ the "copyright" line and a pointer to where the full notice is found.
631
+
632
+ AstrBot is a llm-powered chatbot and develop framework.
633
+ Copyright (C) 2022-2099 Soulter
634
+
635
+ This program is free software: you can redistribute it and/or modify
636
+ it under the terms of the GNU Affero General Public License as published
637
+ by the Free Software Foundation, either version 3 of the License, or
638
+ (at your option) any later version.
639
+
640
+ This program is distributed in the hope that it will be useful,
641
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
642
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643
+ GNU Affero General Public License for more details.
644
+
645
+ You should have received a copy of the GNU Affero General Public License
646
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
647
+
648
+ Also add information on how to contact you by electronic and paper mail.
649
+
650
+ If your software can interact with users remotely through a computer
651
+ network, you should also make sure that it provides a way for users to
652
+ get its source. For example, if your program is a web application, its
653
+ interface could display a "Source" link that leads users to an archive
654
+ of the code. There are many ways you could offer source, and different
655
+ solutions will be better for different programs; see section 13 for the
656
+ specific requirements.
657
+
658
+ You should also get your employer (if you work as a programmer) or school,
659
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
660
+ For more information on this, and how to apply and follow the GNU AGPL, see
661
+ <https://www.gnu.org/licenses/>.
Makefile ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .PHONY: worktree worktree-add worktree-rm pr-test-neo pr-test-full pr-test-full-fast
2
+
3
+ WORKTREE_DIR ?= ../astrbot_worktree
4
+ BRANCH ?= $(word 2,$(MAKECMDGOALS))
5
+ BASE ?= $(word 3,$(MAKECMDGOALS))
6
+ BASE ?= master
7
+
8
+ worktree:
9
+ @echo "Usage:"
10
+ @echo " make worktree-add <branch> [base-branch]"
11
+ @echo " make worktree-rm <branch>"
12
+
13
+ worktree-add:
14
+ ifeq ($(strip $(BRANCH)),)
15
+ $(error Branch name required. Usage: make worktree-add <branch> [base-branch])
16
+ endif
17
+ @mkdir -p $(WORKTREE_DIR)
18
+ git worktree add $(WORKTREE_DIR)/$(BRANCH) -b $(BRANCH) $(BASE)
19
+
20
+ worktree-rm:
21
+ ifeq ($(strip $(BRANCH)),)
22
+ $(error Branch name required. Usage: make worktree-rm <branch>)
23
+ endif
24
+ @if [ -d "$(WORKTREE_DIR)/$(BRANCH)" ]; then \
25
+ git worktree remove $(WORKTREE_DIR)/$(BRANCH); \
26
+ else \
27
+ echo "Worktree $(WORKTREE_DIR)/$(BRANCH) not found."; \
28
+ fi
29
+
30
+ pr-test-neo:
31
+ ./scripts/pr_test_env.sh --profile neo
32
+
33
+ pr-test-full:
34
+ ./scripts/pr_test_env.sh --profile full
35
+
36
+ pr-test-full-fast:
37
+ ./scripts/pr_test_env.sh --profile full --skip-sync --no-dashboard
38
+
39
+ # Swallow extra args (branch/base) so make doesn't treat them as targets
40
+ %:
41
+ @true
README.md CHANGED
@@ -1,10 +1,286 @@
1
  ---
2
- title: Astrbot
3
- emoji: 🌖
4
- colorFrom: purple
5
- colorTo: green
6
- sdk: docker
 
 
 
7
  pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: AstrBot
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: "4.0.0"
8
+ python_version: "3.12"
9
+ app_file: app.py
10
  pinned: false
11
  ---
12
 
13
+ ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)
14
+
15
+ <div align="center">
16
+
17
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh.md">简体中文</a> |
18
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh-TW.md">繁體中文</a> |
19
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</a> |
20
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_fr.md">Français</a> |
21
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ru.md">Русский</a>
22
+
23
+ <br>
24
+
25
+ <div>
26
+ <a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
27
+ <a href="https://hellogithub.com/repository/AstrBotDevs/AstrBot" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d127d50cd5e54c5382328acc3bb25483&claim_uid=ZO9by7qCXgSd6Lp&t=2" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
28
+ </div>
29
+
30
+ <br>
31
+
32
+ <div>
33
+ <img src="https://img.shields.io/github/v/release/AstrBotDevs/AstrBot?color=76bad9" href="https://github.com/AstrBotDevs/AstrBot/releases/latest">
34
+ <img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
35
+ <img src="https://deepwiki.com/badge.svg" href="https://deepwiki.com/AstrBotDevs/AstrBot">
36
+ <a href="https://zread.ai/AstrBotDevs/AstrBot" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
37
+ <a href="https://hub.docker.com/r/soulter/astrbot"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/soulter/astrbot.svg?color=76bad9"/></a>
38
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%20plugins&label=Marketplace&cacheSeconds=3600">
39
+ <img src="https://gitcode.com/Soulter/AstrBot/star/badge.svg" href="https://gitcode.com/Soulter/AstrBot">
40
+ </div>
41
+
42
+ <br>
43
+
44
+ <a href="https://astrbot.app/">Documentation</a> |
45
+ <a href="https://blog.astrbot.app/">Blog</a> |
46
+ <a href="https://astrbot.featurebase.app/roadmap">Roadmap</a> |
47
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">Issue Tracker</a>
48
+ <a href="mailto:community@astrbot.app">Email Support</a>
49
+ </div>
50
+
51
+ AstrBot is an open-source all-in-one Agent chatbot platform that integrates with mainstream instant messaging apps. It provides reliable and scalable conversational AI infrastructure for individuals, developers, and teams. Whether you're building a personal AI companion, intelligent customer service, automation assistant, or enterprise knowledge base, AstrBot enables you to quickly build production-ready AI applications within your IM platform workflows.
52
+
53
+ ![screenshot_1 5x_postspark_2026-02-27_22-37-45](https://github.com/user-attachments/assets/f17cdb90-52d7-4773-be2e-ff64b566af6b)
54
+
55
+ ## Key Features
56
+
57
+ 1. 💯 Free & Open Source.
58
+ 2. ✨ AI LLM Conversations, Multimodal, Agent, MCP, Skills, Knowledge Base, Persona Settings, Auto Context Compression.
59
+ 3. 🤖 Supports integration with Dify, Alibaba Cloud Bailian, Coze, and other agent platforms.
60
+ 4. 🌐 Multi-Platform: QQ, WeChat Work, Feishu, DingTalk, WeChat Official Accounts, Telegram, Slack, and [more](#supported-messaging-platforms).
61
+ 5. 📦 Plugin Extensions with 1000+ plugins available for one-click installation.
62
+ 6. 🛡️ [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) for isolated, safe execution of code, shell calls, and session-level resource reuse.
63
+ 7. 💻 WebUI Support.
64
+ 8. 🌈 Web ChatUI Support with built-in agent sandbox and web search.
65
+ 9. 🌐 Internationalization (i18n) Support.
66
+
67
+ <br>
68
+
69
+ <table align="center">
70
+ <tr align="center">
71
+ <th>💙 Role-playing & Emotional Companionship</th>
72
+ <th>✨ Proactive Agent</th>
73
+ <th>🚀 General Agentic Capabilities</th>
74
+ <th>🧩 1000+ Community Plugins</th>
75
+ </tr>
76
+ <tr>
77
+ <td align="center"><p align="center"><img width="984" height="1746" alt="99b587c5d35eea09d84f33e6cf6cfd4f" src="https://github.com/user-attachments/assets/89196061-3290-458d-b51f-afa178049f84" /></p></td>
78
+ <td align="center"><p align="center"><img width="976" height="1612" alt="c449acd838c41d0915cc08a3824025b1" src="https://github.com/user-attachments/assets/f75368b4-e022-41dc-a9e0-131c3e73e32e" /></p></td>
79
+ <td align="center"><p align="center"><img width="974" height="1732" alt="image" src="https://github.com/user-attachments/assets/e22a3968-87d7-4708-a7cd-e7f198c7c32e" /></p></td>
80
+ <td align="center"><p align="center"><img width="976" height="1734" alt="image" src="https://github.com/user-attachments/assets/0952b395-6b4a-432a-8a50-c294b7f89750" /></p></td>
81
+ </tr>
82
+ </table>
83
+
84
+ ## Quick Start
85
+
86
+ ### One-Click Deployment
87
+
88
+ For users who want to quickly experience AstrBot, are familiar with command-line usage, and can install a `uv` environment on their own, we recommend the `uv` one-click deployment method ⚡️:
89
+
90
+ ```bash
91
+ uv tool install astrbot
92
+ astrbot init # Only execute this command for the first time to initialize the environment
93
+ astrbot run
94
+ ```
95
+
96
+ > Requires [uv](https://docs.astral.sh/uv/) to be installed.
97
+
98
+ > [!NOTE]
99
+ > For macOS user: due to macOS security checks, the first run of the `astrbot` command may take longer (about 10-20s).
100
+
101
+ Update `astrbot`:
102
+
103
+ ```bash
104
+ uv tool upgrade astrbot
105
+ ```
106
+
107
+ ### Docker Deployment
108
+
109
+ For users familiar with containers and looking for a more stable, production-ready deployment method, we recommend deploying AstrBot with Docker / Docker Compose.
110
+
111
+ Please refer to the official documentation: [Deploy AstrBot with Docker](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot).
112
+
113
+ ### Deploy on RainYun
114
+
115
+ For users who want one-click deployment and do not want to manage servers themselves, we recommend RainYun's one-click cloud deployment service ☁️:
116
+
117
+ [![Deploy on RainYun](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-en.svg)](https://app.rainyun.com/apps/rca/store/5994?ref=NjU1ODg0)
118
+
119
+ ### Desktop Application Deployment
120
+
121
+ For users who want to use AstrBot on desktop and mainly use ChatUI, we recommend AstrBot App.
122
+
123
+ Visit [AstrBot-desktop](https://github.com/AstrBotDevs/AstrBot-desktop) to download and install; this method is designed for desktop usage and is not recommended for server scenarios.
124
+
125
+ ### Launcher Deployment
126
+
127
+ For desktop users who also want fast deployment and isolated multi-instance usage, we recommend AstrBot Launcher.
128
+
129
+ Visit [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) to download and install.
130
+
131
+ ### Deploy on Replit
132
+
133
+ Replit deployment is maintained by the community and is suitable for online demos and lightweight trials.
134
+
135
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
136
+
137
+ ### AUR
138
+
139
+ AUR deployment targets Arch Linux users who prefer installing AstrBot through the system package workflow.
140
+
141
+ Run the command below to install `astrbot-git`, then start AstrBot in your local environment.
142
+
143
+ ```bash
144
+ yay -S astrbot-git
145
+ ```
146
+
147
+ **More deployment methods**
148
+
149
+ If you need panel-based management or deeper customization, see [BT-Panel Deployment](https://astrbot.app/deploy/astrbot/btpanel.html) for BT Panel app-store setup, [1Panel Deployment](https://astrbot.app/deploy/astrbot/1panel.html) for 1Panel app-market deployment, [CasaOS Deployment](https://astrbot.app/deploy/astrbot/casaos.html) for NAS/home-server visual deployment, and [Manual Deployment](https://astrbot.app/deploy/astrbot/cli.html) for fully custom source-based installation with `uv`.
150
+
151
+ ## Supported Messaging Platforms
152
+
153
+ Connect AstrBot to your favorite chat platform.
154
+
155
+ | Platform | Maintainer |
156
+ |---------|---------------|
157
+ | QQ | Official |
158
+ | OneBot v11 protocol implementation | Official |
159
+ | Telegram | Official |
160
+ | Wecom & Wecom AI Bot | Official |
161
+ | WeChat Official Accounts | Official |
162
+ | Feishu (Lark) | Official |
163
+ | DingTalk | Official |
164
+ | Slack | Official |
165
+ | Discord | Official |
166
+ | LINE | Official |
167
+ | Satori | Official |
168
+ | Misskey | Official |
169
+ | WhatsApp (Coming Soon) | Official |
170
+ | [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter) | Community |
171
+ | [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | Community |
172
+ | [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | Community |
173
+
174
+ ## Supported Model Services
175
+
176
+ | Service | Type |
177
+ |---------|---------------|
178
+ | OpenAI and Compatible Services | LLM Services |
179
+ | Anthropic | LLM Services |
180
+ | Google Gemini | LLM Services |
181
+ | Moonshot AI | LLM Services |
182
+ | Zhipu AI | LLM Services |
183
+ | DeepSeek | LLM Services |
184
+ | Ollama (Self-hosted) | LLM Services |
185
+ | LM Studio (Self-hosted) | LLM Services |
186
+ | [AIHubMix](https://aihubmix.com/?aff=4bfH) | LLM Services (API Gateway, supports all models) |
187
+ | [CompShare](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | LLM Services |
188
+ | [302.AI](https://share.302.ai/rr1M3l) | LLM Services |
189
+ | [TokenPony](https://www.tokenpony.cn/3YPyf) | LLM Services |
190
+ | [SiliconFlow](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot) | LLM Services |
191
+ | [PPIO Cloud](https://ppio.com/user/register?invited_by=AIOONE) | LLM Services |
192
+ | ModelScope | LLM Services |
193
+ | OneAPI | LLM Services |
194
+ | Dify | LLMOps Platforms |
195
+ | Alibaba Cloud Bailian Applications | LLMOps Platforms |
196
+ | Coze | LLMOps Platforms |
197
+ | OpenAI Whisper | Speech-to-Text Services |
198
+ | SenseVoice | Speech-to-Text Services |
199
+ | OpenAI TTS | Text-to-Speech Services |
200
+ | Gemini TTS | Text-to-Speech Services |
201
+ | GPT-Sovits-Inference | Text-to-Speech Services |
202
+ | GPT-Sovits | Text-to-Speech Services |
203
+ | FishAudio | Text-to-Speech Services |
204
+ | Edge TTS | Text-to-Speech Services |
205
+ | Alibaba Cloud Bailian TTS | Text-to-Speech Services |
206
+ | Azure TTS | Text-to-Speech Services |
207
+ | Minimax TTS | Text-to-Speech Services |
208
+ | Volcano Engine TTS | Text-to-Speech Services |
209
+
210
+ ## ❤️ Sponsors
211
+
212
+ <p align="center">
213
+ <img alt="sponsors" src="https://sponsors.astrbot.app/?v=1">
214
+ </p>
215
+
216
+
217
+ ## ❤️ Contributing
218
+
219
+ Issues and Pull Requests are always welcome! Feel free to submit your changes to this project :)
220
+
221
+ ### How to Contribute
222
+
223
+ You can contribute by reviewing issues or helping with pull request reviews. Any issues or PRs are welcome to encourage community participation. Of course, these are just suggestions—you can contribute in any way you like. For adding new features, please discuss through an Issue first.
224
+
225
+ ### Development Environment
226
+
227
+ AstrBot uses `ruff` for code formatting and linting.
228
+
229
+ ```bash
230
+ git clone https://github.com/AstrBotDevs/AstrBot
231
+ pip install pre-commit
232
+ pre-commit install
233
+ ```
234
+
235
+
236
+ ## 🌍 Community
237
+
238
+ ### QQ Groups
239
+
240
+ - Group 9: 1076659624 (New)
241
+ - Group 10: 1078079676 (New)
242
+ - Group 1: 322154837
243
+ - Group 3: 630166526
244
+ - Group 5: 822130018
245
+ - Group 6: 753075035
246
+ - Group 7: 743746109
247
+ - Group 8: 1030353265
248
+
249
+ - Developer Group(Chit-chat): 975206796
250
+ - Developer Group(Formal): 1039761811
251
+
252
+ ### Discord Server
253
+
254
+ <a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
255
+
256
+ ## ❤️ Special Thanks
257
+
258
+ Special thanks to all Contributors and plugin developers for their contributions to AstrBot ❤️
259
+
260
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
261
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot&max=200&columns=14" />
262
+ </a>
263
+
264
+ Additionally, the birth of this project would not have been possible without the help of the following open-source projects:
265
+
266
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - The amazing cat framework
267
+
268
+ ## ⭐ Star History
269
+
270
+ > [!TIP]
271
+ > If this project has helped you in your life or work, or if you're interested in its future development, please give the project a Star. It's the driving force behind maintaining this open-source project <3
272
+
273
+ <div align="center">
274
+
275
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
276
+
277
+ </div>
278
+
279
+ <div align="center">
280
+
281
+ _Companionship and capability should never be at odds. What we aim to create is a robot that can understand emotions, provide genuine companionship, and reliably accomplish tasks._
282
+
283
+ _私は、高性能ですから!_
284
+
285
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
286
+ </div>
README_fr.md ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)
2
+
3
+ <div align="center">
4
+
5
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh.md">简体中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README.md">English</a> |
7
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh-TW.md">繁體中文</a> |
8
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</a> |
9
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ru.md">Русский</a>
10
+
11
+ <br>
12
+
13
+ <div>
14
+ <a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
15
+ <a href="https://hellogithub.com/repository/AstrBotDevs/AstrBot" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d127d50cd5e54c5382328acc3bb25483&claim_uid=ZO9by7qCXgSd6Lp&t=2" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
16
+ </div>
17
+
18
+ <br>
19
+
20
+ <div>
21
+ <img src="https://img.shields.io/github/v/release/AstrBotDevs/AstrBot?color=76bad9" href="https://github.com/AstrBotDevs/AstrBot/releases/latest">
22
+ <img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
23
+ <img src="https://deepwiki.com/badge.svg" href="https://deepwiki.com/AstrBotDevs/AstrBot">
24
+ <a href="https://zread.ai/AstrBotDevs/AstrBot" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFZIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
25
+ <a href="https://hub.docker.com/r/soulter/astrbot"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/soulter/astrbot.svg?color=76bad9"/></a>
26
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%20&label=Marketplace&cacheSeconds=3600">
27
+ <img src="https://gitcode.com/Soulter/AstrBot/star/badge.svg" href="https://gitcode.com/Soulter/AstrBot">
28
+ </div>
29
+
30
+ <br>
31
+
32
+ <a href="https://astrbot.app/">Documentation</a> |
33
+ <a href="https://blog.astrbot.app/">Blog</a> |
34
+ <a href="https://astrbot.featurebase.app/roadmap">Feuille de route</a> |
35
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">Signaler un problème</a>
36
+ <a href="mailto:community@astrbot.app">Email Support</a>
37
+ </div>
38
+
39
+ AstrBot est une plateforme de chatbot Agent tout-en-un open source qui s'intègre aux principales applications de messagerie instantanée. Elle fournit une infrastructure d'IA conversationnelle fiable et évolutive pour les particuliers, les développeurs et les équipes. Que vous construisiez un compagnon IA personnel, un service client intelligent, un assistant d'automatisation ou une base de connaissances d'entreprise, AstrBot vous permet de créer rapidement des applications d'IA prêtes pour la production dans les flux de travail de votre plateforme de messagerie.
40
+
41
+ ![521771166-00782c4c-4437-4d97-aabc-605e3738da5c (1)](https://github.com/user-attachments/assets/61e7b505-f7db-41aa-a75f-4ef8f079b8ba)
42
+
43
+ ## Fonctionnalités principales
44
+
45
+ 1. 💯 Gratuit & Open Source.
46
+ 2. ✨ Dialogue avec de grands modèles d'IA, multimodal, Agent, MCP, Skills, Base de connaissances, Paramétrage de personnalité, compression automatique des dialogues.
47
+ 3. 🤖 Prise en charge de l'accès aux plateformes d'Agents telles que Dify, Alibaba Cloud Bailian, Coze, etc.
48
+ 4. 🌐 Multiplateforme : supporte QQ, WeChat Enterprise, Feishu, DingTalk, Comptes officiels WeChat, Telegram, Slack et [plus encore](#plateformes-de-messagerie-prises-en-charge).
49
+ 5. 📦 Extension par plugins, avec plus de 1000 plugins déjà disponibles pour une installation en un clic.
50
+ 6. 🛡️ Environnement isolé [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) : exécution sécurisée de code, appels Shell et réutilisation des ressources au niveau de la session.
51
+ 7. 💻 Support WebUI.
52
+ 8. 🌈 Support Web ChatUI, avec sandbox d'agent intégrée, recherche web, etc.
53
+ 9. 🌐 Support de l'internationalisation (i18n).
54
+
55
+ <br>
56
+
57
+ <table align="center">
58
+ <tr align="center">
59
+ <th>💙 Jeux de rôle & Accompagnement émotionnel</th>
60
+ <th>✨ Agent proactif</th>
61
+ <th>🚀 Capacités agentiques générales</th>
62
+ <th>🧩 1000+ Plugins de communauté</th>
63
+ </tr>
64
+ <tr>
65
+ <td align="center"><p align="center"><img width="984" height="1746" alt="99b587c5d35eea09d84f33e6cf6cfd4f" src="https://github.com/user-attachments/assets/89196061-3290-458d-b51f-afa178049f84" /></p></td>
66
+ <td align="center"><p align="center"><img width="976" height="1612" alt="c449acd838c41d0915cc08a3824025b1" src="https://github.com/user-attachments/assets/f75368b4-e022-41dc-a9e0-131c3e73e32e" /></p></td>
67
+ <td align="center"><p align="center"><img width="974" height="1732" alt="image" src="https://github.com/user-attachments/assets/e22a3968-87d7-4708-a7cd-e7f198c7c32e" /></p></td>
68
+ <td align="center"><p align="center"><img width="976" height="1734" alt="image" src="https://github.com/user-attachments/assets/0952b395-6b4a-432a-8a50-c294b7f89750" /></p></td>
69
+ </tr>
70
+ </table>
71
+
72
+ ## Démarrage rapide
73
+
74
+ ### Déploiement en un clic
75
+
76
+ Pour les utilisateurs qui veulent découvrir AstrBot rapidement, qui sont familiers avec la ligne de commande et peuvent installer eux-mêmes l'environnement `uv`, nous recommandons la méthode de déploiement en un clic avec `uv` ⚡️ :
77
+
78
+ ```bash
79
+ uv tool install astrbot
80
+ astrbot init # Exécutez cette commande uniquement la première fois pour initialiser l'environnement
81
+ astrbot run
82
+ ```
83
+
84
+ > [uv](https://docs.astral.sh/uv/) doit être installé.
85
+
86
+ > [!NOTE]
87
+ > Pour les utilisateurs macOS : en raison des vérifications de sécurité de macOS, la première exécution de la commande `astrbot` peut prendre plus de temps (environ 10-20s).
88
+
89
+ Mettre à jour `astrbot` :
90
+
91
+ ```bash
92
+ uv tool upgrade astrbot
93
+ ```
94
+
95
+ ### Déploiement Docker
96
+
97
+ Pour les utilisateurs familiers avec les conteneurs et qui souhaitent une méthode plus stable et adaptée à la production, nous recommandons de déployer AstrBot avec Docker / Docker Compose.
98
+
99
+ Veuillez consulter la documentation officielle [Déployer AstrBot avec Docker](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot).
100
+
101
+ ### Déployer sur RainYun
102
+
103
+ Pour les utilisateurs qui souhaitent déployer AstrBot en un clic sans gérer le serveur eux-mêmes, nous recommandons le service de déploiement cloud en un clic de RainYun ☁️ :
104
+
105
+ [![Deploy on RainYun](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-en.svg)](https://app.rainyun.com/apps/rca/store/5994?ref=NjU1ODg0)
106
+
107
+ ### Déploiement de l'application de bureau
108
+
109
+ Pour les utilisateurs qui veulent utiliser AstrBot sur desktop et passer principalement par ChatUI, nous recommandons AstrBot App.
110
+
111
+ Accédez à [AstrBot-desktop](https://github.com/AstrBotDevs/AstrBot-desktop) pour télécharger et installer l'application ; cette méthode est conçue pour un usage desktop et n'est pas recommandée pour les scénarios serveur.
112
+
113
+ ### Déploiement avec le lanceur
114
+
115
+ Également sur desktop, pour les utilisateurs qui souhaitent un déploiement rapide avec isolation d'environnement et multi-instances, nous recommandons AstrBot Launcher.
116
+
117
+ Accédez à [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) pour télécharger et installer.
118
+
119
+ ### Déployer sur Replit
120
+
121
+ Le déploiement sur Replit est maintenu par la communauté et convient aux démonstrations en ligne et aux essais légers.
122
+
123
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
124
+
125
+ ### AUR
126
+
127
+ Le mode AUR s'adresse aux utilisateurs Arch Linux qui préfèrent installer AstrBot via le gestionnaire de paquets système.
128
+
129
+ Exécutez la commande ci-dessous pour installer `astrbot-git`, puis lancez AstrBot localement.
130
+
131
+ ```bash
132
+ yay -S astrbot-git
133
+ ```
134
+
135
+ **Autres méthodes de déploiement**
136
+
137
+ Si vous avez besoin d'une gestion par panneau ou d'une personnalisation plus poussée, consultez [Déploiement BT-Panel](https://astrbot.app/deploy/astrbot/btpanel.html) pour une installation via BT Panel, [Déploiement 1Panel](https://astrbot.app/deploy/astrbot/1panel.html) pour le marketplace 1Panel, [Déploiement CasaOS](https://astrbot.app/deploy/astrbot/casaos.html) pour un déploiement visuel sur NAS/serveur domestique, et [Déploiement manuel](https://astrbot.app/deploy/astrbot/cli.html) pour une installation complète depuis les sources avec `uv`.
138
+
139
+ ## Plateformes de messagerie prises en charge
140
+
141
+ Connectez AstrBot à vos plateformes de chat préférées.
142
+
143
+ | Plateforme | Maintenance |
144
+ |---------|---------------|
145
+ | QQ | Officielle |
146
+ | Implémentation du protocole OneBot v11 | Officielle |
147
+ | Telegram | Officielle |
148
+ | Application WeChat Work & Bot intelligent WeChat Work | Officielle |
149
+ | Service client WeChat & Comptes officiels WeChat | Officielle |
150
+ | Feishu (Lark) | Officielle |
151
+ | DingTalk | Officielle |
152
+ | Slack | Officielle |
153
+ | Discord | Officielle |
154
+ | LINE | Officielle |
155
+ | Satori | Officielle |
156
+ | Misskey | Officielle |
157
+ | WhatsApp (Bientôt disponible) | Officielle |
158
+ | [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter) | Communauté |
159
+ | [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | Communauté |
160
+ | [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | Communauté |
161
+
162
+ ## Services de modèles pris en charge
163
+
164
+ | Service | Type |
165
+ |---------|---------------|
166
+ | OpenAI et services compatibles | Services LLM |
167
+ | Anthropic | Services LLM |
168
+ | Google Gemini | Services LLM |
169
+ | Moonshot AI | Services LLM |
170
+ | Zhipu AI | Services LLM |
171
+ | DeepSeek | Services LLM |
172
+ | Ollama (Auto-hébergé) | Services LLM |
173
+ | LM Studio (Auto-hébergé) | Services LLM |
174
+ | [AIHubMix](https://aihubmix.com/?aff=4bfH) | Services LLM (Passerelle API, prend en charge tous les modèles) |
175
+ | [CompShare](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | Services LLM |
176
+ | [302.AI](https://share.302.ai/rr1M3l) | Services LLM |
177
+ | [TokenPony](https://www.tokenpony.cn/3YPyf) | Services LLM |
178
+ | [SiliconFlow](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot) | Services LLM |
179
+ | [PPIO Cloud](https://ppio.com/user/register?invited_by=AIOONE) | Services LLM |
180
+ | ModelScope | Services LLM |
181
+ | OneAPI | Services LLM |
182
+ | Dify | Plateformes LLMOps |
183
+ | Applications Alibaba Cloud Bailian | Plateformes LLMOps |
184
+ | Coze | Plateformes LLMOps |
185
+ | OpenAI Whisper | Services de reconnaissance vocale |
186
+ | SenseVoice | Services de reconnaissance vocale |
187
+ | OpenAI TTS | Services de synthèse vocale |
188
+ | Gemini TTS | Services de synthèse vocale |
189
+ | GPT-Sovits-Inference | Services de synthèse vocale |
190
+ | GPT-Sovits | Services de synthèse vocale |
191
+ | FishAudio | Services de synthèse vocale |
192
+ | Edge TTS | Services de synthèse vocale |
193
+ | Alibaba Cloud Bailian TTS | Services de synthèse vocale |
194
+ | Azure TTS | Services de synthèse vocale |
195
+ | Minimax TTS | Services de synthèse vocale |
196
+ | Volcano Engine TTS | Services de synthèse vocale |
197
+
198
+ ## ❤️ Contribuer
199
+
200
+ Les Issues et Pull Requests sont toujours les bienvenues ! N'hésitez pas à soumettre vos modifications à ce projet :)
201
+
202
+ ### Comment contribuer
203
+
204
+ Vous pouvez contribuer en examinant les issues ou en aidant à la revue des pull requests. Toutes les issues ou PRs sont les bienvenues pour encourager la participation de la communauté. Bien sûr, ce ne sont que des suggestions - vous pouvez contribuer de la manière que vous souhaitez. Pour l'ajout de nouvelles fonctionnalités, veuillez d'abord en discuter via une Issue.
205
+
206
+ ### Environnement de développement
207
+
208
+ AstrBot utilise `ruff` pour le formatage et le linting du code.
209
+
210
+ ```bash
211
+ git clone https://github.com/AstrBotDevs/AstrBot
212
+ pip install pre-commit
213
+ pre-commit install
214
+ ```
215
+
216
+ ## 🌍 Communauté
217
+
218
+ ### Groupes QQ
219
+
220
+ - Groupe 1 : 322154837
221
+ - Groupe 3 : 630166526
222
+ - Groupe 5 : 822130018
223
+ - Groupe 6 : 753075035
224
+ - Groupe développeurs : 975206796
225
+ - Groupe développeurs (officiel) : 1039761811
226
+
227
+ ### Serveur Discord
228
+
229
+ <a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
230
+
231
+ ## ❤️ Remerciements spéciaux
232
+
233
+ Un grand merci à tous les contributeurs et développeurs de plugins pour leurs contributions à AstrBot ❤️
234
+
235
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
236
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot&max=200&columns=14" />
237
+ </a>
238
+
239
+ De plus, la naissance de ce projet n'aurait pas été possible sans l'aide des projets open source suivants :
240
+
241
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - L'incroyable framework chat
242
+
243
+ ## ⭐ Historique des étoiles
244
+
245
+ > [!TIP]
246
+ > Si ce projet vous a aidé dans votre vie ou votre travail, ou si vous êtes intéressé par son développement futur, veuillez donner une étoile au projet. C'est la force motrice derrière la maintenance de ce projet open source <3
247
+
248
+ <div align="center">
249
+
250
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
251
+
252
+ </div>
253
+
254
+ <div align="center">
255
+
256
+ _La compagnie et la capacité ne devraient jamais être des opposés. Nous souhaitons créer un robot capable à la fois de comprendre les émotions, d'offrir de la présence, et d'accomplir des tâches de manière fiable._
257
+
258
+ _私は、高性能ですから!_
259
+
260
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
261
+
262
+ </div>
README_ja.md ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)
2
+
3
+ <div align="center">
4
+
5
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh.md">简体中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README.md">English</a> |
7
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh-TW.md">繁體中文</a> |
8
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_fr.md">Français</a> |
9
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ru.md">Русский</a>
10
+
11
+ <br>
12
+
13
+ <div>
14
+ <a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
15
+ <a href="https://hellogithub.com/repository/AstrBotDevs/AstrBot" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d127d50cd5e54c5382328acc3bb25483&claim_uid=ZO9by7qCXgSd6Lp&t=2" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
16
+ </div>
17
+
18
+ <br>
19
+
20
+ <div>
21
+ <img src="https://img.shields.io/github/v/release/AstrBotDevs/AstrBot?color=76bad9" href="https://github.com/AstrBotDevs/AstrBot/releases/latest">
22
+ <img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
23
+ <img src="https://deepwiki.com/badge.svg" href="https://deepwiki.com/AstrBotDevs/AstrBot">
24
+ <a href="https://zread.ai/AstrBotDevs/AstrBot" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFZIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0LjYxNTZDNS4zMTUwMiAxNC4zOTk5IDUuNjAxNTYgMTQuMTEzNCA1LjYwMTU2IDEzLjc1OTlWMTEuMDM5OUM1LjYwMTU2IDEwLjY4NjQgNS4zMTUwMiAxMC4zOTk5IDQuOTYxNTYgMTAuMzk5OVoiIGZpbGw9IiNmZmYiLz4KPHBhdGggZD0iTTEzLjc1ODQgMS42MDAxSDExLjAzODRDMTAuNjg1IDEuNjAwMSAxMC4zOTg0IDEuODg2NjQgMTAuMzk4NCAyLjI0MDFWNC45NjAxQzEwLjM5ODQgNS4zMTM1NiAxMC42ODUgNS42MDAxIDExLjAzODQgNS42MDAxSDEzLjc1ODRDMTQuMTExOSA1LjYwMDEgMTQuMzk4NCA1LjMxMzU2IDE0LjM5ODQgNC45NjAxVjIuMjQwMUMxNC4zOTg0IDEuODg2NjQgMTQuMTExOSAxLjYwMDEgMTMuNzU4NCAxLjYwMDFZIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDRMNCAxMlpFIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
25
+ <a href="https://hub.docker.com/r/soulter/astrbot"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/soulter/astrbot.svg?color=76bad9"/></a>
26
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%20&label=%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%83%9E%E3%83%BC%E3%82%B1%E3%83%83%E3%83%88&cacheSeconds=3600">
27
+ <img src="https://gitcode.com/Soulter/AstrBot/star/badge.svg" href="https://gitcode.com/Soulter/AstrBot">
28
+ </div>
29
+
30
+ <br>
31
+
32
+ <a href="https://astrbot.app/">ドキュメント</a> |
33
+ <a href="https://blog.astrbot.app/">Blog</a> |
34
+ <a href="https://astrbot.featurebase.app/roadmap">ロードマップ</a> |
35
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">Issue</a>
36
+ <a href="mailto:community@astrbot.app">Email Support</a>
37
+ </div>
38
+
39
+ AstrBot は、主要なインスタントメッセージングアプリと統合できるオープンソースのオールインワン Agent チャットボットプラットフォームです。個人、開発者、チームに信頼性が高くスケーラブルな会話型 AI インフラストラクチャを提供します。パーソナル AI コンパニオン、インテリジェントカスタマーサービス、オートメーションアシスタント、エンタープライズナレッジベースなど、AstrBot を使用すると、IM プラットフォームのワークフロー内で本番環境対応の AI アプリケーションを迅速に構築できます。
40
+
41
+ ![screenshot_1 5x_postspark_2026-02-27_22-37-45](https://github.com/user-attachments/assets/f17cdb90-52d7-4773-be2e-ff64b566af6b)
42
+
43
+ ## 主な機能
44
+
45
+ 1. 💯 無料 & オープンソース。
46
+ 2. ✨ AI大規模言語モデル対話、マルチモーダル、Agent、MCP、Skills、ナレッジベース、ペルソナ設定、対話の自動圧縮。
47
+ 3. 🤖 Dify、Alibaba Cloud Bailian(百煉)、Coze などのAgentプラットフォームへの接続をサポー��。
48
+ 4. 🌐 マルチプラットフォーム:QQ、企業微信(WeCom)、飛書(Lark)、釘釘(DingTalk)、WeChat公式アカウント、Telegram、Slack、[その他](#サポートされているメッセージプラットフォーム)に対応。
49
+ 5. 📦 プラグイン拡張:1000を超える既存プラグインをワンクリックでインストール可能。
50
+ 6. 🛡️ 隔離環境[Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html):コードの安全な実行、Shell呼び出し、セッションレベルのリソース再利用。
51
+ 7. 💻 WebUI 対応。
52
+ 8. 🌈 Web ChatUI 対応:ChatUI内にAgent Sandboxやウェブ検索などを内蔵。
53
+ 9. 🌐 多言語対応(i18n)。
54
+
55
+ <br>
56
+
57
+ <table align="center">
58
+ <tr align="center">
59
+ <th>💙 ロールプレイ & 感情的な対話</th>
60
+ <th>✨ プロアクティブ・エージェント (Proactive Agent)</th>
61
+ <th>🚀 汎用 エージェント的能力</th>
62
+ <th>🧩 1000+ コミュニティプラグイン</th>
63
+ </tr>
64
+ <tr>
65
+ <td align="center"><p align="center"><img width="984" height="1746" alt="99b587c5d35eea09d84f33e6cf6cfd4f" src="https://github.com/user-attachments/assets/89196061-3290-458d-b51f-afa178049f84" /></p></td>
66
+ <td align="center"><p align="center"><img width="976" height="1612" alt="c449acd838c41d0915cc08a3824025b1" src="https://github.com/user-attachments/assets/f75368b4-e022-41dc-a9e0-131c3e73e32e" /></p></td>
67
+ <td align="center"><p align="center"><img width="974" height="1732" alt="image" src="https://github.com/user-attachments/assets/e22a3968-87d7-4708-a7cd-e7f198c7c32e" /></p></td>
68
+ <td align="center"><p align="center"><img width="976" height="1734" alt="image" src="https://github.com/user-attachments/assets/0952b395-6b4a-432a-8a50-c294b7f89750" /></p></td>
69
+ </tr>
70
+ </table>
71
+
72
+ ## クイックスタート
73
+
74
+ ### ワンクリックデプロイ
75
+
76
+ AstrBot を素早く試したいユーザーで、コマンドラインに慣れており `uv` 環境を自分でインストールできる場合は、`uv` のワンクリックデプロイをおすすめします ⚡️:
77
+
78
+ ```bash
79
+ uv tool install astrbot
80
+ astrbot init # 初回のみ実行して環境を初期化します
81
+ astrbot run
82
+ ```
83
+
84
+ > [uv](https://docs.astral.sh/uv/) のインストールが必要です。
85
+
86
+ > [!NOTE]
87
+ > macOS ユーザーの場合:macOS のセキュリティチェックにより、`astrbot` コマンドの初回実行に時間がかかる場合があります(約 10〜20 秒)。
88
+
89
+ `astrbot` の更新:
90
+
91
+ ```bash
92
+ uv tool upgrade astrbot
93
+ ```
94
+
95
+ ### Docker デプロイ
96
+
97
+ コンテナ運用に慣れており、より安定した本番向けのデプロイ方法を求めるユーザーには、Docker / Docker Compose での AstrBot デプロイをおすすめします。
98
+
99
+ 公式ドキュメント [Docker を使用した AstrBot のデプロイ](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot) をご参照ください。
100
+
101
+ ### 雨云でのデプロイ
102
+
103
+ AstrBot をワンクリックでデプロイしたく、サーバーを自分で管理したくないユーザーには、雨云のワンクリッククラウドデプロイサービスをおすすめします ☁️:
104
+
105
+ [![Deploy on RainYun](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-en.svg)](https://app.rainyun.com/apps/rca/store/5994?ref=NjU1ODg0)
106
+
107
+ ### デスクトップアプリのデプロイ
108
+
109
+ デスクトップで AstrBot を使い、主に ChatUI を入口として利用するユーザーには、AstrBot App をおすすめします。
110
+
111
+ [AstrBot-desktop](https://github.com/AstrBotDevs/AstrBot-desktop) からダウンロードしてインストールしてください。この方式はデスクトップ向けであり、サーバー用途には推奨されません。
112
+
113
+ ### ランチャーのデプロイ
114
+
115
+ 同じくデスクトップで、素早くデプロイしつつ環境を分離して多重起動したいユーザーには、AstrBot Launcher をおすすめします。
116
+
117
+ [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) からダウンロードしてインストールしてください。
118
+
119
+ ### Replit でのデプロイ
120
+
121
+ Replit デプロイはコミュニティ提供の方式で、オンラインデモや軽量な試用に向いています。
122
+
123
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
124
+
125
+ ### AUR
126
+
127
+ AUR 方式は Arch Linux ユーザー向けで、システムのパッケージ運用に合わせて AstrBot を導入したい場合に適しています。
128
+
129
+ 次のコマンドで `astrbot-git` をインストールし、ローカル環境で AstrBot を起動してください。
130
+
131
+ ```bash
132
+ yay -S astrbot-git
133
+ ```
134
+
135
+ **その他のデプロイ方法**
136
+
137
+ パネル操作での導入やより高度なカスタマイズが必要な場合は、[宝塔パネルデプロイ](https://astrbot.app/deploy/astrbot/btpanel.html)(BT Panel 経由の導���)、[1Panel デプロイ](https://astrbot.app/deploy/astrbot/1panel.html)(1Panel アプリマーケット経由)、[CasaOS デプロイ](https://astrbot.app/deploy/astrbot/casaos.html)(NAS / ホームサーバー向け可視化導入)、[手動デプロイ](https://astrbot.app/deploy/astrbot/cli.html)(`uv` とソースベースのフルカスタム導入)を参照してください。
138
+
139
+ ## サポートされているメッセージプラットフォーム
140
+
141
+ AstrBot をよく使うチャットプラットフォームに接続できます。
142
+
143
+ | プラットフォーム | 保守 |
144
+ |---------|---------------|
145
+ | QQ | 公式 |
146
+ | OneBot v11 プロトコル実装 | 公式 |
147
+ | Telegram | 公式 |
148
+ | WeChat Work アプリケーション & WeChat Work インテリジェントボット | 公式 |
149
+ | WeChat カスタマーサービス & WeChat 公式アカウント | 公式 |
150
+ | Feishu (Lark) | 公式 |
151
+ | DingTalk | 公式 |
152
+ | Slack | 公式 |
153
+ | Discord | 公式 |
154
+ | LINE | 公式 |
155
+ | Satori | 公式 |
156
+ | Misskey | 公式 |
157
+ | WhatsApp (近日対応予定) | 公式 |
158
+ | [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter) | コミュニティ |
159
+ | [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | コミュニティ |
160
+ | [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | コミュニティ |
161
+
162
+
163
+ ## サポートされているモデルサービス
164
+
165
+ | サービス | 種類 |
166
+ |---------|---------------|
167
+ | OpenAI および互換サービス | 大規模言語モデルサービス |
168
+ | Anthropic | 大規模言語モデルサービス |
169
+ | Google Gemini | 大規模言語モデルサービス |
170
+ | Moonshot AI | 大規模言語モデルサービス |
171
+ | 智谱 AI | 大規模言語モデルサービス |
172
+ | DeepSeek | 大規模言語モデルサービス |
173
+ | Ollama (セルフホスト) | 大規模言語モデルサービス |
174
+ | LM Studio (セルフホスト) | 大規模言語モデルサービス |
175
+ | [AIHubMix](https://aihubmix.com/?aff=4bfH) | 大規模言語モデルサービス(APIゲートウェイ、全モデル対応) |
176
+ | [優云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | 大規模言語モデルサービス |
177
+ | [302.AI](https://share.302.ai/rr1M3l) | 大規模言語モデルサービス |
178
+ | [小馬算力](https://www.tokenpony.cn/3YPyf) | 大規模言語モデルサービス |
179
+ | [硅基流動](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot) | 大規模言語モデルサービス |
180
+ | [PPIO 派欧云](https://ppio.com/user/register?invited_by=AIOONE) | 大規模言語モデルサービス |
181
+ | ModelScope | 大規模言語モデルサービス |
182
+ | OneAPI | 大規模言語モデルサービス |
183
+ | Dify | LLMOps プラットフォーム |
184
+ | Alibaba Cloud 百炼アプリケーション | LLMOps プラットフォーム |
185
+ | Coze | LLMOps プラットフォーム |
186
+ | OpenAI Whisper | 音声認識サービス |
187
+ | SenseVoice | 音声認識サービス |
188
+ | OpenAI TTS | 音声合成サービス |
189
+ | Gemini TTS | 音声合成サービス |
190
+ | GPT-Sovits-Inference | 音声合成サービス |
191
+ | GPT-Sovits | 音声合成サービス |
192
+ | FishAudio | 音声合成サービス |
193
+ | Edge TTS | 音声合成サービス |
194
+ | Alibaba Cloud 百炼 TTS | 音声合成サービス |
195
+ | Azure TTS | 音声合成サービス |
196
+ | Minimax TTS | 音声合成サービス |
197
+ | Volcano Engine TTS | 音声合成サービス |
198
+
199
+ ## ❤️ コントリビューション
200
+
201
+ Issue や Pull Request は大歓迎です!このプロジェクトに変更を送信してください :)
202
+
203
+ ### コントリビュート方法
204
+
205
+ Issue を確認したり、PR(プルリクエスト)のレビューを手伝うことで貢献できます。どんな Issue や PR への参加も歓迎され、コミュニティ貢献を促進します。もちろん、これらは提案に過ぎず、どんな方法でも貢献できます。新機能の追加については、まず Issue で議論してください。
206
+
207
+ ### 開発環境
208
+
209
+ AstrBot はコードのフォーマットとチェックに `ruff` を使用しています。
210
+
211
+ ```bash
212
+ git clone https://github.com/AstrBotDevs/AstrBot
213
+ pip install pre-commit
214
+ pre-commit install
215
+ ```
216
+
217
+ ## 🌍 コミュニティ
218
+
219
+ ### QQ グループ
220
+
221
+ - 1群: 322154837
222
+ - 3群: 630166526
223
+ - 5群: 822130018
224
+ - 6群: 753075035
225
+ - 開発者群: 975206796
226
+ - 開発者群(正式): 1039761811
227
+
228
+ ### Discord サーバー
229
+
230
+ <a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
231
+
232
+ ## ❤️ Special Thanks
233
+
234
+ AstrBot への貢献をしていただいたすべてのコントリビューターとプラグイン開発者に特別な感謝を ❤️
235
+
236
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
237
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot&max=200&columns=14" />
238
+ </a>
239
+
240
+ また、このプロジェクトの誕生は以下のオープンソースプロジェクトの助けなしには実現できませんでした:
241
+
242
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 素晴らしい猫猫フレームワーク
243
+
244
+ ## ⭐ Star History
245
+
246
+ > [!TIP]
247
+ > このプロジェクトがあなたの生活や仕事に役立ったり、このプロジェクトの今後の発展に関心がある場合は、プロジェクトに Star をください。これがこのオープンソースプロジェクトを維持する原動力です <3
248
+
249
+ <div align="center">
250
+
251
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
252
+
253
+ </div>
254
+
255
+ <div align="center">
256
+
257
+ _共感力と能力は決して対立するものではありません。私たちが目指すのは、感情を理解し、心の支えとなるだけでなく、確実に仕事をこなせるロボットの創造です。_
258
+
259
+ _私は、高性能ですから!_
260
+
261
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
262
+
263
+ </div>
README_ru.md ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)
2
+
3
+ <div align="center">
4
+
5
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh.md">简体中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README.md">English</a> |
7
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh-TW.md">繁體中文</a> |
8
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</a> |
9
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_fr.md">Français</a>
10
+
11
+ <br>
12
+
13
+ <div>
14
+ <a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
15
+ <a href="https://hellogithub.com/repository/AstrBotDevs/AstrBot" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d127d50cd5e54c5382328acc3bb25483&claim_uid=ZO9by7qCXgSd6Lp&t=2" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
16
+ </div>
17
+
18
+ <br>
19
+
20
+ <div>
21
+ <img src="https://img.shields.io/github/v/release/AstrBotDevs/AstrBot?color=76bad9" href="https://github.com/AstrBotDevs/AstrBot/releases/latest">
22
+ <img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
23
+ <img src="https://deepwiki.com/badge.svg" href="https://deepwiki.com/AstrBotDevs/AstrBot">
24
+ <a href="https://zread.ai/AstrBotDevs/AstrBot" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFZIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjczODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
25
+ <a href="https://hub.docker.com/r/soulter/astrbot"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/soulter/astrbot.svg?color=76bad9"/></a>
26
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%20&label=%D0%9C%D0%B0%D1%80%D0%BA%D0%B5%D1%82%D0%BF%D0%BB%D0%B5%D0%B9%D1%81&cacheSeconds=3600">
27
+ <img src="https://gitcode.com/Soulter/AstrBot/star/badge.svg" href="https://gitcode.com/Soulter/AstrBot">
28
+ </div>
29
+
30
+ <br>
31
+
32
+ <a href="https://astrbot.app/">Документация</a> |
33
+ <a href="https://blog.astrbot.app/">Блог</a> |
34
+ <a href="https://astrbot.featurebase.app/roadmap">Дорожная карта</a> |
35
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">Сообщить о проблеме</a>
36
+ <a href="mailto:community@astrbot.app">Email Support</a>
37
+ </div>
38
+
39
+ AstrBot — это универсальная платформа Agent-чатботов с открытым исходным кодом, которая интегрируется с основными приложениями для обмена мгновенными сообщениями. Она предоставляет надёжную и масштабируемую инфраструктуру разговорного ИИ для частных лиц, разработчиков и команд. Будь то персональный ИИ-компаньон, интеллектуальная служба поддержки, автоматизированный помощник или корпоративная база знаний — AstrBot позволяет быстро создавать готовые к использованию ИИ-приложения в рабочих процессах вашей платформы обмена сообщениями.
40
+
41
+ ![521771166-00782c4c-4437-4d97-aabc-605e3738da5c (1)](https://github.com/user-attachments/assets/61e7b505-f7db-41aa-a75f-4ef8f079b8ba)
42
+
43
+ ## Основные возможности
44
+
45
+ 1. 💯 Бесплатно & Открытый исходный код.
46
+ 2. ✨ Диалоги с ИИ-моделями, мультимодальность, Agent, MCP, Skills, База знаний, Настройка личности, автоматическое сжатие диалогов.
47
+ 3. 🤖 Поддержка интеграции с платформами Agents, такими как Dify, Alibaba Cloud Bailian, Coze и др.
48
+ 4. 🌐 Мультиплатформенность: поддержка QQ, WeChat для предприятий, Feishu, DingTalk, публичных аккаунтов WeChat, Telegram, Slack и [других](#Поддерживаемые-платформы-обмена-сообщениями).
49
+ 5. 📦 Расширение плагинами: доступно более 1000 плагинов для установки в один клик.
50
+ 6. 🛡️ Изолированная среда[Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html): безопасное выполнение любого кода, вызов Shell, повторное использование ресурсов на уровне сессии.
51
+ 7. 💻 Поддержка WebUI.
52
+ 8. 🌈 Поддержка Web ChatUI: встроенная песочница агента, веб-поиск и др.
53
+ 9. 🌐 Поддержка интернационализации (i18n).
54
+
55
+ <br>
56
+
57
+ <table align="center">
58
+ <tr align="center">
59
+ <th>💙 Ролевые игры & Эмоциональная поддержка</th>
60
+ <th>✨ Проактивный Агент (Agent)</th>
61
+ <th>🚀 Универсальные возможности Агента</th>
62
+ <th>🧩 1000+ плагинов сообщества</th>
63
+ </tr>
64
+ <tr>
65
+ <td align="center"><p align="center"><img width="984" height="1746" alt="99b587c5d35eea09d84f33e6cf6cfd4f" src="https://github.com/user-attachments/assets/89196061-3290-458d-b51f-afa178049f84" /></p></td>
66
+ <td align="center"><p align="center"><img width="976" height="1612" alt="c449acd838c41d0915cc08a3824025b1" src="https://github.com/user-attachments/assets/f75368b4-e022-41dc-a9e0-131c3e73e32e" /></p></td>
67
+ <td align="center"><p align="center"><img width="974" height="1732" alt="image" src="https://github.com/user-attachments/assets/e22a3968-87d7-4708-a7cd-e7f198c7c32e" /></p></td>
68
+ <td align="center"><p align="center"><img width="976" height="1734" alt="image" src="https://github.com/user-attachments/assets/0952b395-6b4a-432a-8a50-c294b7f89750" /></p></td>
69
+ </tr>
70
+ </table>
71
+
72
+ ## Быстрый старт
73
+
74
+ ### Развёртывание в один клик
75
+
76
+ Для пользователей, которые хотят быстро попробовать AstrBot, знакомы с командной строкой и могут самостоятельно установить окружение `uv`, мы рекомендуем использовать развёртывание в один клик через `uv` ⚡️:
77
+
78
+ ```bash
79
+ uv tool install astrbot
80
+ astrbot init # Выполните эту команду только при первом запуске для инициализации окружения
81
+ astrbot run
82
+ ```
83
+
84
+ > Требуется установленный [uv](https://docs.astral.sh/uv/).
85
+
86
+ > [!NOTE]
87
+ > Для пользователей macOS: из-за проверок безопасности macOS первый запуск команды `astrbot` может занять больше времени (около 10-20 секунд).
88
+
89
+ Обновить `astrbot`:
90
+
91
+ ```bash
92
+ uv tool upgrade astrbot
93
+ ```
94
+
95
+ ### Развёртывание Docker
96
+
97
+ Для пользователей, знакомых с контейнерами и которым нужен более стабильный и подходящий для production способ, мы рекомендуем разворачивать AstrBot через Docker / Docker Compose.
98
+
99
+ См. официальную документацию [Развёртывание AstrBot с Docker](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot).
100
+
101
+ ### Развёртывание на RainYun
102
+
103
+ Для пользователей, которые хотят развернуть AstrBot в один клик и не хотят самостоятельно управлять сервером, мы рекомендуем облачный сервис развёртывания в один клик от RainYun ☁️:
104
+
105
+ [![Deploy on RainYun](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-en.svg)](https://app.rainyun.com/apps/rca/store/5994?ref=NjU1ODg0)
106
+
107
+ ### Развёртывание десктопного приложения
108
+
109
+ Для пользователей, которые хотят использовать AstrBot на десктопе и в основном работают через ChatUI, мы рекомендуем AstrBot App.
110
+
111
+ Перейдите в [AstrBot-desktop](https://github.com/AstrBotDevs/AstrBot-desktop), скачайте и установите приложение; этот вариант предназначен для десктопа и не рекомендуется для серверных сценариев.
112
+
113
+ ### Развёртывание через лаунчер
114
+
115
+ Также на десктопе, для пользователей, которым нужен быстрый запуск и мультиинстанс с изоляцией окружений, мы рекомендуем AstrBot Launcher.
116
+
117
+ Перейдите в [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher), чтобы скачать и установить.
118
+
119
+ ### Развёртывание на Replit
120
+
121
+ Развёртывание через Replit поддерживается сообществом и подходит для онлайн-демо и лёгких тестовых запусков.
122
+
123
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
124
+
125
+ ### AUR
126
+
127
+ AUR-вариант предназначен для пользователей Arch Linux, которым удобна установка через системный менеджер пакетов.
128
+
129
+ Выполните команду ниже для установки `astrbot-git`, затем запустите AstrBot локально.
130
+
131
+ ```bash
132
+ yay -S astrbot-git
133
+ ```
134
+
135
+ **Другие способы развёртывания**
136
+
137
+ Если вам нужна панельная установка или более глубокая кастомизация, смотрите [Развёртывание BT-Panel](https://astrbot.app/deploy/astrbot/btpanel.html) (установка через BT Panel), [Развёртывание 1Panel](https://astrbot.app/deploy/astrbot/1panel.html) (развёртывание через маркетплейс 1Panel), [Развёртывание CasaOS](https://astrbot.app/deploy/astrbot/casaos.html) (визуальный вариант для NAS и домашних серверов) и [Ручное развёртывание](https://astrbot.app/deploy/astrbot/cli.html) (полностью настраиваемая установка из исходников через `uv`).
138
+
139
+ ## Поддерживаемые платформы обмена сообщениями
140
+
141
+ Подключите AstrBot к вашим любимым чат-платформам.
142
+
143
+ | Платформа | Поддержка |
144
+ |---------|---------------|
145
+ | QQ | Официальная |
146
+ | Реализация протокола OneBot v11 | Официальная |
147
+ | Telegram | Официальная |
148
+ | Приложение WeChat Work и интеллектуальный бот WeChat Work | Официальная |
149
+ | Служба поддержки WeChat и официальные аккаунты WeChat | Официальная |
150
+ | Feishu (Lark) | Официальная |
151
+ | DingTalk | Официальная |
152
+ | Slack | Официальная |
153
+ | Discord | Официальная |
154
+ | LINE | Официальная |
155
+ | Satori | Официальная |
156
+ | Misskey | Официальная |
157
+ | WhatsApp (Скоро) | Официальная |
158
+ | [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter) | Сообщество |
159
+ | [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | Сообщество |
160
+ | [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | Сообщество |
161
+
162
+ ## Поддерживаемые сервисы моделей
163
+
164
+ | Сервис | Тип |
165
+ |---------|---------------|
166
+ | OpenAI и совместимые сервисы | Сервисы LLM |
167
+ | Anthropic | Сервисы LLM |
168
+ | Google Gemini | Сервисы LLM |
169
+ | Moonshot AI | Сервисы LLM |
170
+ | Zhipu AI | Сервисы LLM |
171
+ | DeepSeek | Сервисы LLM |
172
+ | Ollama (Самостоятельное размещение) | Сервисы LLM |
173
+ | LM Studio (Самостоятельное размещение) | Сервисы LLM |
174
+ | [AIHubMix](https://aihubmix.com/?aff=4bfH) | Сервисы LLM (API-шлюз, поддерживает все модели) |
175
+ | [CompShare](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | Сервисы LLM |
176
+ | [302.AI](https://share.302.ai/rr1M3l) | Сервисы LLM |
177
+ | [TokenPony](https://www.tokenpony.cn/3YPyf) | Сервисы LLM |
178
+ | [SiliconFlow](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot) | Сервисы LLM |
179
+ | [PPIO Cloud](https://ppio.com/user/register?invited_by=AIOONE) | Сервисы LLM |
180
+ | ModelScope | Сервисы LLM |
181
+ | OneAPI | Сервисы LLM |
182
+ | Dify | Платформы LLMOps |
183
+ | Приложения Alibaba Cloud Bailian | Платформы LLMOps |
184
+ | Coze | Платформы LLMOps |
185
+ | OpenAI Whisper | Сервисы распознавания речи |
186
+ | SenseVoice | Сервисы распознавания речи |
187
+ | OpenAI TTS | Серв��сы синтеза речи |
188
+ | Gemini TTS | Сервисы синтеза речи |
189
+ | GPT-Sovits-Inference | Сервисы синтеза речи |
190
+ | GPT-Sovits | Сервисы синтеза речи |
191
+ | FishAudio | Сервисы синтеза речи |
192
+ | Edge TTS | Сервисы синтеза речи |
193
+ | Alibaba Cloud Bailian TTS | Сервисы синтеза речи |
194
+ | Azure TTS | Сервисы синтеза речи |
195
+ | Minimax TTS | Сервисы синтеза речи |
196
+ | Volcano Engine TTS | Сервисы синтеза речи |
197
+
198
+ ## ❤️ Вклад в проект
199
+
200
+ Issues и Pull Request всегда приветствуются! Не стесняйтесь отправлять свои изменения в этот проект :)
201
+
202
+ ### Как внести вклад
203
+
204
+ Вы можете внести вклад, просматривая issues или помогая с ревью pull request. Любые issues или PR приветствуются для поощрения участия сообщества. Конечно, это лишь предложения — вы можете вносить вклад любым удобным для вас способом. Для добавления новых функций сначала обсудите это через Issue.
205
+
206
+ ### Среда разработки
207
+
208
+ AstrBot использует `ruff` для форматирования и линтинга кода.
209
+
210
+ ```bash
211
+ git clone https://github.com/AstrBotDevs/AstrBot
212
+ pip install pre-commit
213
+ pre-commit install
214
+ ```
215
+
216
+ ## 🌍 Сообщество
217
+
218
+ ### Группы QQ
219
+
220
+ - Группа 1: 322154837
221
+ - Группа 3: 630166526
222
+ - Группа 5: 822130018
223
+ - Группа 6: 753075035
224
+ - Группа разработчиков: 975206796
225
+ - Группа разработчиков (официальная): 1039761811
226
+
227
+ ### Сервер Discord
228
+
229
+ <a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
230
+
231
+ ## ❤️ Особая благодарность
232
+
233
+ Особая благодарность всем контрибьюторам и разработчикам плагинов за их вклад в AstrBot ❤️
234
+
235
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
236
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot&max=200&columns=14" />
237
+ </a>
238
+
239
+ Кроме того, рождение этого проекта было бы невозможно без помощи следующих проектов с открытым исходным кодом:
240
+
241
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - Замечательный кошачий фреймворк
242
+
243
+ ## ⭐ История звёзд
244
+
245
+ > [!TIP]
246
+ > Если этот проект помог вам в жизни или работе, или если вас интересует его будущее развитие, пожалуйста, поставьте проекту звезду. Это движущая сила поддержки этого проекта с открытым исходным кодом <3
247
+
248
+
249
+ <div align="center">
250
+
251
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
252
+
253
+ </div>
254
+
255
+ <div align="center">
256
+
257
+ _Сопровождение и способности никогда не должны быть противоположностями. Мы стремимся создать робота, который сможет как понимать эмоции, оказывать душевную поддержку, так и надёжно выполнять работу._
258
+
259
+ _私は、高性能ですから!_
260
+
261
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
262
+
263
+ </div>
README_zh-TW.md ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)
2
+
3
+ <div align="center">
4
+
5
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh.md">简体中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README.md">English</a> |
7
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</a> |
8
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_fr.md">Français</a> |
9
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ru.md">Русский</a>
10
+
11
+ <br>
12
+
13
+ <div>
14
+ <a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
15
+ <a href="https://hellogithub.com/repository/AstrBotDevs/AstrBot" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d127d50cd5e54c5382328acc3bb25483&claim_uid=ZO9by7qCXgSd6Lp&t=2" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
16
+ </div>
17
+
18
+ <br>
19
+
20
+ <div>
21
+ <img src="https://img.shields.io/github/v/release/AstrBotDevs/AstrBot?color=76bad9" href="https://github.com/AstrBotDevs/AstrBot/releases/latest">
22
+ <img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
23
+ <img src="https://deepwiki.com/badge.svg" href="https://deepwiki.com/AstrBotDevs/AstrBot">
24
+ <a href="https://zread.ai/AstrBotDevs/AstrBot" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
25
+ <a href="https://hub.docker.com/r/soulter/astrbot"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/soulter/astrbot.svg?color=76bad9"/></a>
26
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%E5%80%8B&label=%E6%8F%92%E4%BB%B6%E5%B8%82%E5%A0%B4&cacheSeconds=3600">
27
+ <img src="https://gitcode.com/Soulter/AstrBot/star/badge.svg" href="https://gitcode.com/Soulter/AstrBot">
28
+ </div>
29
+
30
+ <br>
31
+
32
+ <a href="https://astrbot.app/">文件</a> |
33
+ <a href="https://blog.astrbot.app/">Blog</a> |
34
+ <a href="https://astrbot.featurebase.app/roadmap">路線圖</a> |
35
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">問題回報</a>
36
+ <a href="mailto:community@astrbot.app">Email</a>
37
+ </div>
38
+
39
+ AstrBot 是一個開源的一站式 Agent 聊天機器人平台,可接入主流即時通訊軟體,為個人、開發者和團隊打造可靠、可擴展的對話式智慧基礎設施。無論是個人 AI 夥伴、智慧客服、自動化助手,還是企業知識庫,AstrBot 都能在您的即時通訊軟體平台的工作流程中快速構建生產可用的 AI 應用程式。
40
+
41
+ ![screenshot_1 5x_postspark_2026-02-27_22-37-45](https://github.com/user-attachments/assets/f17cdb90-52d7-4773-be2e-ff64b566af6b)
42
+
43
+ ## 主要功能
44
+
45
+ 1. 💯 免費 & 開源。
46
+ 2. ✨ AI 大模型對話,多模態,Agent,MCP,Skills,知識庫,人格設定,自動壓縮對話。
47
+ 3. 🤖 支援接入 Dify、阿里雲百煉、Coze 等智慧體 (Agent) 平台。
48
+ 4. 🌐 多平台,支援 QQ、企業微信、飛書、釘釘、微信公眾號、Telegram、Slack 以及[更多](#支援的訊息平台)。
49
+ 5. 📦 插件擴展,已有 1000+ 個插件可一鍵安裝。
50
+ 6. 🛡️ [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) 隔離化環境,安全地執行任何代碼、調用 Shell、會話級資源複用。
51
+ 7. 💻 WebUI 支援。
52
+ 8. 🌈 Web ChatUI 支援,ChatUI 內置代理沙盒 (Agent Sandbox)、���頁搜尋等。
53
+ 9. 🌐 國際化(i18n)支援。
54
+
55
+ <br>
56
+
57
+ <table align="center">
58
+ <tr align="center">
59
+ <th>💙 角色扮演 & 情感陪伴</th>
60
+ <th>✨ 主動式 Agent</th>
61
+ <th>🚀 通用 Agentic 能力</th>
62
+ <th>🧩 1000+ 社區外掛程式</th>
63
+ </tr>
64
+ <tr>
65
+ <td align="center"><p align="center"><img width="984" height="1746" alt="99b587c5d35eea09d84f33e6cf6cfd4f" src="https://github.com/user-attachments/assets/89196061-3290-458d-b51f-afa178049f84" /></p></td>
66
+ <td align="center"><p align="center"><img width="976" height="1612" alt="c449acd838c41d0915cc08a3824025b1" src="https://github.com/user-attachments/assets/f75368b4-e022-41dc-a9e0-131c3e73e32e" /></p></td>
67
+ <td align="center"><p align="center"><img width="974" height="1732" alt="image" src="https://github.com/user-attachments/assets/e22a3968-87d7-4708-a7cd-e7f198c7c32e" /></p></td>
68
+ <td align="center"><p align="center"><img width="976" height="1734" alt="image" src="https://github.com/user-attachments/assets/0952b395-6b4a-432a-8a50-c294b7f89750" /></p></td>
69
+ </tr>
70
+ </table>
71
+
72
+ ## 快速開始
73
+
74
+ ### 一鍵部署
75
+
76
+ 對於想快速體驗 AstrBot、且熟悉命令列並能自行安裝 `uv` 環境的使用者,我們推薦使用 `uv` 一鍵部署方式 ⚡️。
77
+
78
+ ```bash
79
+ uv tool install astrbot
80
+ astrbot init # 僅首次執行此命令以初始化環境
81
+ astrbot run
82
+ ```
83
+
84
+ > 需要安裝 [uv](https://docs.astral.sh/uv/)。
85
+
86
+ > [!NOTE]
87
+ > 對於 macOS 使用者:由於 macOS 安全性檢查,首次執行 `astrbot` 指令可能需要較長時間(約 10-20 秒)。
88
+
89
+ 更新 `astrbot`:
90
+
91
+ ```bash
92
+ uv tool upgrade astrbot
93
+ ```
94
+
95
+ ### Docker 部署
96
+
97
+ 對於熟悉容器、希望獲得更穩定且更適合正式環境部署方式的使用者,我們推薦使用 Docker / Docker Compose 部署 AstrBot。
98
+
99
+ 請參考官方文件 [使用 Docker 部署 AstrBot](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot)。
100
+
101
+ ### 在雨雲上部署
102
+
103
+ 對於希望一鍵部署 AstrBot 且不想自行管理伺服器的使用者,我們推薦使用雨雲的一鍵雲端部署服務 ☁️:
104
+
105
+ [![Deploy on RainYun](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-en.svg)](https://app.rainyun.com/apps/rca/store/5994?ref=NjU1ODg0)
106
+
107
+ ### 桌面客戶端部署
108
+
109
+ 對於希望在桌面端使用 AstrBot、並以 ChatUI 為主要入口的使用者,我們推薦使用 AstrBot App。
110
+
111
+ 前往 [AstrBot-desktop](https://github.com/AstrBotDevs/AstrBot-desktop) 下載並安裝;此方式面向桌面使用,不建議伺服器場景。
112
+
113
+ ### 啟動器部署
114
+
115
+ 同樣在桌面端,對於希望快速部署並實現環境隔離多開的使用者,我們推薦使用 AstrBot Launcher。
116
+
117
+ 前往 [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) 下載並安裝。
118
+
119
+ ### 在 Replit 上部署
120
+
121
+ Replit 部署由社群維護,適合線上示範與輕量試用情境。
122
+
123
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
124
+
125
+ ### AUR
126
+
127
+ AUR 方式面向 Arch Linux 使用者,適合希望透過系統套件管理器安裝 AstrBot 的場景。
128
+
129
+ 在終端執行下方命令安裝 `astrbot-git` 套件,安裝完成後即可啟動使用。
130
+
131
+ ```bash
132
+ yay -S astrbot-git
133
+ ```
134
+
135
+ **更多部署方式**
136
+
137
+ 若你需要面板化或更高自訂程度的部署,可參考 [寶塔面板](https://astrbot.app/deploy/astrbot/btpanel.html)(BT Panel 應用商店安裝)、[1Panel](https://astrbot.app/deploy/astrbot/1panel.html)(1Panel 應用商店安裝)、[CasaOS](https://astrbot.app/deploy/astrbot/casaos.html)(NAS / 家用伺服器可視化部署)與 [手動部署](https://astrbot.app/deploy/astrbot/cli.html)(基於原始碼與 `uv` 的完整自訂安裝)。
138
+
139
+ ## 支援的訊息平台
140
+
141
+ 將 AstrBot 連接到你常用的聊天平台。
142
+
143
+ | 平台 | 維護方 |
144
+ |---------|---------------|
145
+ | QQ | 官方維護 |
146
+ | OneBot v11 協議實作 | 官方維護 |
147
+ | Telegram | 官方維護 |
148
+ | 企微應用 & 企微智慧機器人 | 官方維護 |
149
+ | 微信客服 & 微信公眾號 | 官方維護 |
150
+ | 飛書 | 官方維護 |
151
+ | 釘釘 | 官方維護 |
152
+ | Slack | 官方維護 |
153
+ | Discord | 官方維護 |
154
+ | LINE | 官方維護 |
155
+ | Satori | 官方維護 |
156
+ | Misskey | 官方維護 |
157
+ | Whatsapp(即將支援) | 官方維護 |
158
+ | [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter) | 社群維護 |
159
+ | [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | 社群維護 |
160
+ | [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat) | 社群維護 |
161
+
162
+ ## 支援的模型服務
163
+
164
+ | 服務 | 類型 |
165
+ |---------|---------------|
166
+ | OpenAI 及相容服務 | 大型模型服務 |
167
+ | Anthropic | 大型模型服務 |
168
+ | Google Gemini | 大型模型服務 |
169
+ | Moonshot AI | 大型模型服務 |
170
+ | 智譜 AI | 大型模型服務 |
171
+ | DeepSeek | 大型模型服務 |
172
+ | Ollama(本機部署) | 大型模型服務 |
173
+ | LM Studio(本機部署) | 大型模型服務 |
174
+ | [AIHubMix](https://aihubmix.com/?aff=4bfH) | 大型模型服務(API 閘道,支援所有模型) |
175
+ | [優雲智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | 大型模型服務 |
176
+ | [302.AI](https://share.302.ai/rr1M3l) | 大型模型服務 |
177
+ | [小馬算力](https://www.tokenpony.cn/3YPyf) | 大型模型服務 |
178
+ | [矽基流動](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot) | 大型模型服務 |
179
+ | [PPIO 派歐雲](https://ppio.com/user/register?invited_by=AIOONE) | 大型模型服務 |
180
+ | ModelScope | 大型模型服務 |
181
+ | OneAPI | 大型模型服務 |
182
+ | Dify | LLMOps 平台 |
183
+ | 阿里雲百煉應用 | LLMOps 平台 |
184
+ | Coze | LLMOps 平台 |
185
+ | OpenAI Whisper | 語音轉文字服務 |
186
+ | SenseVoice | 語音轉文字服務 |
187
+ | OpenAI TTS | 文字轉語音服務 |
188
+ | Gemini TTS | 文字轉語音服務 |
189
+ | GPT-Sovits-Inference | 文字轉語音服務 |
190
+ | GPT-Sovits | 文字轉語音服務 |
191
+ | FishAudio | 文字轉語音服務 |
192
+ | Edge TTS | 文字轉語音服務 |
193
+ | 阿里雲百煉 TTS | 文字轉語音服務 |
194
+ | Azure TTS | 文字轉語音服務 |
195
+ | Minimax TTS | 文字轉語音服務 |
196
+ | 火山引擎 TTS | 文字轉語音服務 |
197
+
198
+ ## ❤️ 貢獻
199
+
200
+ 歡迎任何 Issues/Pull Requests!只需要將您的變更提交到此專案 :)
201
+
202
+ ### 如何貢獻
203
+
204
+ 您可以透過檢視問題或協助審核 PR(拉取請求)來貢獻。任何問題或 PR 都歡迎參與,以促進社群貢獻。當然,這些只是建議,您可以以任何方式進行貢獻。對於新功能的新增,請先透過 Issue 討論。
205
+
206
+ ### 開發環境
207
+
208
+ AstrBot 使用 `ruff` 進行程式碼格式化和檢查。
209
+
210
+ ```bash
211
+ git clone https://github.com/AstrBotDevs/AstrBot
212
+ pip install pre-commit
213
+ pre-commit install
214
+ ```
215
+
216
+ ## 🌍 社群
217
+
218
+ ### QQ 群組
219
+
220
+ - 9 群: 1076659624 (新)
221
+ - 10 群: 1078079676 (新)
222
+ - 1 群:322154837
223
+ - 3 群:630166526
224
+ - 5 群:822130018
225
+ - 6 群:753075035
226
+ - 7 群:743746109
227
+ - 8 群:1030353265
228
+ - 開發者群(闲聊吹水):975206796
229
+ - 開發者群(正式):1039761811
230
+
231
+ ### Discord 群組
232
+
233
+ <a href="https://discord.gg/hAVk6tgV36"><img alt="Discord_community" src="https://img.shields.io/badge/Discord-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
234
+
235
+ ## ❤️ Special Thanks
236
+
237
+ 特別感謝所有 Contributors 和外掛開發者對 AstrBot 的貢獻 ❤️
238
+
239
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
240
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot&max=200&columns=14" />
241
+ </a>
242
+
243
+ 此外,本專案的誕生離不開以下開源專案的幫助:
244
+
245
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 偉大的貓貓框架
246
+
247
+ ## ⭐ Star History
248
+
249
+ > [!TIP]
250
+ > 如果本專案對您的生活 / 工作產生了幫助,或者您關注本專案的未來發展,請給專案 Star,這是我們維護這個開源專案的動力 <3
251
+
252
+ <div align="center">
253
+
254
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
255
+
256
+ </div>
257
+
258
+ <div align="center">
259
+
260
+ _陪伴與能力從來不應該是對立面。我們希望創造的是一個既能理解情緒、給予陪伴,也能可靠完成工作的機器人。_
261
+
262
+ _私は、高性能ですから!_
263
+
264
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
265
+
266
+ </div>
README_zh.md ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ![AstrBot-Logo-Simplified](https://github.com/user-attachments/assets/ffd99b6b-3272-4682-beaa-6fe74250f7d9)
2
+
3
+ <div align="center">
4
+
5
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README.md">English</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_zh-TW.md">繁體中文</a> |
7
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</a> |
8
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_fr.md">Français</a> |
9
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ru.md">Русский</a>
10
+
11
+ <div>
12
+ <a href="https://trendshift.io/repositories/12875" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12875" alt="Soulter%2FAstrBot | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
13
+ <a href="https://hellogithub.com/repository/AstrBotDevs/AstrBot" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d127d50cd5e54c5382328acc3bb25483&claim_uid=ZO9by7qCXgSd6Lp&t=2" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
14
+ </div>
15
+
16
+ <br>
17
+
18
+ <div>
19
+ <img src="https://img.shields.io/github/v/release/AstrBotDevs/AstrBot?color=76bad9" href="https://github.com/AstrBotDevs/AstrBot/releases/latest">
20
+ <img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python">
21
+ <img src="https://deepwiki.com/badge.svg" href="https://deepwiki.com/AstrBotDevs/AstrBot">
22
+ <a href="https://zread.ai/AstrBotDevs/AstrBot" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
23
+ <a href="https://hub.docker.com/r/soulter/astrbot"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/soulter/astrbot.svg?color=76bad9"/></a>
24
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.soulter.top%2Fastrbot%2Fplugin-num&query=%24.result&suffix=%E4%B8%AA&label=%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA&cacheSeconds=3600">
25
+ <img src="https://gitcode.com/Soulter/AstrBot/star/badge.svg" href="https://gitcode.com/Soulter/AstrBot">
26
+ </div>
27
+
28
+ <br>
29
+
30
+ <a href="https://astrbot.app/">主页</a> |
31
+ <a href="https://astrbot.app/">文档</a> |
32
+ <a href="https://blog.astrbot.app/">博客</a> |
33
+ <a href="https://astrbot.featurebase.app/roadmap">路线图</a> |
34
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">问题提交</a>
35
+ <a href="mailto:community@astrbot.app">Email</a>
36
+
37
+ </div>
38
+
39
+ AstrBot 是一个开源的一站式 Agentic 个人和群聊助手,可在 QQ、Telegram、企业微信、飞书、钉钉、Slack、等数十款主流即时通讯软件上部署,此外还内置类似 OpenWebUI 的轻量化 ChatUI,为个人、开发者和团队打造可靠、可扩展的对话式智能基础设施。无论是个人 AI 伙伴、智能客服、自动化助手,还是企业知识库,AstrBot 都能在你的即时通讯软件平台的工作流中快速构建 AI 应用。
40
+
41
+ ![landingpage](https://github.com/user-attachments/assets/45fc5699-cddf-4e21-af35-13040706f6c0)
42
+
43
+ ## 主要功能
44
+
45
+ 1. 💯 免费 & 开源。
46
+ 2. ✨ AI 大模型对话,多模态,Agent,MCP,Skills,知识库,人格设定,自动压缩对话。
47
+ 3. 🤖 支持接入 Dify、阿里云百炼、Coze 等智能体平台。
48
+ 4. 🌐 多平台,支持 QQ、企业微信、飞书、钉钉、微信公众号、Telegram、Slack 以及[更多](#支持的消息平台)。
49
+ 5. 📦 插件扩展,已有 1000+ 个插件可一键安装。
50
+ 6. 🛡️ [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) 隔离化环境,安全地执行任何代码、调用 Shell、会话级资���复用。
51
+ 7. 💻 WebUI 支持。
52
+ 8. 🌈 Web ChatUI 支持,ChatUI 内置代理沙盒、网页搜索等。
53
+ 9. 🌐 国际化(i18n)支持。
54
+
55
+ <br>
56
+
57
+ <table align="center">
58
+ <tr align="center">
59
+ <th>💙 角色扮演 & 情感陪伴</th>
60
+ <th>✨ 主动式 Agent</th>
61
+ <th>🚀 通用 Agentic 能力</th>
62
+ <th>🧩 1000+ 社区插件</th>
63
+ </tr>
64
+ <tr>
65
+ <td align="center"><p align="center"><img width="984" height="1746" alt="99b587c5d35eea09d84f33e6cf6cfd4f" src="https://github.com/user-attachments/assets/89196061-3290-458d-b51f-afa178049f84" /></p></td>
66
+ <td align="center"><p align="center"><img width="976" height="1612" alt="c449acd838c41d0915cc08a3824025b1" src="https://github.com/user-attachments/assets/f75368b4-e022-41dc-a9e0-131c3e73e32e" /></p></td>
67
+ <td align="center"><p align="center"><img width="974" height="1732" alt="image" src="https://github.com/user-attachments/assets/e22a3968-87d7-4708-a7cd-e7f198c7c32e" /></p></td>
68
+ <td align="center"><p align="center"><img width="976" height="1734" alt="image" src="https://github.com/user-attachments/assets/0952b395-6b4a-432a-8a50-c294b7f89750" /></p></td>
69
+ </tr>
70
+ </table>
71
+
72
+ ## 快速开始
73
+
74
+ ### 一键部署
75
+
76
+ 对于想快速体验 AstrBot、且熟悉命令行并能够自行安装 `uv` 环境的用户,我们推荐使用 `uv` 一键部署方式 ⚡️。
77
+
78
+ ```bash
79
+ uv tool install astrbot
80
+ astrbot init # 仅首次执行此命令以初始化环境
81
+ astrbot run
82
+ ```
83
+
84
+ > 需要安装 [uv](https://docs.astral.sh/uv/)。
85
+
86
+ > [!NOTE]
87
+ > 对于 macOS 用户:由于 macOS 安全检查,首次运行 `astrbot` 命令可能需要较长时间(约 10-20 秒)。
88
+
89
+ 更新 `astrbot`:
90
+
91
+ ```bash
92
+ uv tool upgrade astrbot
93
+ ```
94
+
95
+ ### Docker 部署
96
+
97
+ 对于熟悉容器、希望获得更稳定且更适合生产环境部署方式的用户,我们推荐使用 Docker / Docker Compose 部署 AstrBot。
98
+
99
+ 请参考官方文档 [使用 Docker 部署 AstrBot](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot)。
100
+
101
+ ### 在 雨云 上部署
102
+
103
+ 对于希望一键部署 AstrBot 且不想自行管理服务器的用户,我们推荐使用雨云的一键云部署服务 ☁️:
104
+
105
+ [![Deploy on RainYun](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-en.svg)](https://app.rainyun.com/apps/rca/store/5994?ref=NjU1ODg0)
106
+
107
+ ### 桌面客户端部署
108
+
109
+ 对于希望在桌面端使用 AstrBot、并以 ChatUI 为主要入口的用户,我们推荐使用 AstrBot App。
110
+
111
+ 前往 [AstrBot-desktop](https://github.com/AstrBotDevs/AstrBot-desktop) 下载并安装;该方式面向桌面使用,不推荐服务器场景。
112
+
113
+ ### 启动器部署
114
+
115
+ 同样在桌面端,希望快速部署并实现环境隔离多开的用户,我们推荐使用 AstrBot Launcher。
116
+
117
+ 前往 [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) 下载并安装。
118
+
119
+ ### 在 Replit 上部署
120
+
121
+ Replit 部署由社区维护,适合在线演示和轻量试用场景。
122
+
123
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
124
+
125
+ ### AUR
126
+
127
+ AUR 方式面向 Arch Linux 用户,适合希望通过系统包管理器安装 AstrBot 的场景。
128
+
129
+ 在终端执行下方命令安装 `astrbot-git` 包,安装完成后即可启动使用。
130
+
131
+ ```bash
132
+ yay -S astrbot-git
133
+ ```
134
+
135
+ **更多部署方式**
136
+
137
+ 若你需要面板化或更高自定义部署,可参考 [宝塔面板](https://astrbot.app/deploy/astrbot/btpanel.html)(BT Panel 应用商店安装)、[1Panel](https://astrbot.app/deploy/astrbot/1panel.html)(1Panel 应用商店安装)、[CasaOS](https://astrbot.app/deploy/astrbot/casaos.html)(NAS / 家庭服务器可视化部署)和 [手动部署](https://astrbot.app/deploy/astrbot/cli.html)(基于源码与 `uv` 的完整自定义安装)。
138
+
139
+ ## 支持的消息平台
140
+
141
+ 将 AstrBot 连接到你常用的聊天平台。
142
+
143
+ | 平台 | 维护方 |
144
+ |---------|---------------|
145
+ | **QQ** | 官方维护 |
146
+ | **OneBot v11** | 官方维护 |
147
+ | **Telegram** | 官方维护 |
148
+ | **企微应用 & 企微智能机器人** | 官方维护 |
149
+ | **微信客服 & 微信公众号** | 官方维护 |
150
+ | **飞书** | 官方维护 |
151
+ | **钉钉** | 官方维护 |
152
+ | **Slack** | 官方维护 |
153
+ | **Discord** | 官方维护 |
154
+ | **LINE** | 官方维护 |
155
+ | **Satori** | 官方维护 |
156
+ | **Misskey** | 官方维护 |
157
+ | **Whatsapp (将支持)** | 官方维护 |
158
+ | [**Matrix**](https://github.com/stevessr/astrbot_plugin_matrix_adapter) | 社区维护 |
159
+ | [**KOOK**](https://github.com/wuyan1003/astrbot_plugin_kook_adapter) | 社区维护 |
160
+ | [**VoceChat**](https://github.com/HikariFroya/astrbot_plugin_vocechat) | 社区维护 |
161
+
162
+ ## 支持的模型提供商
163
+
164
+ | 提供商 | 类型 |
165
+ |---------|---------------|
166
+ | 自定义 | 任何 OpenAI API 兼容的服务 |
167
+ | OpenAI | LLM |
168
+ | Anthropic | LLM |
169
+ | Google Gemini | LLM |
170
+ | Moonshot AI | LLM |
171
+ | 智谱 AI | LLM |
172
+ | DeepSeek | LLM |
173
+ | Ollama (本地部署) | LLM |
174
+ | LM Studio (本地部署) | LLM |
175
+ | [AIHubMix](https://aihubmix.com/?aff=4bfH) | LLM (API 网关, 支持所有模型) |
176
+ | [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74) | LLM (API 网关, 支持所有模型) |
177
+ | [硅基流动](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot) | LLM (API 网关, 支持所有模型) |
178
+ | [PPIO 派欧云](https://ppio.com/user/register?invited_by=AIOONE) | LLM (API 网关, 支持所有模型) |
179
+ | [302.AI](https://share.302.ai/rr1M3l) | LLM (API 网关, 支持所有模型)|
180
+ | [小马算力](https://www.tokenpony.cn/3YPyf) | LLM (API 网关, 支持所有模型)|
181
+ | ModelScope | LLM |
182
+ | OneAPI | LLM |
183
+ | Dify | LLMOps 平台 |
184
+ | 阿里云百炼应用 | LLMOps 平台 |
185
+ | Coze | LLMOps 平台 |
186
+ | OpenAI Whisper | 语音转文本 |
187
+ | SenseVoice | 语音转文本 |
188
+ | OpenAI TTS | 文本转语音 |
189
+ | Gemini TTS | 文本转语音 |
190
+ | GPT-Sovits-Inference | 文本转语音 |
191
+ | GPT-Sovits | 文本转语音 |
192
+ | FishAudio | 文本转语音 |
193
+ | Edge TTS | 文本转语音 |
194
+ | 阿里云百炼 TTS | 文本转语音 |
195
+ | Azure TTS | 文本转语音 |
196
+ | Minimax TTS | 文本转语音 |
197
+ | 火山引擎 TTS | 文本转语音 |
198
+
199
+ ## ❤️ 贡献
200
+
201
+ 欢迎任何 Issues/Pull Requests!只需要将你的更改提交到此项目 :)
202
+
203
+ ### 如何贡献
204
+
205
+ 你可以通过查看问题或帮助审核 PR(拉取请求)来贡献。任何问题或 PR 都欢迎参与,以促进社区贡献。当然,这些只是建议,你可以以任何方式进行贡献。对于新功能的添加,请先通过 Issue 讨论。
206
+
207
+ ### 开发环境
208
+
209
+ AstrBot 使用 `ruff` 进行代码格式化和检查。
210
+
211
+ ```bash
212
+ git clone https://github.com/AstrBotDevs/AstrBot
213
+ pip install pre-commit
214
+ pre-commit install
215
+ ```
216
+
217
+ ## 🌍 社区
218
+
219
+ ### QQ 群组
220
+
221
+ - 9 群: 1076659624 (新)
222
+ - 10 群: 1078079676 (新)
223
+ - 1 群:322154837
224
+ - 3 群:630166526
225
+ - 5 群:822130018
226
+ - 6 群:753075035
227
+ - 7 群:743746109
228
+ - 8 群:1030353265
229
+ - 开发者群(偏闲聊吹水):975206796
230
+ - 开发者群(正式):1039761811
231
+
232
+ ### Discord 频道
233
+
234
+ - [Discord](https://discord.gg/hAVk6tgV36)
235
+
236
+ ## ❤️ Special Thanks
237
+
238
+ 特别感谢所有 Contributors 和插件开发者对 AstrBot 的贡献 ❤️
239
+
240
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
241
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot&max=200&columns=14" />
242
+ </a>
243
+
244
+ 此外,本项目的诞生离不开以下开源项目的帮助:
245
+
246
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 伟大的猫猫框架
247
+
248
+ 开源项目友情链接:
249
+
250
+ - [NoneBot2](https://github.com/nonebot/nonebot2) - 优秀的 Python 异步 ChatBot 框架
251
+ - [Koishi](https://github.com/koishijs/koishi) - 优秀的 Node.js ChatBot 框架
252
+ - [MaiBot](https://github.com/Mai-with-u/MaiBot) - 优秀的拟人化 AI ChatBot
253
+ - [nekro-agent](https://github.com/KroMiose/nekro-agent) - 优秀的 Agent ChatBot
254
+ - [LangBot](https://github.com/langbot-app/LangBot) - 优秀的多平台 AI ChatBot
255
+ - [ChatLuna](https://github.com/ChatLunaLab/chatluna) - 优秀的多平台 AI ChatBot Koishi 插件
256
+ - [Operit AI](https://github.com/AAswordman/Operit) - 优秀的 AI 智能助手 Android APP
257
+
258
+ ## ⭐ Star History
259
+
260
+ > [!TIP]
261
+ > 如果本项目对您的生活 / 工作产生了帮助,或者您关注本项目的未来发展,请给项目 Star,这是我们维护这个开源项目的动力 <3
262
+
263
+ <div align="center">
264
+
265
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
266
+
267
+ </div>
268
+
269
+ <div align="center">
270
+
271
+ _陪伴与能力从来不应该是对立面。我们希望创造的是一个既能理解情绪、给予陪伴,也能可靠完成工作的机器人。_
272
+
273
+ _私は、高性能ですから!_
274
+
275
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
276
+
277
+ </div>
astrbot/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from .core.log import LogManager
2
+
3
+ logger = LogManager.GetLogger(log_name="astrbot")
astrbot/api/__init__.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from astrbot import logger
2
+ from astrbot.core import html_renderer, sp
3
+ from astrbot.core.agent.tool import FunctionTool, ToolSet
4
+ from astrbot.core.agent.tool_executor import BaseFunctionToolExecutor
5
+ from astrbot.core.config.astrbot_config import AstrBotConfig
6
+ from astrbot.core.star.register import register_agent as agent
7
+ from astrbot.core.star.register import register_llm_tool as llm_tool
8
+
9
+ __all__ = [
10
+ "AstrBotConfig",
11
+ "BaseFunctionToolExecutor",
12
+ "FunctionTool",
13
+ "ToolSet",
14
+ "agent",
15
+ "html_renderer",
16
+ "llm_tool",
17
+ "logger",
18
+ "sp",
19
+ ]
astrbot/api/all.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from astrbot.core.config.astrbot_config import AstrBotConfig
2
+ from astrbot import logger
3
+ from astrbot.core import html_renderer
4
+ from astrbot.core.star.register import register_llm_tool as llm_tool
5
+
6
+ # event
7
+ from astrbot.core.message.message_event_result import (
8
+ MessageEventResult,
9
+ MessageChain,
10
+ CommandResult,
11
+ EventResultType,
12
+ )
13
+ from astrbot.core.platform import AstrMessageEvent
14
+
15
+ # star register
16
+ from astrbot.core.star.register import (
17
+ register_command as command,
18
+ register_command_group as command_group,
19
+ register_event_message_type as event_message_type,
20
+ register_regex as regex,
21
+ register_platform_adapter_type as platform_adapter_type,
22
+ )
23
+ from astrbot.core.star.filter.event_message_type import (
24
+ EventMessageTypeFilter,
25
+ EventMessageType,
26
+ )
27
+ from astrbot.core.star.filter.platform_adapter_type import (
28
+ PlatformAdapterTypeFilter,
29
+ PlatformAdapterType,
30
+ )
31
+ from astrbot.core.star.register import (
32
+ register_star as register, # 注册插件(Star)
33
+ )
34
+ from astrbot.core.star import Context, Star
35
+ from astrbot.core.star.config import *
36
+
37
+
38
+ # provider
39
+ from astrbot.core.provider import Provider, ProviderMetaData
40
+ from astrbot.core.db.po import Personality
41
+
42
+ # platform
43
+ from astrbot.core.platform import (
44
+ AstrMessageEvent,
45
+ Platform,
46
+ AstrBotMessage,
47
+ MessageMember,
48
+ MessageType,
49
+ PlatformMetadata,
50
+ )
51
+
52
+ from astrbot.core.platform.register import register_platform_adapter
53
+
54
+ from .message_components import *
astrbot/api/event/__init__.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from astrbot.core.message.message_event_result import (
2
+ CommandResult,
3
+ EventResultType,
4
+ MessageChain,
5
+ MessageEventResult,
6
+ ResultContentType,
7
+ )
8
+ from astrbot.core.platform import AstrMessageEvent
9
+
10
+ __all__ = [
11
+ "AstrMessageEvent",
12
+ "CommandResult",
13
+ "EventResultType",
14
+ "MessageChain",
15
+ "MessageEventResult",
16
+ "ResultContentType",
17
+ ]
astrbot/api/event/filter/__init__.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from astrbot.core.star.filter.custom_filter import CustomFilter
2
+ from astrbot.core.star.filter.event_message_type import (
3
+ EventMessageType,
4
+ EventMessageTypeFilter,
5
+ )
6
+ from astrbot.core.star.filter.permission import PermissionType, PermissionTypeFilter
7
+ from astrbot.core.star.filter.platform_adapter_type import (
8
+ PlatformAdapterType,
9
+ PlatformAdapterTypeFilter,
10
+ )
11
+ from astrbot.core.star.register import register_after_message_sent as after_message_sent
12
+ from astrbot.core.star.register import register_command as command
13
+ from astrbot.core.star.register import register_command_group as command_group
14
+ from astrbot.core.star.register import register_custom_filter as custom_filter
15
+ from astrbot.core.star.register import register_event_message_type as event_message_type
16
+ from astrbot.core.star.register import register_llm_tool as llm_tool
17
+ from astrbot.core.star.register import register_on_astrbot_loaded as on_astrbot_loaded
18
+ from astrbot.core.star.register import (
19
+ register_on_decorating_result as on_decorating_result,
20
+ )
21
+ from astrbot.core.star.register import register_on_llm_request as on_llm_request
22
+ from astrbot.core.star.register import register_on_llm_response as on_llm_response
23
+ from astrbot.core.star.register import (
24
+ register_on_llm_tool_respond as on_llm_tool_respond,
25
+ )
26
+ from astrbot.core.star.register import register_on_platform_loaded as on_platform_loaded
27
+ from astrbot.core.star.register import register_on_plugin_error as on_plugin_error
28
+ from astrbot.core.star.register import register_on_plugin_loaded as on_plugin_loaded
29
+ from astrbot.core.star.register import register_on_plugin_unloaded as on_plugin_unloaded
30
+ from astrbot.core.star.register import register_on_using_llm_tool as on_using_llm_tool
31
+ from astrbot.core.star.register import (
32
+ register_on_waiting_llm_request as on_waiting_llm_request,
33
+ )
34
+ from astrbot.core.star.register import register_permission_type as permission_type
35
+ from astrbot.core.star.register import (
36
+ register_platform_adapter_type as platform_adapter_type,
37
+ )
38
+ from astrbot.core.star.register import register_regex as regex
39
+
40
+ __all__ = [
41
+ "CustomFilter",
42
+ "EventMessageType",
43
+ "EventMessageTypeFilter",
44
+ "PermissionType",
45
+ "PermissionTypeFilter",
46
+ "PlatformAdapterType",
47
+ "PlatformAdapterTypeFilter",
48
+ "after_message_sent",
49
+ "command",
50
+ "command_group",
51
+ "custom_filter",
52
+ "event_message_type",
53
+ "llm_tool",
54
+ "on_astrbot_loaded",
55
+ "on_decorating_result",
56
+ "on_llm_request",
57
+ "on_llm_response",
58
+ "on_plugin_error",
59
+ "on_plugin_loaded",
60
+ "on_plugin_unloaded",
61
+ "on_platform_loaded",
62
+ "on_waiting_llm_request",
63
+ "permission_type",
64
+ "platform_adapter_type",
65
+ "regex",
66
+ "on_using_llm_tool",
67
+ "on_llm_tool_respond",
68
+ ]
astrbot/api/message_components.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from astrbot.core.message.components import *
astrbot/api/platform/__init__.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from astrbot.core.message.components import *
2
+ from astrbot.core.platform import (
3
+ AstrBotMessage,
4
+ AstrMessageEvent,
5
+ Group,
6
+ MessageMember,
7
+ MessageType,
8
+ Platform,
9
+ PlatformMetadata,
10
+ )
11
+ from astrbot.core.platform.register import register_platform_adapter
12
+
13
+ __all__ = [
14
+ "AstrBotMessage",
15
+ "AstrMessageEvent",
16
+ "Group",
17
+ "MessageMember",
18
+ "MessageType",
19
+ "Platform",
20
+ "PlatformMetadata",
21
+ "register_platform_adapter",
22
+ ]
astrbot/api/provider/__init__.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from astrbot.core.db.po import Personality
2
+ from astrbot.core.provider import Provider, STTProvider
3
+ from astrbot.core.provider.entities import (
4
+ LLMResponse,
5
+ ProviderMetaData,
6
+ ProviderRequest,
7
+ ProviderType,
8
+ )
9
+
10
+ __all__ = [
11
+ "LLMResponse",
12
+ "Personality",
13
+ "Provider",
14
+ "ProviderMetaData",
15
+ "ProviderRequest",
16
+ "ProviderType",
17
+ "STTProvider",
18
+ ]
astrbot/api/star/__init__.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from astrbot.core.star import Context, Star, StarTools
2
+ from astrbot.core.star.config import *
3
+ from astrbot.core.star.register import (
4
+ register_star as register, # 注册插件(Star)
5
+ )
6
+
7
+ __all__ = ["Context", "Star", "StarTools", "register"]
astrbot/api/util/__init__.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from astrbot.core.utils.session_waiter import (
2
+ SessionController,
3
+ SessionWaiter,
4
+ session_waiter,
5
+ )
6
+
7
+ __all__ = ["SessionController", "SessionWaiter", "session_waiter"]
astrbot/builtin_stars/astrbot/long_term_memory.py ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datetime
2
+ import random
3
+ import uuid
4
+ from collections import defaultdict
5
+
6
+ from astrbot import logger
7
+ from astrbot.api import star
8
+ from astrbot.api.event import AstrMessageEvent
9
+ from astrbot.api.message_components import At, Image, Plain
10
+ from astrbot.api.platform import MessageType
11
+ from astrbot.api.provider import LLMResponse, Provider, ProviderRequest
12
+ from astrbot.core.astrbot_config_mgr import AstrBotConfigManager
13
+
14
+ """
15
+ 聊天记忆增强
16
+ """
17
+
18
+
19
+ class LongTermMemory:
20
+ def __init__(self, acm: AstrBotConfigManager, context: star.Context) -> None:
21
+ self.acm = acm
22
+ self.context = context
23
+ self.session_chats = defaultdict(list)
24
+ """记录群成员的群聊记录"""
25
+
26
+ def cfg(self, event: AstrMessageEvent):
27
+ cfg = self.context.get_config(umo=event.unified_msg_origin)
28
+ try:
29
+ max_cnt = int(cfg["provider_ltm_settings"]["group_message_max_cnt"])
30
+ except BaseException as e:
31
+ logger.error(e)
32
+ max_cnt = 300
33
+ image_caption_prompt = cfg["provider_settings"]["image_caption_prompt"]
34
+ image_caption_provider_id = cfg["provider_ltm_settings"].get(
35
+ "image_caption_provider_id"
36
+ )
37
+ image_caption = cfg["provider_ltm_settings"]["image_caption"] and bool(
38
+ image_caption_provider_id
39
+ )
40
+ active_reply = cfg["provider_ltm_settings"]["active_reply"]
41
+ enable_active_reply = active_reply.get("enable", False)
42
+ ar_method = active_reply["method"]
43
+ ar_possibility = active_reply["possibility_reply"]
44
+ ar_prompt = active_reply.get("prompt", "")
45
+ ar_whitelist = active_reply.get("whitelist", [])
46
+ ret = {
47
+ "max_cnt": max_cnt,
48
+ "image_caption": image_caption,
49
+ "image_caption_prompt": image_caption_prompt,
50
+ "image_caption_provider_id": image_caption_provider_id,
51
+ "enable_active_reply": enable_active_reply,
52
+ "ar_method": ar_method,
53
+ "ar_possibility": ar_possibility,
54
+ "ar_prompt": ar_prompt,
55
+ "ar_whitelist": ar_whitelist,
56
+ }
57
+ return ret
58
+
59
+ async def remove_session(self, event: AstrMessageEvent) -> int:
60
+ cnt = 0
61
+ if event.unified_msg_origin in self.session_chats:
62
+ cnt = len(self.session_chats[event.unified_msg_origin])
63
+ del self.session_chats[event.unified_msg_origin]
64
+ return cnt
65
+
66
+ async def get_image_caption(
67
+ self,
68
+ image_url: str,
69
+ image_caption_provider_id: str,
70
+ image_caption_prompt: str,
71
+ ) -> str:
72
+ if not image_caption_provider_id:
73
+ provider = self.context.get_using_provider()
74
+ else:
75
+ provider = self.context.get_provider_by_id(image_caption_provider_id)
76
+ if not provider:
77
+ raise Exception(f"没有找到 ID 为 {image_caption_provider_id} 的提供商")
78
+ if not isinstance(provider, Provider):
79
+ raise Exception(f"提供商类型错误({type(provider)}),无法获取图片描述")
80
+ response = await provider.text_chat(
81
+ prompt=image_caption_prompt,
82
+ session_id=uuid.uuid4().hex,
83
+ image_urls=[image_url],
84
+ persist=False,
85
+ )
86
+ return response.completion_text
87
+
88
+ async def need_active_reply(self, event: AstrMessageEvent) -> bool:
89
+ cfg = self.cfg(event)
90
+ if not cfg["enable_active_reply"]:
91
+ return False
92
+ if event.get_message_type() != MessageType.GROUP_MESSAGE:
93
+ return False
94
+
95
+ if event.is_at_or_wake_command:
96
+ # if the message is a command, let it pass
97
+ return False
98
+
99
+ if cfg["ar_whitelist"] and (
100
+ event.unified_msg_origin not in cfg["ar_whitelist"]
101
+ and (
102
+ event.get_group_id() and event.get_group_id() not in cfg["ar_whitelist"]
103
+ )
104
+ ):
105
+ return False
106
+
107
+ match cfg["ar_method"]:
108
+ case "possibility_reply":
109
+ trig = random.random() < cfg["ar_possibility"]
110
+ return trig
111
+
112
+ return False
113
+
114
+ async def handle_message(self, event: AstrMessageEvent) -> None:
115
+ """仅支持群聊"""
116
+ if event.get_message_type() == MessageType.GROUP_MESSAGE:
117
+ datetime_str = datetime.datetime.now().strftime("%H:%M:%S")
118
+
119
+ parts = [f"[{event.message_obj.sender.nickname}/{datetime_str}]: "]
120
+
121
+ cfg = self.cfg(event)
122
+
123
+ for comp in event.get_messages():
124
+ if isinstance(comp, Plain):
125
+ parts.append(f" {comp.text}")
126
+ elif isinstance(comp, Image):
127
+ if cfg["image_caption"]:
128
+ try:
129
+ url = comp.url if comp.url else comp.file
130
+ if not url:
131
+ raise Exception("图片 URL 为空")
132
+ caption = await self.get_image_caption(
133
+ url,
134
+ cfg["image_caption_provider_id"],
135
+ cfg["image_caption_prompt"],
136
+ )
137
+ parts.append(f" [Image: {caption}]")
138
+ except Exception as e:
139
+ logger.error(f"获取图片描述失败: {e}")
140
+ else:
141
+ parts.append(" [Image]")
142
+ elif isinstance(comp, At):
143
+ parts.append(f" [At: {comp.name}]")
144
+
145
+ final_message = "".join(parts)
146
+ logger.debug(f"ltm | {event.unified_msg_origin} | {final_message}")
147
+ self.session_chats[event.unified_msg_origin].append(final_message)
148
+ if len(self.session_chats[event.unified_msg_origin]) > cfg["max_cnt"]:
149
+ self.session_chats[event.unified_msg_origin].pop(0)
150
+
151
+ async def on_req_llm(self, event: AstrMessageEvent, req: ProviderRequest) -> None:
152
+ """当触发 LLM 请求前,调用此方法修改 req"""
153
+ if event.unified_msg_origin not in self.session_chats:
154
+ return
155
+
156
+ chats_str = "\n---\n".join(self.session_chats[event.unified_msg_origin])
157
+
158
+ cfg = self.cfg(event)
159
+ if cfg["enable_active_reply"]:
160
+ prompt = req.prompt
161
+ req.prompt = (
162
+ f"You are now in a chatroom. The chat history is as follows:\n{chats_str}"
163
+ f"\nNow, a new message is coming: `{prompt}`. "
164
+ "Please react to it. Only output your response and do not output any other information. "
165
+ "You MUST use the SAME language as the chatroom is using."
166
+ )
167
+ req.contexts = [] # 清空上下文,当使用了主动回复,所有聊天记录都在一个prompt中。
168
+ else:
169
+ req.system_prompt += (
170
+ "You are now in a chatroom. The chat history is as follows: \n"
171
+ )
172
+ req.system_prompt += chats_str
173
+
174
+ async def after_req_llm(
175
+ self, event: AstrMessageEvent, llm_resp: LLMResponse
176
+ ) -> None:
177
+ if event.unified_msg_origin not in self.session_chats:
178
+ return
179
+
180
+ if llm_resp.completion_text:
181
+ final_message = f"[You/{datetime.datetime.now().strftime('%H:%M:%S')}]: {llm_resp.completion_text}"
182
+ logger.debug(
183
+ f"Recorded AI response: {event.unified_msg_origin} | {final_message}"
184
+ )
185
+ self.session_chats[event.unified_msg_origin].append(final_message)
186
+ cfg = self.cfg(event)
187
+ if len(self.session_chats[event.unified_msg_origin]) > cfg["max_cnt"]:
188
+ self.session_chats[event.unified_msg_origin].pop(0)
astrbot/builtin_stars/astrbot/main.py ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import traceback
2
+
3
+ from astrbot.api import star
4
+ from astrbot.api.event import AstrMessageEvent, filter
5
+ from astrbot.api.message_components import Image, Plain
6
+ from astrbot.api.provider import LLMResponse, ProviderRequest
7
+ from astrbot.core import logger
8
+
9
+ from .long_term_memory import LongTermMemory
10
+
11
+
12
+ class Main(star.Star):
13
+ def __init__(self, context: star.Context) -> None:
14
+ self.context = context
15
+ self.ltm = None
16
+ try:
17
+ self.ltm = LongTermMemory(self.context.astrbot_config_mgr, self.context)
18
+ except BaseException as e:
19
+ logger.error(f"聊天增强 err: {e}")
20
+
21
+ def ltm_enabled(self, event: AstrMessageEvent):
22
+ ltmse = self.context.get_config(umo=event.unified_msg_origin)[
23
+ "provider_ltm_settings"
24
+ ]
25
+ return ltmse["group_icl_enable"] or ltmse["active_reply"]["enable"]
26
+
27
+ @filter.platform_adapter_type(filter.PlatformAdapterType.ALL)
28
+ async def on_message(self, event: AstrMessageEvent):
29
+ """群聊记忆增强"""
30
+ has_image_or_plain = False
31
+ for comp in event.message_obj.message:
32
+ if isinstance(comp, Plain) or isinstance(comp, Image):
33
+ has_image_or_plain = True
34
+ break
35
+
36
+ if self.ltm_enabled(event) and self.ltm and has_image_or_plain:
37
+ need_active = await self.ltm.need_active_reply(event)
38
+
39
+ group_icl_enable = self.context.get_config()["provider_ltm_settings"][
40
+ "group_icl_enable"
41
+ ]
42
+ if group_icl_enable:
43
+ """记录对话"""
44
+ try:
45
+ await self.ltm.handle_message(event)
46
+ except BaseException as e:
47
+ logger.error(e)
48
+
49
+ if need_active:
50
+ """主动回复"""
51
+ provider = self.context.get_using_provider(event.unified_msg_origin)
52
+ if not provider:
53
+ logger.error("未找到任何 LLM 提供商。请先配置。无法主动回复")
54
+ return
55
+ try:
56
+ conv = None
57
+ session_curr_cid = await self.context.conversation_manager.get_curr_conversation_id(
58
+ event.unified_msg_origin,
59
+ )
60
+
61
+ if not session_curr_cid:
62
+ logger.error(
63
+ "当前未处于对话状态,无法主动回复,请确保 平台设置->会话隔离(unique_session) 未开启,并使用 /switch 序号 切换或者 /new 创建一个会话。",
64
+ )
65
+ return
66
+
67
+ conv = await self.context.conversation_manager.get_conversation(
68
+ event.unified_msg_origin,
69
+ session_curr_cid,
70
+ )
71
+
72
+ prompt = event.message_str
73
+
74
+ if not conv:
75
+ logger.error("未找到对话,无法主动回复")
76
+ return
77
+
78
+ yield event.request_llm(
79
+ prompt=prompt,
80
+ session_id=event.session_id,
81
+ conversation=conv,
82
+ )
83
+ except BaseException as e:
84
+ logger.error(traceback.format_exc())
85
+ logger.error(f"主动回复失败: {e}")
86
+
87
+ @filter.on_llm_request()
88
+ async def decorate_llm_req(
89
+ self, event: AstrMessageEvent, req: ProviderRequest
90
+ ) -> None:
91
+ """在请求 LLM 前注入人格信息、Identifier、时间、回复内容等 System Prompt"""
92
+ if self.ltm and self.ltm_enabled(event):
93
+ try:
94
+ await self.ltm.on_req_llm(event, req)
95
+ except BaseException as e:
96
+ logger.error(f"ltm: {e}")
97
+
98
+ @filter.on_llm_response()
99
+ async def record_llm_resp_to_ltm(
100
+ self, event: AstrMessageEvent, resp: LLMResponse
101
+ ) -> None:
102
+ """在 LLM 响应后记录对话"""
103
+ if self.ltm and self.ltm_enabled(event):
104
+ try:
105
+ await self.ltm.after_req_llm(event, resp)
106
+ except Exception as e:
107
+ logger.error(f"ltm: {e}")
108
+
109
+ @filter.after_message_sent()
110
+ async def after_message_sent(self, event: AstrMessageEvent) -> None:
111
+ """消息发送后处理"""
112
+ if self.ltm and self.ltm_enabled(event):
113
+ try:
114
+ clean_session = event.get_extra("_clean_ltm_session", False)
115
+ if clean_session:
116
+ await self.ltm.remove_session(event)
117
+ except Exception as e:
118
+ logger.error(f"ltm: {e}")