kyle-ai commited on
Commit
af636cf
·
verified ·
1 Parent(s): 910a879

Upload 896 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 +24 -0
  2. .gitattributes +1 -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 +42 -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/code-format.yml +34 -0
  12. .github/workflows/codeql.yml +93 -0
  13. .github/workflows/coverage_test.yml +45 -0
  14. .github/workflows/dashboard_ci.yml +55 -0
  15. .github/workflows/docker-image.yml +198 -0
  16. .github/workflows/release.yml +377 -0
  17. .github/workflows/smoke_test.yml +58 -0
  18. .github/workflows/stale.yml +64 -0
  19. .gitignore +63 -0
  20. .pre-commit-config.yaml +25 -0
  21. .python-version +1 -0
  22. AGENTS.md +34 -0
  23. CODE_OF_CONDUCT.md +128 -0
  24. CONTRIBUTING.md +90 -0
  25. Dockerfile +32 -0
  26. EULA.md +244 -0
  27. FIRST_NOTICE.en-US.md +14 -0
  28. FIRST_NOTICE.md +14 -0
  29. LICENSE +661 -0
  30. Makefile +32 -0
  31. README.md +291 -10
  32. README_en.md +296 -0
  33. README_fr.md +291 -0
  34. README_ja.md +292 -0
  35. README_ru.md +283 -0
  36. README_zh-TW.md +282 -0
  37. astrbot/__init__.py +3 -0
  38. astrbot/api/__init__.py +19 -0
  39. astrbot/api/all.py +54 -0
  40. astrbot/api/event/__init__.py +17 -0
  41. astrbot/api/event/filter/__init__.py +64 -0
  42. astrbot/api/message_components.py +1 -0
  43. astrbot/api/platform/__init__.py +22 -0
  44. astrbot/api/provider/__init__.py +18 -0
  45. astrbot/api/star/__init__.py +7 -0
  46. astrbot/api/util/__init__.py +7 -0
  47. astrbot/builtin_stars/astrbot/long_term_memory.py +188 -0
  48. astrbot/builtin_stars/astrbot/main.py +118 -0
  49. astrbot/builtin_stars/astrbot/metadata.yaml +4 -0
  50. astrbot/builtin_stars/builtin_commands/commands/__init__.py +29 -0
.dockerignore ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ changelogs/
21
+ tests/
22
+ .ruff_cache/
23
+ .astrbot
24
+ astrbot.lock
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ 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,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ name: '🎉 功能建议'
3
+ title: "[Feature]"
4
+ description: 提交建议帮助我们改进。
5
+ labels: [ "enhancement" ]
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ 感谢您抽出时间提出新功能建议,请准确解释您的想法。
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: 描述
15
+ description: 简短描述您的功能建议。
16
+
17
+ - type: textarea
18
+ attributes:
19
+ label: 使用场景
20
+ description: 你想要发生什么?
21
+ placeholder: >
22
+ 一个清晰且具体的描述这个功能的使用场景。
23
+
24
+ - type: checkboxes
25
+ attributes:
26
+ label: 你愿意提交PR吗?
27
+ description: >
28
+ 这不是必须的,但我们欢迎您的贡献。
29
+ options:
30
+ - label: 是的, 我愿意提交PR!
31
+
32
+ - type: checkboxes
33
+ attributes:
34
+ label: Code of Conduct
35
+ options:
36
+ - label: >
37
+ 我已阅读并同意遵守该项目的 [行为准则](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
38
+ required: true
39
+
40
+ - type: markdown
41
+ attributes:
42
+ value: "感谢您填写我们的表单!"
.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:6185 (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: 6185 (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/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=. -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@v6
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
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@v3
68
+
69
+ - name: Set Docker Buildx
70
+ uses: docker/setup-buildx-action@v3
71
+
72
+ - name: Log in to DockerHub
73
+ uses: docker/login-action@v3
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@v3
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@v6
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@v3
167
+
168
+ - name: Set Docker Buildx
169
+ uses: docker/setup-buildx-action@v3
170
+
171
+ - name: Log in to DockerHub
172
+ uses: docker/login-action@v3
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@v3
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@v6
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,377 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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@v6
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
+ build-desktop:
106
+ name: Build ${{ matrix.name }}
107
+ runs-on: ${{ matrix.runner }}
108
+ strategy:
109
+ fail-fast: false
110
+ matrix:
111
+ include:
112
+ - name: linux-x64
113
+ runner: ubuntu-24.04
114
+ os: linux
115
+ arch: amd64
116
+ - name: linux-arm64
117
+ runner: ubuntu-24.04-arm
118
+ os: linux
119
+ arch: arm64
120
+ - name: windows-x64
121
+ runner: windows-2022
122
+ os: win
123
+ arch: amd64
124
+ - name: windows-arm64
125
+ runner: windows-11-arm
126
+ os: win
127
+ arch: arm64
128
+ - name: macos-x64
129
+ runner: macos-15-intel
130
+ os: mac
131
+ arch: amd64
132
+ - name: macos-arm64
133
+ runner: macos-15
134
+ os: mac
135
+ arch: arm64
136
+ env:
137
+ CSC_IDENTITY_AUTO_DISCOVERY: "false"
138
+ steps:
139
+ - name: Checkout repository
140
+ uses: actions/checkout@v6
141
+ with:
142
+ fetch-depth: 0
143
+ ref: ${{ inputs.ref || github.ref }}
144
+
145
+ - name: Resolve tag
146
+ id: tag
147
+ shell: bash
148
+ run: |
149
+ if [ "${{ github.event_name }}" = "push" ]; then
150
+ tag="${GITHUB_REF_NAME}"
151
+ elif [ -n "${{ inputs.tag }}" ]; then
152
+ tag="${{ inputs.tag }}"
153
+ else
154
+ tag="$(git describe --tags --abbrev=0)"
155
+ fi
156
+ if [ -z "$tag" ]; then
157
+ echo "Failed to resolve tag." >&2
158
+ exit 1
159
+ fi
160
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
161
+
162
+ - name: Setup uv
163
+ uses: astral-sh/setup-uv@v7
164
+
165
+ - name: Setup Python
166
+ uses: actions/setup-python@v6
167
+ with:
168
+ python-version: "3.12"
169
+
170
+ - name: Setup pnpm
171
+ uses: pnpm/action-setup@v4
172
+ with:
173
+ version: 10.28.2
174
+
175
+ - name: Setup Node.js
176
+ uses: actions/setup-node@v6
177
+ with:
178
+ node-version: '24.13.0'
179
+ cache: "pnpm"
180
+ cache-dependency-path: |
181
+ dashboard/pnpm-lock.yaml
182
+ desktop/pnpm-lock.yaml
183
+
184
+ - name: Prepare OpenSSL for Windows ARM64
185
+ if: ${{ matrix.os == 'win' && matrix.arch == 'arm64' }}
186
+ shell: pwsh
187
+ run: |
188
+ git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
189
+ & C:\vcpkg\bootstrap-vcpkg.bat -disableMetrics
190
+ & C:\vcpkg\vcpkg.exe install openssl:arm64-windows
191
+
192
+ "VCPKG_ROOT=C:\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
193
+ "VCPKGRS_TRIPLET=arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
194
+ "OPENSSL_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
195
+ "OPENSSL_ROOT_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
196
+ "OPENSSL_LIB_DIR=C:\vcpkg\installed\arm64-windows\lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
197
+ "OPENSSL_INCLUDE_DIR=C:\vcpkg\installed\arm64-windows\include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
198
+
199
+ - name: Install dependencies
200
+ shell: bash
201
+ run: |
202
+ uv sync
203
+ pnpm --dir dashboard install --frozen-lockfile
204
+ pnpm --dir desktop install --frozen-lockfile
205
+
206
+ - name: Build desktop package
207
+ shell: bash
208
+ run: |
209
+ pnpm --dir dashboard run build
210
+ pnpm --dir desktop run build:webui
211
+ pnpm --dir desktop run build:backend
212
+ pnpm --dir desktop run sync:version
213
+ pnpm --dir desktop exec electron-builder --publish never
214
+
215
+ - name: Normalize artifact names
216
+ shell: bash
217
+ env:
218
+ NAME_PREFIX: AstrBot-${{ steps.tag.outputs.tag }}-${{ matrix.arch }}-${{ matrix.os }}
219
+ run: |
220
+ shopt -s nullglob
221
+ out_dir="desktop/dist/release"
222
+ mkdir -p "$out_dir"
223
+ files=(
224
+ desktop/dist/*.AppImage
225
+ desktop/dist/*.dmg
226
+ desktop/dist/*.zip
227
+ desktop/dist/*.exe
228
+ )
229
+ if [ ${#files[@]} -eq 0 ]; then
230
+ echo "No desktop artifacts found to rename." >&2
231
+ exit 1
232
+ fi
233
+ for src in "${files[@]}"; do
234
+ file="$(basename "$src")"
235
+ case "$file" in
236
+ *.AppImage)
237
+ dest="$out_dir/${NAME_PREFIX}.AppImage"
238
+ ;;
239
+ *.dmg)
240
+ dest="$out_dir/${NAME_PREFIX}.dmg"
241
+ ;;
242
+ *.exe)
243
+ dest="$out_dir/${NAME_PREFIX}.exe"
244
+ ;;
245
+ *.zip)
246
+ dest="$out_dir/${NAME_PREFIX}.zip"
247
+ ;;
248
+ *)
249
+ continue
250
+ ;;
251
+ esac
252
+ cp "$src" "$dest"
253
+ done
254
+ ls -la "$out_dir"
255
+
256
+ - name: Upload desktop artifacts
257
+ uses: actions/upload-artifact@v6
258
+ with:
259
+ name: AstrBot-${{ steps.tag.outputs.tag }}-${{ matrix.arch }}-${{ matrix.os }}
260
+ if-no-files-found: error
261
+ path: desktop/dist/release/*
262
+
263
+ publish-release:
264
+ name: Publish GitHub Release
265
+ runs-on: ubuntu-24.04
266
+ needs:
267
+ - build-dashboard
268
+ - build-desktop
269
+ steps:
270
+ - name: Checkout repository
271
+ uses: actions/checkout@v6
272
+ with:
273
+ fetch-depth: 0
274
+ ref: ${{ inputs.ref || github.ref }}
275
+
276
+ - name: Resolve tag
277
+ id: tag
278
+ shell: bash
279
+ run: |
280
+ if [ "${{ github.event_name }}" = "push" ]; then
281
+ tag="${GITHUB_REF_NAME}"
282
+ elif [ -n "${{ inputs.tag }}" ]; then
283
+ tag="${{ inputs.tag }}"
284
+ else
285
+ tag="$(git describe --tags --abbrev=0)"
286
+ fi
287
+ if [ -z "$tag" ]; then
288
+ echo "Failed to resolve tag." >&2
289
+ exit 1
290
+ fi
291
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
292
+
293
+ - name: Download dashboard artifact
294
+ uses: actions/download-artifact@v7
295
+ with:
296
+ name: Dashboard-${{ steps.tag.outputs.tag }}
297
+ path: release-assets
298
+
299
+ - name: Download desktop artifacts
300
+ uses: actions/download-artifact@v7
301
+ with:
302
+ pattern: AstrBot-${{ steps.tag.outputs.tag }}-*
303
+ path: release-assets
304
+ merge-multiple: true
305
+
306
+ - name: Resolve release notes
307
+ id: notes
308
+ shell: bash
309
+ run: |
310
+ note_file="changelogs/${{ steps.tag.outputs.tag }}.md"
311
+ if [ ! -f "$note_file" ]; then
312
+ note_file="$(mktemp)"
313
+ echo "Release ${{ steps.tag.outputs.tag }}" > "$note_file"
314
+ fi
315
+ echo "file=$note_file" >> "$GITHUB_OUTPUT"
316
+
317
+ - name: Ensure release exists
318
+ env:
319
+ GH_TOKEN: ${{ github.token }}
320
+ shell: bash
321
+ run: |
322
+ tag="${{ steps.tag.outputs.tag }}"
323
+ if ! gh release view "$tag" >/dev/null 2>&1; then
324
+ gh release create "$tag" --title "$tag" --notes-file "${{ steps.notes.outputs.file }}"
325
+ fi
326
+
327
+ - name: Remove stale assets from release
328
+ env:
329
+ GH_TOKEN: ${{ github.token }}
330
+ shell: bash
331
+ run: |
332
+ tag="${{ steps.tag.outputs.tag }}"
333
+ while IFS= read -r asset; do
334
+ case "$asset" in
335
+ *.AppImage|*.dmg|*.zip|*.exe|*.blockmap)
336
+ gh release delete-asset "$tag" "$asset" -y || true
337
+ ;;
338
+ esac
339
+ done < <(gh release view "$tag" --json assets --jq '.assets[].name')
340
+
341
+ - name: Upload assets to release
342
+ env:
343
+ GH_TOKEN: ${{ github.token }}
344
+ shell: bash
345
+ run: |
346
+ tag="${{ steps.tag.outputs.tag }}"
347
+ gh release upload "$tag" release-assets/* --clobber
348
+
349
+ publish-pypi:
350
+ name: Publish PyPI
351
+ runs-on: ubuntu-24.04
352
+ needs: publish-release
353
+ steps:
354
+ - name: Checkout repository
355
+ uses: actions/checkout@v6
356
+ with:
357
+ fetch-depth: 0
358
+ ref: ${{ inputs.ref || github.ref }}
359
+
360
+ - name: Set up Python
361
+ uses: actions/setup-python@v6
362
+ with:
363
+ python-version: "3.10"
364
+
365
+ - name: Install uv
366
+ shell: bash
367
+ run: python -m pip install uv
368
+
369
+ - name: Build package
370
+ shell: bash
371
+ run: uv build
372
+
373
+ - name: Publish to PyPI
374
+ env:
375
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
376
+ shell: bash
377
+ 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:6185 > /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 }}
.gitignore ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ desktop/node_modules/
37
+ desktop/dist/
38
+ desktop/out/
39
+ desktop/resources/backend/astrbot-backend*
40
+ desktop/resources/backend/*.exe
41
+ desktop/resources/webui/*
42
+ desktop/resources/.pyinstaller/
43
+ package-lock.json
44
+ yarn.lock
45
+
46
+ # Operating System
47
+ **/.DS_Store
48
+ .DS_Store
49
+
50
+ # AstrBot specific
51
+ .astrbot
52
+ astrbot.lock
53
+
54
+ # Other
55
+ chroma
56
+ venv/*
57
+ pytest.ini
58
+ AGENTS.md
59
+ IFLOW.md
60
+
61
+ # genie_tts data
62
+ CharacterModels/
63
+ GenieData/
.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,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
50
+ ## Contributing Guide
51
+
52
+ First off, thanks for taking the time to contribute! ❤️
53
+
54
+ 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. 🎉
55
+
56
+ ### Table of Contents
57
+
58
+ - [Reporting Issues](#reporting-issues)
59
+ - [Pull Requests](#pull-requests)
60
+
61
+ ### Reporting Issues
62
+
63
+ If you encounter any issues while using AstrBot, please follow these steps to report them:
64
+ 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.
65
+ 2. **Create a New Issue**: If no similar issue exists, please create a new issue. Make sure to provide the following information:
66
+ - A brief description of the issue
67
+ - Steps to reproduce the issue
68
+ - Expected and actual results
69
+ - Relevant logs or error messages
70
+
71
+ ### Pull Requests
72
+
73
+ #### Branch Naming
74
+
75
+ 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`.
76
+
77
+ #### PR Description
78
+ - Please use English to describe your PR.
79
+ - 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`.
80
+
81
+ #### Code Style
82
+
83
+ ##### Core
84
+
85
+ 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:
86
+
87
+ ```bash
88
+ ruff format .
89
+ ruff check .
90
+ ```
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+ WORKDIR /AstrBot
3
+
4
+ COPY . /AstrBot/
5
+
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ gcc \
8
+ build-essential \
9
+ python3-dev \
10
+ libffi-dev \
11
+ libssl-dev \
12
+ ca-certificates \
13
+ bash \
14
+ ffmpeg \
15
+ curl \
16
+ gnupg \
17
+ git \
18
+ && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
19
+ && apt-get install -y --no-install-recommends nodejs \
20
+ && apt-get clean \
21
+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
22
+
23
+ RUN python -m pip install uv \
24
+ && echo "3.12" > .python-version \
25
+ && uv lock \
26
+ && uv export --format requirements.txt --output-file requirements.txt --frozen \
27
+ && uv pip install -r requirements.txt --no-cache-dir --system \
28
+ && uv pip install socksio uv pilk --no-cache-dir --system
29
+
30
+ EXPOSE 6185
31
+
32
+ CMD ["python", "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,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .PHONY: worktree worktree-add worktree-rm
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
+ # Swallow extra args (branch/base) so make doesn't treat them as targets
31
+ %:
32
+ @true
README.md CHANGED
@@ -1,10 +1,291 @@
1
- ---
2
- title: My Astrbot Space
3
- emoji: 👀
4
- colorFrom: indigo
5
- colorTo: pink
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_en.md">English</a>
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</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
+ <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://blog.astrbot.app/">Blog</a> |
32
+ <a href="https://astrbot.featurebase.app/roadmap">路线图</a> |
33
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">问题提交</a>
34
+ </div>
35
+
36
+ AstrBot 是一个开源的一站式 Agentic 个人和群聊助手,可在 QQ、Telegram、企业微信、飞书、钉钉、Slack、等数十款主流即时通讯软件上部署,此外还内置类似 OpenWebUI 的轻量化 ChatUI,为个人、开发者和团队打造可靠、可扩展的对话式智能基础设施。无论是个人 AI 伙伴、智能客服、自动化助手,还是企业知识库,AstrBot 都能在你的即时通讯软件平台的工作流中快速构建 AI 应用。
37
+
38
+ ![521771166-00782c4c-4437-4d97-aabc-605e3738da5c (1)](https://github.com/user-attachments/assets/61e7b505-f7db-41aa-a75f-4ef8f079b8ba)
39
+
40
+ ## 主要功能
41
+
42
+ 1. 💯 免费 & 开源。
43
+ 2. ✨ AI 大模型对话,多模态,Agent,MCP,Skills,知识库,人格设定,自动压缩对话。
44
+ 3. 🤖 支持接入 Dify、阿里云百炼、Coze 等智能体平台。
45
+ 4. 🌐 多平台,支持 QQ、企业微信、飞书、钉钉、微信公众号、Telegram、Slack 以及[更多](#支持的消息平台)。
46
+ 5. 📦 插件扩展,已有近 800 个插件可一键安装。
47
+ 6. 🛡️ [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) 隔离化环境,安全地执行任何代码、调用 Shell、会话级资源复用。
48
+ 7. 💻 WebUI 支持。
49
+ 8. 🌈 Web ChatUI 支持,ChatUI 内置代理沙盒、网页搜索等。
50
+ 9. 🌐 国际化(i18n)支持。
51
+
52
+ <br>
53
+
54
+ <table align="center">
55
+ <tr align="center">
56
+ <th>💙 角色扮演 & 情感陪伴</th>
57
+ <th>✨ 主动式 Agent</th>
58
+ <th>🚀 通用 Agentic 能力</th>
59
+ <th>🧩 900+ 社区插件</th>
60
+ </tr>
61
+ <tr>
62
+ <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>
63
+ <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>
64
+ <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>
65
+ <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>
66
+ </tr>
67
+ </table>
68
+
69
+ ## 快速开始
70
+
71
+ #### Docker 部署(推荐 🥳)
72
+
73
+ 推荐使用 Docker / Docker Compose 方式部署 AstrBot。
74
+
75
+ 请参阅官方文档 [使用 Docker 部署 AstrBot](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot) 。
76
+
77
+ #### uv 部署
78
+
79
+ ```bash
80
+ uv tool install astrbot
81
+ astrbot
82
+ ```
83
+
84
+ #### 启动器一键部署(AstrBot Launcher)
85
+
86
+ 进入 [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) 仓库,在 Releases 页最新版本下找到对应的系统安装包安装即可。
87
+
88
+ #### 宝塔面板部署
89
+
90
+ AstrBot 与宝塔面板合作,已上架至宝塔面板。
91
+
92
+ 请参阅官方文档 [宝塔面板部署](https://astrbot.app/deploy/astrbot/btpanel.html) 。
93
+
94
+ #### 1Panel 部署
95
+
96
+ AstrBot 已由 1Panel 官方上架至 1Panel 面板。
97
+
98
+ 请参阅官方文档 [1Panel 部署](https://astrbot.app/deploy/astrbot/1panel.html) 。
99
+
100
+ #### 在 雨云 上部署
101
+
102
+ AstrBot 已由雨云官方上架至云应用平台,可一键部署。
103
+
104
+ [![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)
105
+
106
+ #### 在 Replit 上部署
107
+
108
+ 社区贡献的部署方式。
109
+
110
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
111
+
112
+ #### Windows 一键安装器部署
113
+
114
+ 请参阅官方文档 [使用 Windows 一键安装器部署 AstrBot](https://astrbot.app/deploy/astrbot/windows.html) 。
115
+
116
+ #### CasaOS 部署
117
+
118
+ 社区贡献的部署方式。
119
+
120
+ 请参阅官方文档 [CasaOS 部署](https://astrbot.app/deploy/astrbot/casaos.html) 。
121
+
122
+ #### 手动部署
123
+
124
+ 首先安装 uv:
125
+
126
+ ```bash
127
+ pip install uv
128
+ ```
129
+
130
+ 通过 Git Clone 安装 AstrBot:
131
+
132
+ ```bash
133
+ git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
134
+ uv run main.py
135
+ ```
136
+
137
+ 或者请参阅官方文档 [通过源码部署 AstrBot](https://astrbot.app/deploy/astrbot/cli.html) 。
138
+
139
+ #### 系统包管理器安装
140
+
141
+ ##### Arch Linux
142
+
143
+ ```bash
144
+ yay -S astrbot-git
145
+ # 或者使用 paru
146
+ paru -S astrbot-git
147
+ ```
148
+
149
+ #### 桌面端 Electron 打包
150
+
151
+ 桌面端(Electron 打包,`pnpm` 工作流)构建流程请参阅:[`desktop/README.md`](desktop/README.md)。
152
+
153
+ ## 支持的消息平台
154
+
155
+ **官方维护**
156
+
157
+ - QQ
158
+ - OneBot v11 协议实现
159
+ - Telegram
160
+ - 企微应用 & 企微智能机器人
161
+ - 微信客服 & 微信公众号
162
+ - 飞书
163
+ - 钉钉
164
+ - Slack
165
+ - Discord
166
+ - LINE
167
+ - Satori
168
+ - Misskey
169
+ - Whatsapp (将支持)
170
+
171
+ **社区维护**
172
+
173
+ - [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter)
174
+ - [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter)
175
+ - [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat)
176
+
177
+ ## 支持的模型服务
178
+
179
+ **大模型服务**
180
+
181
+ - OpenAI 及兼容服务
182
+ - Anthropic
183
+ - Google Gemini
184
+ - Moonshot AI
185
+ - 智谱 AI
186
+ - DeepSeek
187
+ - Ollama (本地部署)
188
+ - LM Studio (本地部署)
189
+ - [AIHubMix](https://aihubmix.com/?aff=4bfH)
190
+ - [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74)
191
+ - [302.AI](https://share.302.ai/rr1M3l)
192
+ - [小马算力](https://www.tokenpony.cn/3YPyf)
193
+ - [硅基流动](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot)
194
+ - [PPIO 派欧云](https://ppio.com/user/register?invited_by=AIOONE)
195
+ - ModelScope
196
+ - OneAPI
197
+
198
+ **LLMOps 平台**
199
+
200
+ - Dify
201
+ - 阿里云百炼应用
202
+ - Coze
203
+
204
+ **语音转文本服务**
205
+
206
+ - OpenAI Whisper
207
+ - SenseVoice
208
+
209
+ **文本转语音服务**
210
+
211
+ - OpenAI TTS
212
+ - Gemini TTS
213
+ - GPT-Sovits-Inference
214
+ - GPT-Sovits
215
+ - FishAudio
216
+ - Edge TTS
217
+ - 阿里云百炼 TTS
218
+ - Azure TTS
219
+ - Minimax TTS
220
+ - 火山引擎 TTS
221
+
222
+ ## ❤️ 贡献
223
+
224
+ 欢迎任何 Issues/Pull Requests���只需要将你的更改提交到此项目 :)
225
+
226
+ ### 如何贡献
227
+
228
+ 你可以通过查看问题或帮助审核 PR(拉取请求)来贡献。任何问题或 PR 都欢迎参与,以促进社区贡献。当然,这些只是建议,你可以以任何方式进行贡献。对于新功能的添加,请先通过 Issue 讨论。
229
+
230
+ ### 开发环境
231
+
232
+ AstrBot 使用 `ruff` 进行代码格式化和检查。
233
+
234
+ ```bash
235
+ git clone https://github.com/AstrBotDevs/AstrBot
236
+ pip install pre-commit
237
+ pre-commit install
238
+ ```
239
+
240
+ ## 🌍 社区
241
+
242
+ ### QQ 群组
243
+
244
+ - 1 群:322154837
245
+ - 3 群:630166526
246
+ - 5 群:822130018
247
+ - 6 群:753075035
248
+ - 7 群:743746109
249
+ - 8 群:1030353265
250
+ - 开发者群:975206796
251
+
252
+ ### Telegram 群组
253
+
254
+ <a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
255
+
256
+ ### Discord 群组
257
+
258
+ <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>
259
+
260
+ ## ❤️ Special Thanks
261
+
262
+ 特别感谢所有 Contributors 和插件开发者对 AstrBot 的贡献 ❤️
263
+
264
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
265
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot" />
266
+ </a>
267
+
268
+ 此外,本项目的诞生离不开以下开源项目的帮助:
269
+
270
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 伟大的猫猫框架
271
+
272
+ ## ⭐ Star History
273
+
274
+ > [!TIP]
275
+ > 如果本项目对您的生活 / 工作产生了帮助,或者您关注本项目的未来发展,请给项目 Star,这是我们维护这个开源项目的动力 <3
276
+
277
+ <div align="center">
278
+
279
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
280
+
281
+ </div>
282
+
283
+ <div align="center">
284
+
285
+ _陪伴与能力从来不应该是对立面。我们希望创造的是一个既能理解情绪、给予陪伴,也能可靠完成工作的机器人。_
286
+
287
+ _私は、高性能ですから!_
288
+
289
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
290
+
291
+ </div>
README_en.md ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_ja.md">日本語</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%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=%20plugins&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">Roadmap</a> |
35
+ <a href="https://github.com/AstrBotDevs/AstrBot/issues">Issue Tracker</a>
36
+ </div>
37
+
38
+ 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.
39
+
40
+ ![070d50ba43ea3c96980787127bbbe552](https://github.com/user-attachments/assets/6fe147c5-68d9-4f47-a8de-252e63fdcbd8)
41
+
42
+ ## Key Features
43
+
44
+ 1. 💯 Free & Open Source.
45
+ 2. ✨ AI LLM Conversations, Multimodal, Agent, MCP, Skills, Knowledge Base, Persona Settings, Auto Context Compression.
46
+ 3. 🤖 Supports integration with Dify, Alibaba Cloud Bailian, Coze, and other agent platforms.
47
+ 4. 🌐 Multi-Platform: QQ, WeChat Work, Feishu, DingTalk, WeChat Official Accounts, Telegram, Slack, and [more](#supported-messaging-platforms).
48
+ 5. 📦 Plugin Extensions with nearly 800 plugins available for one-click installation.
49
+ 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.
50
+ 7. 💻 WebUI Support.
51
+ 8. 🌈 Web ChatUI Support with built-in agent sandbox and web search.
52
+ 9. 🌐 Internationalization (i18n) Support.
53
+
54
+ <br>
55
+
56
+ <table align="center">
57
+ <tr align="center">
58
+ <th>💙 Role-playing & Emotional Companionship</th>
59
+ <th>✨ Proactive Agent</th>
60
+ <th>🚀 General Agentic Capabilities</th>
61
+ <th>🧩 900+ Community Plugins</th>
62
+ </tr>
63
+ <tr>
64
+ <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>
65
+ <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>
66
+ <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>
67
+ <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>
68
+ </tr>
69
+ </table>
70
+
71
+ ## Quick Start
72
+
73
+ #### Docker Deployment (Recommended 🥳)
74
+
75
+ We recommend deploying AstrBot using Docker or Docker Compose.
76
+
77
+ 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).
78
+
79
+ #### uv Deployment
80
+
81
+ ```bash
82
+ uv tool install astrbot
83
+ astrbot
84
+ ```
85
+
86
+ #### System Package Manager Installation
87
+
88
+ ##### Arch Linux
89
+
90
+ ```bash
91
+ yay -S astrbot-git
92
+ # or use paru
93
+ paru -S astrbot-git
94
+ ```
95
+
96
+ #### BT-Panel Deployment
97
+
98
+ AstrBot has partnered with BT-Panel and is now available in their marketplace.
99
+
100
+ Please refer to the official documentation: [BT-Panel Deployment](https://astrbot.app/deploy/astrbot/btpanel.html).
101
+
102
+ #### 1Panel Deployment
103
+
104
+ AstrBot has been officially listed on the 1Panel marketplace.
105
+
106
+ Please refer to the official documentation: [1Panel Deployment](https://astrbot.app/deploy/astrbot/1panel.html).
107
+
108
+ #### Deploy on RainYun
109
+
110
+ AstrBot has been officially listed on RainYun's cloud application platform with one-click deployment.
111
+
112
+ [![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)
113
+
114
+ #### Deploy on Replit
115
+
116
+ Community-contributed deployment method.
117
+
118
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
119
+
120
+ #### Windows One-Click Installer
121
+
122
+ Please refer to the official documentation: [Deploy AstrBot with Windows One-Click Installer](https://astrbot.app/deploy/astrbot/windows.html).
123
+
124
+ #### CasaOS Deployment
125
+
126
+ Community-contributed deployment method.
127
+
128
+ Please refer to the official documentation: [CasaOS Deployment](https://astrbot.app/deploy/astrbot/casaos.html).
129
+
130
+ #### Manual Deployment
131
+
132
+ First, install uv:
133
+
134
+ ```bash
135
+ pip install uv
136
+ ```
137
+
138
+ Install AstrBot via Git Clone:
139
+
140
+ ```bash
141
+ git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
142
+ uv run main.py
143
+ ```
144
+
145
+ Or refer to the official documentation: [Deploy AstrBot from Source](https://astrbot.app/deploy/astrbot/cli.html).
146
+
147
+ #### System Package Manager Installation
148
+
149
+ ##### Arch Linux
150
+
151
+ ```bash
152
+ yay -S astrbot-git
153
+ # or use paru
154
+ paru -S astrbot-git
155
+ ```
156
+
157
+ #### Desktop Electron Build
158
+
159
+ For desktop build steps (Electron packaging, `pnpm` workflow), see [`desktop/README.md`](desktop/README.md).
160
+
161
+ ## Supported Messaging Platforms
162
+
163
+ **Officially Maintained**
164
+
165
+ - QQ (Official Platform & OneBot)
166
+ - Telegram
167
+ - WeChat Work Application & WeChat Work Intelligent Bot
168
+ - WeChat Customer Service & WeChat Official Accounts
169
+ - Feishu (Lark)
170
+ - DingTalk
171
+ - Slack
172
+ - Discord
173
+ - Satori
174
+ - Misskey
175
+ - LINE
176
+ - WhatsApp (Coming Soon)
177
+
178
+ **Community Maintained**
179
+
180
+ - [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter)
181
+ - [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter)
182
+ - [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat)
183
+
184
+ ## Supported Model Services
185
+
186
+ **LLM Services**
187
+
188
+ - OpenAI and Compatible Services
189
+ - Anthropic
190
+ - Google Gemini
191
+ - Moonshot AI
192
+ - Zhipu AI
193
+ - DeepSeek
194
+ - Ollama (Self-hosted)
195
+ - LM Studio (Self-hosted)
196
+ - [CompShare](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74)
197
+ - [302.AI](https://share.302.ai/rr1M3l)
198
+ - [TokenPony](https://www.tokenpony.cn/3YPyf)
199
+ - [SiliconFlow](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot)
200
+ - [PPIO Cloud](https://ppio.com/user/register?invited_by=AIOONE)
201
+ - ModelScope
202
+ - OneAPI
203
+
204
+ **LLMOps Platforms**
205
+
206
+ - Dify
207
+ - Alibaba Cloud Bailian Applications
208
+ - Coze
209
+
210
+ **Speech-to-Text Services**
211
+
212
+ - OpenAI Whisper
213
+ - SenseVoice
214
+
215
+ **Text-to-Speech Services**
216
+
217
+ - OpenAI TTS
218
+ - Gemini TTS
219
+ - GPT-Sovits-Inference
220
+ - GPT-Sovits
221
+ - FishAudio
222
+ - Edge TTS
223
+ - Alibaba Cloud Bailian TTS
224
+ - Azure TTS
225
+ - Minimax TTS
226
+ - Volcano Engine TTS
227
+
228
+ ## ❤️ Contributing
229
+
230
+ Issues and Pull Requests are always welcome! Feel free to submit your changes to this project :)
231
+
232
+ ### How to Contribute
233
+
234
+ 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.
235
+
236
+ ### Development Environment
237
+
238
+ AstrBot uses `ruff` for code formatting and linting.
239
+
240
+ ```bash
241
+ git clone https://github.com/AstrBotDevs/AstrBot
242
+ pip install pre-commit
243
+ pre-commit install
244
+ ```
245
+
246
+ ## 🌍 Community
247
+
248
+ ### QQ Groups
249
+
250
+ - Group 1: 322154837
251
+ - Group 3: 630166526
252
+ - Group 5: 822130018
253
+ - Group 6: 753075035
254
+ - Group 7: 743746109
255
+ - Group 8: 1030353265
256
+ - Developer Group: 975206796
257
+
258
+ ### Telegram Group
259
+
260
+ <a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
261
+
262
+ ### Discord Server
263
+
264
+ <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>
265
+
266
+ ## ❤️ Special Thanks
267
+
268
+ Special thanks to all Contributors and plugin developers for their contributions to AstrBot ❤️
269
+
270
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
271
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot" />
272
+ </a>
273
+
274
+ Additionally, the birth of this project would not have been possible without the help of the following open-source projects:
275
+
276
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - The amazing cat framework
277
+
278
+ ## ⭐ Star History
279
+
280
+ > [!TIP]
281
+ > 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
282
+
283
+ <div align="center">
284
+
285
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
286
+
287
+ </div>
288
+
289
+ <div align="center">
290
+
291
+ _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._
292
+
293
+ _私は、高性能ですから!_
294
+
295
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
296
+ </div>
README_fr.md ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_en.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_zh-TW.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%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=%E4%B8%AA&label=%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA&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
+ </div>
37
+
38
+ 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.
39
+
40
+ <img width="1776" height="1080" alt="image" src="https://github.com/user-attachments/assets/00782c4c-4437-4d97-aabc-605e3738da5c" />
41
+
42
+ ## Fonctionnalités principales
43
+
44
+ 1. 💯 Gratuit & Open Source.
45
+ 2. ✨ Dialogue avec de grands modèles d'IA, multimodal, Agent, MCP, Skills, Base de connaissances, Paramétrage de personnalité, compression automatique des dialogues.
46
+ 3. 🤖 Prise en charge de l'accès aux plateformes d'Agents telles que Dify, Alibaba Cloud Bailian, Coze, etc.
47
+ 4. 🌐 Multiplateforme : supporte QQ, WeChat Enterprise, Feishu, DingTalk, Comptes officiels WeChat, Telegram, Slack et [plus encore](#plateformes-de-messagerie-prises-en-charge).
48
+ 5. 📦 Extension par plugins, avec près de 800 plugins déjà disponibles pour une installation en un clic.
49
+ 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.
50
+ 7. 💻 Support WebUI.
51
+ 8. 🌈 Support Web ChatUI, avec sandbox d'agent intégrée, recherche web, etc.
52
+ 9. 🌐 Support de l'internationalisation (i18n).
53
+
54
+ <br>
55
+
56
+ <table align="center">
57
+ <tr align="center">
58
+ <th>💙 Jeux de rôle & Accompagnement émotionnel</th>
59
+ <th>✨ Agent proactif</th>
60
+ <th>🚀 Capacités agentiques générales</th>
61
+ <th>🧩 900+ Plugins de communauté</th>
62
+ </tr>
63
+ <tr>
64
+ <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>
65
+ <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>
66
+ <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>
67
+ <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>
68
+ </tr>
69
+ </table>
70
+
71
+ ## Démarrage rapide
72
+
73
+ #### Déploiement Docker (Recommandé 🥳)
74
+
75
+ Nous recommandons de déployer AstrBot en utilisant Docker ou Docker Compose.
76
+
77
+ 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).
78
+
79
+ #### Déploiement uv
80
+
81
+ ```bash
82
+ uv tool install astrbot
83
+ astrbot
84
+ ```
85
+
86
+ #### Installation via le gestionnaire de paquets du système
87
+
88
+ ##### Arch Linux
89
+
90
+ ```bash
91
+ yay -S astrbot-git
92
+ # ou utiliser paru
93
+ paru -S astrbot-git
94
+ ```
95
+
96
+ #### Déploiement BT-Panel
97
+
98
+ AstrBot s'est associé à BT-Panel et est maintenant disponible sur leur marketplace.
99
+
100
+ Veuillez consulter la documentation officielle : [Déploiement BT-Panel](https://astrbot.app/deploy/astrbot/btpanel.html).
101
+
102
+ #### Déploiement 1Panel
103
+
104
+ AstrBot a été officiellement listé sur le marketplace 1Panel.
105
+
106
+ Veuillez consulter la documentation officielle : [Déploiement 1Panel](https://astrbot.app/deploy/astrbot/1panel.html).
107
+
108
+ #### Déployer sur RainYun
109
+
110
+ AstrBot a été officiellement listé sur la plateforme d'applications cloud de RainYun avec un déploiement en un clic.
111
+
112
+ [![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)
113
+
114
+ #### Déployer sur Replit
115
+
116
+ Méthode de déploiement contribuée par la communauté.
117
+
118
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
119
+
120
+ #### Installateur Windows en un clic
121
+
122
+ Veuillez consulter la documentation officielle : [Déployer AstrBot avec l'installateur Windows en un clic](https://astrbot.app/deploy/astrbot/windows.html).
123
+
124
+ #### Déploiement CasaOS
125
+
126
+ Méthode de déploiement contribuée par la communauté.
127
+
128
+ Veuillez consulter la documentation officielle : [Déploiement CasaOS](https://astrbot.app/deploy/astrbot/casaos.html).
129
+
130
+ #### Déploiement manuel
131
+
132
+ Tout d'abord, installez uv :
133
+
134
+ ```bash
135
+ pip install uv
136
+ ```
137
+
138
+ Installez AstrBot via Git Clone :
139
+
140
+ ```bash
141
+ git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
142
+ uv run main.py
143
+ ```
144
+
145
+ Ou consultez la documentation officielle : [Déployer AstrBot depuis les sources](https://astrbot.app/deploy/astrbot/cli.html).
146
+
147
+ #### Установка через системный пакетный менеджер
148
+
149
+ ##### Arch Linux
150
+
151
+ ```bash
152
+ yay -S astrbot-git
153
+ # или используйте paru
154
+ paru -S astrbot-git
155
+ ```
156
+
157
+ ## Plateformes de messagerie prises en charge
158
+
159
+ **Maintenues officiellement**
160
+
161
+ - QQ (Plateforme officielle & OneBot)
162
+ - Telegram
163
+ - Application WeChat Work & Bot intelligent WeChat Work
164
+ - Service client WeChat & Comptes officiels WeChat
165
+ - Feishu (Lark)
166
+ - DingTalk
167
+ - Slack
168
+ - Discord
169
+ - Satori
170
+ - Misskey
171
+ - LINE
172
+ - WhatsApp (Bientôt disponible)
173
+
174
+ **Maintenues par la communauté**
175
+
176
+ - [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter)
177
+ - [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter)
178
+ - [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat)
179
+
180
+ ## Services de modèles pris en charge
181
+
182
+ **Services LLM**
183
+
184
+ - OpenAI et services compatibles
185
+ - Anthropic
186
+ - Google Gemini
187
+ - Moonshot AI
188
+ - Zhipu AI
189
+ - DeepSeek
190
+ - Ollama (Auto-hébergé)
191
+ - LM Studio (Auto-hébergé)
192
+ - [CompShare](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74)
193
+ - [302.AI](https://share.302.ai/rr1M3l)
194
+ - [TokenPony](https://www.tokenpony.cn/3YPyf)
195
+ - [SiliconFlow](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot)
196
+ - [PPIO Cloud](https://ppio.com/user/register?invited_by=AIOONE)
197
+ - ModelScope
198
+ - OneAPI
199
+
200
+ **Plateformes LLMOps**
201
+
202
+ - Dify
203
+ - Applications Alibaba Cloud Bailian
204
+ - Coze
205
+
206
+ **Services de reconnaissance vocale**
207
+
208
+ - OpenAI Whisper
209
+ - SenseVoice
210
+
211
+ **Services de synthèse vocale**
212
+
213
+ - OpenAI TTS
214
+ - Gemini TTS
215
+ - GPT-Sovits-Inference
216
+ - GPT-Sovits
217
+ - FishAudio
218
+ - Edge TTS
219
+ - Alibaba Cloud Bailian TTS
220
+ - Azure TTS
221
+ - Minimax TTS
222
+ - Volcano Engine TTS
223
+
224
+ ## ❤️ Contribuer
225
+
226
+ Les Issues et Pull Requests sont toujours les bienvenues ! N'hésitez pas à soumettre vos modifications à ce projet :)
227
+
228
+ ### Comment contribuer
229
+
230
+ 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.
231
+
232
+ ### Environnement de développement
233
+
234
+ AstrBot utilise `ruff` pour le formatage et le linting du code.
235
+
236
+ ```bash
237
+ git clone https://github.com/AstrBotDevs/AstrBot
238
+ pip install pre-commit
239
+ pre-commit install
240
+ ```
241
+
242
+ ## 🌍 Communauté
243
+
244
+ ### Groupes QQ
245
+
246
+ - Groupe 1 : 322154837
247
+ - Groupe 3 : 630166526
248
+ - Groupe 5 : 822130018
249
+ - Groupe 6 : 753075035
250
+ - Groupe développeurs : 975206796
251
+
252
+ ### Groupe Telegram
253
+
254
+ <a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
255
+
256
+ ### Serveur Discord
257
+
258
+ <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>
259
+
260
+ ## ❤️ Remerciements spéciaux
261
+
262
+ Un grand merci à tous les contributeurs et développeurs de plugins pour leurs contributions à AstrBot ❤️
263
+
264
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
265
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot" />
266
+ </a>
267
+
268
+ De plus, la naissance de ce projet n'aurait pas été possible sans l'aide des projets open source suivants :
269
+
270
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - L'incroyable framework chat
271
+
272
+ ## ⭐ Historique des étoiles
273
+
274
+ > [!TIP]
275
+ > 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
276
+
277
+ <div align="center">
278
+
279
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
280
+
281
+ </div>
282
+
283
+ <div align="center">
284
+
285
+ _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._
286
+
287
+ _私は、高性能ですから!_
288
+
289
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
290
+
291
+ </div>
README_ja.md ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_en.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%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=%E4%B8%AA&label=%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA&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
+ </div>
37
+
38
+ AstrBot は、主要なインスタントメッセージングアプリと統合できるオープンソースのオールインワン Agent チャットボットプラットフォームです。個人、開発者、チームに信頼性が高くスケーラブルな会話型 AI インフラストラクチャを提供します。パーソナル AI コンパニオン、インテリジェントカスタマーサービス、オートメーションアシスタント、エンタープライズナレッジベースなど、AstrBot を使用すると、IM プラットフォームのワークフロー内で本番環境対応の AI アプリケーションを迅速に構築できます。
39
+
40
+ <img width="1776" height="1080" alt="image" src="https://github.com/user-attachments/assets/00782c4c-4437-4d97-aabc-605e3738da5c" />
41
+
42
+ ## 主な機能
43
+
44
+ 1. 💯 無料 & オープンソース。
45
+ 2. ✨ AI大規模言語モデル対話、マルチモーダル、Agent、MCP、Skills、ナレッジベース、ペルソナ設定、対話の自動圧縮。
46
+ 3. 🤖 Dify、Alibaba Cloud Bailian(百煉)、Coze などのAgentプラットフォームへの接続をサポート。
47
+ 4. 🌐 マルチプラットフォーム:QQ、企業微信(WeCom)、飛書(Lark)、釘釘(DingTalk)、WeChat公式アカウント、Telegram、Slack、[その他](#サポートされているメッセージプラットフォーム)に対応。
48
+ 5. 📦 プラグイン拡張:800近い既存プラグインをワンクリックでインストール可能。
49
+ 6. 🛡️ 隔離環境[Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html):コードの安全な実行、Shell呼び出し、セッションレベルのリソース再利用。
50
+ 7. 💻 WebUI 対応。
51
+ 8. 🌈 Web ChatUI 対応:ChatUI内にAgent Sandboxやウェブ検索などを内蔵。
52
+ 9. 🌐 多言語対応(i18n)。
53
+
54
+ <br>
55
+
56
+ <table align="center">
57
+ <tr align="center">
58
+ <th>💙 ロールプレイ & 感情的な対話</th>
59
+ <th>✨ プロアクティブ・エージェント (Proactive Agent)</th>
60
+ <th>🚀 汎用 エージェント的能力</th>
61
+ <th>🧩 900+ コミュニティプラグイン</th>
62
+ </tr>
63
+ <tr>
64
+ <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>
65
+ <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>
66
+ <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>
67
+ <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>
68
+ </tr>
69
+ </table>
70
+
71
+ ## クイックスタート
72
+
73
+ #### Docker デプロイ(推奨 🥳)
74
+
75
+ Docker / Docker Compose を使用した AstrBot のデプロイを推奨します。
76
+
77
+ 公式ドキュメント [Docker を使用した AstrBot のデプロイ](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot) をご参照ください。
78
+
79
+ #### uv デプロイ
80
+
81
+ ```bash
82
+ uv tool install astrbot
83
+ astrbot
84
+ ```
85
+
86
+ #### システムパッケージマネージャーでのインストール
87
+
88
+ ##### Arch Linux
89
+
90
+ ```bash
91
+ yay -S astrbot-git
92
+ # または paru を使用
93
+ paru -S astrbot-git
94
+ ```
95
+
96
+ #### 宝塔パネルデプロイ
97
+
98
+ AstrBot は宝塔パネルと提携し、宝塔パネルに公開されています。
99
+
100
+ 公式ドキュメント [宝塔パネルデプロイ](https://astrbot.app/deploy/astrbot/btpanel.html) をご参照ください。
101
+
102
+ #### 1Panel デプロイ
103
+
104
+ AstrBot は 1Panel 公式により 1Panel パネルに公開されています。
105
+
106
+ 公式ドキュメント [1Panel デプロイ](https://astrbot.app/deploy/astrbot/1panel.html) をご参照ください。
107
+
108
+ #### 雨云でのデプロイ
109
+
110
+ AstrBot は雨云公式によりクラウドアプリケーションプラットフォームに公開され、ワンクリックでデプロイ可能です。
111
+
112
+ [![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)
113
+
114
+ #### Replit でのデプロイ
115
+
116
+ コミュニティ貢献によるデプロイ方法。
117
+
118
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
119
+
120
+ #### Windows ワンクリックインストーラーデプロイ
121
+
122
+ 公式ドキュメント [Windows ワンクリックインストーラーを使用した AstrBot のデプロイ](https://astrbot.app/deploy/astrbot/windows.html) をご参照ください。
123
+
124
+ #### CasaOS デプロイ
125
+
126
+ コミュニティ貢献によるデプロイ方法。
127
+
128
+ 公式ドキュメント [CasaOS デプロイ](https://astrbot.app/deploy/astrbot/casaos.html) をご参照ください。
129
+
130
+ #### 手動デプロイ
131
+
132
+ まず uv をインストールします:
133
+
134
+ ```bash
135
+ pip install uv
136
+ ```
137
+
138
+ Git Clone で AstrBot をインストール:
139
+
140
+ ```bash
141
+ git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
142
+ uv run main.py
143
+ ```
144
+
145
+ または、公式ドキュメント [ソースコードから AstrBot をデプロイ](https://astrbot.app/deploy/astrbot/cli.html) をご参照ください。
146
+
147
+ #### Установка через системный пакетный менеджер
148
+
149
+ ##### Arch Linux
150
+
151
+ ```bash
152
+ yay -S astrbot-git
153
+ # или используйте paru
154
+ paru -S astrbot-git
155
+ ```
156
+
157
+ ## サポートされているメッセージプラットフォーム
158
+
159
+ **公式メンテナンス**
160
+
161
+ - QQ (公式プラットフォーム & OneBot)
162
+ - Telegram
163
+ - WeChat Work アプリケーション & WeChat Work インテリジェントボット
164
+ - WeChat カスタマーサービス & WeChat 公式アカウント
165
+ - Feishu (Lark)
166
+ - DingTalk
167
+ - Slack
168
+ - Discord
169
+ - Satori
170
+ - Misskey
171
+ - LINE
172
+ - WhatsApp (近日対応予定)
173
+
174
+ **コミュニティメンテナンス**
175
+
176
+ - [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter)
177
+ - [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter)
178
+ - [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat)
179
+
180
+
181
+ ## サポートされているモデルサービス
182
+
183
+ **大規模言語モデルサービス**
184
+
185
+ - OpenAI および互換サービス
186
+ - Anthropic
187
+ - Google Gemini
188
+ - Moonshot AI
189
+ - 智谱 AI
190
+ - DeepSeek
191
+ - Ollama (セルフホスト)
192
+ - LM Studio (セルフホスト)
193
+ - [優云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74)
194
+ - [302.AI](https://share.302.ai/rr1M3l)
195
+ - [小馬算力](https://www.tokenpony.cn/3YPyf)
196
+ - [硅基流動](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot)
197
+ - [PPIO 派欧云](https://ppio.com/user/register?invited_by=AIOONE)
198
+ - ModelScope
199
+ - OneAPI
200
+
201
+ **LLMOps プラットフォーム**
202
+
203
+ - Dify
204
+ - Alibaba Cloud 百炼アプリケーション
205
+ - Coze
206
+
207
+ **音声認識サービス**
208
+
209
+ - OpenAI Whisper
210
+ - SenseVoice
211
+
212
+ **音声合成サービス**
213
+
214
+ - OpenAI TTS
215
+ - Gemini TTS
216
+ - GPT-Sovits-Inference
217
+ - GPT-Sovits
218
+ - FishAudio
219
+ - Edge TTS
220
+ - Alibaba Cloud 百炼 TTS
221
+ - Azure TTS
222
+ - Minimax TTS
223
+ - Volcano Engine TTS
224
+
225
+ ## ❤️ コントリビューション
226
+
227
+ Issue や Pull Request は大歓迎です!このプロジェクトに変更を送信してください :)
228
+
229
+ ### コントリビュート方法
230
+
231
+ Issue を確認したり、PR(プルリクエスト)のレビューを手伝うことで貢献できます。どんな Issue や PR への参加も歓迎され、コミュニティ貢献を促進します。もちろん、これらは提案に過ぎず、どんな方法でも貢献できます。新機能の追加については、まず Issue で議論してください。
232
+
233
+ ### 開発環境
234
+
235
+ AstrBot はコードのフォーマットとチェックに `ruff` を使用しています。
236
+
237
+ ```bash
238
+ git clone https://github.com/AstrBotDevs/AstrBot
239
+ pip install pre-commit
240
+ pre-commit install
241
+ ```
242
+
243
+ ## 🌍 コミュニティ
244
+
245
+ ### QQ グループ
246
+
247
+ - 1群: 322154837
248
+ - 3群: 630166526
249
+ - 5群: 822130018
250
+ - 6群: 753075035
251
+ - 開発者群: 975206796
252
+
253
+ ### Telegram グループ
254
+
255
+ <a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
256
+
257
+ ### Discord サーバー
258
+
259
+ <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>
260
+
261
+ ## ❤️ Special Thanks
262
+
263
+ AstrBot への貢献をしていただいたすべてのコントリビューターとプラグイン開発者に特別な感謝を ❤️
264
+
265
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
266
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot" />
267
+ </a>
268
+
269
+ また、このプロジェクトの誕生は以下のオープンソースプロジェクトの助けなしには実現できませんでした:
270
+
271
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 素晴らしい猫猫フレームワーク
272
+
273
+ ## ⭐ Star History
274
+
275
+ > [!TIP]
276
+ > このプロジェクトがあなたの生活や仕事に役立ったり、このプロジェクトの今後の発展に関心がある場合は、プロジェクトに Star をください。これがこのオープンソースプロジェクトを維持する原動力です <3
277
+
278
+ <div align="center">
279
+
280
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
281
+
282
+ </div>
283
+
284
+ <div align="center">
285
+
286
+ _共感力と能力は決して対立するものではありません。私たちが目指すのは、感情を理解し、心の支えとなるだけでなく、確実に仕事をこなせるロボットの創造です。_
287
+
288
+ _私は、高性能ですから!_
289
+
290
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
291
+
292
+ </div>
README_ru.md ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_en.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_zh-TW.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%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=%E4%B8%AA&label=%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA&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
+ </div>
37
+
38
+ AstrBot — это универсальная платформа Agent-чатботов с открытым исходным кодом, которая интегрируется с основными приложениями для обмена мгновенными сообщениями. Она предоставляет надёжную и масштабируемую инфраструктуру разговорного ИИ для частных лиц, разработчиков и команд. Будь то персональный ИИ-компаньон, интеллектуальная служба поддержки, автоматизированный помощник или корпоративная база знаний — AstrBot позволяет быстро создавать готовые к использованию ИИ-приложения в рабочих процессах вашей платформы обмена сообщениями.
39
+
40
+ <img width="1776" height="1080" alt="image" src="https://github.com/user-attachments/assets/00782c4c-4437-4d97-aabc-605e3738da5c" />
41
+
42
+ ## Основные возможности
43
+
44
+ 1. 💯 Бесплатно & Открытый исходный код.
45
+ 2. ✨ Диалоги с ИИ-моделями, мультимодальность, Agent, MCP, Skills, База знаний, Настройка личности, автоматическое сжатие диалогов.
46
+ 3. 🤖 Поддержка интеграции с платформами Agents, такими как Dify, Alibaba Cloud Bailian, Coze и др.
47
+ 4. 🌐 Мультиплатформенность: поддержка QQ, WeChat для предприятий, Feishu, DingTalk, публичных аккаунтов WeChat, Telegram, Slack и [других](#Поддерживаемые-платформы-обмена-сообщениями).
48
+ 5. 📦 Расширение плагинами: доступно почти 800 плагинов для установки в один клик.
49
+ 6. 🛡️ Изолированная среда[Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html): безопасное выполнение любого кода, вызов Shell, повторное использование ресурсов на уровне сессии.
50
+ 7. 💻 Поддержка WebUI.
51
+ 8. 🌈 Поддержка Web ChatUI: встроенная песочница агента, веб-поиск и др.
52
+ 9. 🌐 Поддержка интернационализации (i18n).
53
+
54
+ <br>
55
+
56
+ <table align="center">
57
+ <tr align="center">
58
+ <th>💙 Ролевые игры & Эмоциональная поддержка</th>
59
+ <th>✨ Проактивный Агент(Agent)</th>
60
+ <th>🚀 Универсальные Агентные возможности</th>
61
+ <th>🧩 Универсальные Агентные (Agentic) возможности</th>
62
+ </tr>
63
+ <tr>
64
+ <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>
65
+ <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>
66
+ <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>
67
+ <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>
68
+ </tr>
69
+ </table>
70
+
71
+ ## Быстрый старт
72
+
73
+ #### Развёртывание Docker (Рекомендуется 🥳)
74
+
75
+ Мы рекомендуем развёртывать AstrBot с помощью Docker или Docker Compose.
76
+
77
+ См. официальную документацию: [Развёртывание AstrBot с Docker](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot).
78
+
79
+ #### Развёртывание uv
80
+
81
+ ```bash
82
+ uv tool install astrbot
83
+ astrbot
84
+ ```
85
+
86
+ #### Развёртывание BT-Panel
87
+
88
+ AstrBot в партнёрстве с BT-Panel теперь доступен на их маркетплейсе.
89
+
90
+ См. официальную документацию: [Развёртывание BT-Panel](https://astrbot.app/deploy/astrbot/btpanel.html).
91
+
92
+ #### Развёртывание 1Panel
93
+
94
+ AstrBot официально размещён на маркетплейсе 1Panel.
95
+
96
+ См. официальную документацию: [Развёртывание 1Panel](https://astrbot.app/deploy/astrbot/1panel.html).
97
+
98
+ #### Развёртывание на RainYun
99
+
100
+ AstrBot официально размещён на облачной платформе приложений RainYun с развёртыванием в один клик.
101
+
102
+ [![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)
103
+
104
+ #### Развёртывание на Replit
105
+
106
+ Метод развёртывания от сообщества.
107
+
108
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
109
+
110
+ #### Установщик Windows в один клик
111
+
112
+ См. официальную документацию: [Развёртывание AstrBot с установщиком Windows в один клик](https://astrbot.app/deploy/astrbot/windows.html).
113
+
114
+ #### Развёртывание CasaOS
115
+
116
+ Метод развёртывания от сообщества.
117
+
118
+ См. официальную документацию: [Развёртывание CasaOS](https://astrbot.app/deploy/astrbot/casaos.html).
119
+
120
+ #### Ручное развёртывание
121
+
122
+ Сначала установите uv:
123
+
124
+ ```bash
125
+ pip install uv
126
+ ```
127
+
128
+ Установите AstrBot через Git Clone:
129
+
130
+ ```bash
131
+ git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
132
+ uv run main.py
133
+ ```
134
+
135
+ Или см. официальную документацию: [Развёртывание AstrBot из исходного кода](https://astrbot.app/deploy/astrbot/cli.html).
136
+
137
+ #### Установка через системный пакетный менеджер
138
+
139
+ ##### Arch Linux
140
+
141
+ ```bash
142
+ yay -S astrbot-git
143
+ # или используйте paru
144
+ paru -S astrbot-git
145
+ ```
146
+
147
+ ## Поддерживаемые платформы обмена сообщениями
148
+
149
+ **Официально поддерживаемые**
150
+
151
+ - QQ (Официальная платформа и OneBot)
152
+ - Telegram
153
+ - Приложение WeChat Work и интеллектуальный бот WeChat Work
154
+ - Служба поддержки WeChat и официальные аккаунты WeChat
155
+ - Feishu (Lark)
156
+ - DingTalk
157
+ - Slack
158
+ - Discord
159
+ - Satori
160
+ - Misskey
161
+ - LINE
162
+ - WhatsApp (Скоро)
163
+
164
+
165
+ **Поддерживаемые сообществом**
166
+
167
+ - [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter)
168
+ - [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter)
169
+ - [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat)
170
+
171
+ ## Поддерживаемые сервисы моделей
172
+
173
+ **Сервисы LLM**
174
+
175
+ - OpenAI и совместимые сервисы
176
+ - Anthropic
177
+ - Google Gemini
178
+ - Moonshot AI
179
+ - Zhipu AI
180
+ - DeepSeek
181
+ - Ollama (Самостоятельное размещение)
182
+ - LM Studio (Самостоятельное размещение)
183
+ - [CompShare](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74)
184
+ - [302.AI](https://share.302.ai/rr1M3l)
185
+ - [TokenPony](https://www.tokenpony.cn/3YPyf)
186
+ - [SiliconFlow](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot)
187
+ - [PPIO Cloud](https://ppio.com/user/register?invited_by=AIOONE)
188
+ - ModelScope
189
+ - OneAPI
190
+
191
+ **Платформы LLMOps**
192
+
193
+ - Dify
194
+ - Приложения Alibaba Cloud Bailian
195
+ - Coze
196
+
197
+ **Сервисы распознавания речи**
198
+
199
+ - OpenAI Whisper
200
+ - SenseVoice
201
+
202
+ **Сервисы синтеза речи**
203
+
204
+ - OpenAI TTS
205
+ - Gemini TTS
206
+ - GPT-Sovits-Inference
207
+ - GPT-Sovits
208
+ - FishAudio
209
+ - Edge TTS
210
+ - Alibaba Cloud Bailian TTS
211
+ - Azure TTS
212
+ - Minimax TTS
213
+ - Volcano Engine TTS
214
+
215
+ ## ❤️ Вклад в проект
216
+
217
+ Issues и Pull Request всегда приветствуются! Не стесняйтесь отправлять свои изменения в этот проект :)
218
+
219
+ ### Как внести вклад
220
+
221
+ Вы можете внести вклад, просматривая issues или помогая с ревью pull request. Любые issues или PR приветствуются для поощрения участия сообщества. Конечно, это лишь предложения — вы можете вносить вклад любым удобным для вас способом. Для добавления новых функций сначала обсудите это через Issue.
222
+
223
+ ### Среда разработки
224
+
225
+ AstrBot использует `ruff` для форматирования и линтинга кода.
226
+
227
+ ```bash
228
+ git clone https://github.com/AstrBotDevs/AstrBot
229
+ pip install pre-commit
230
+ pre-commit install
231
+ ```
232
+
233
+ ## 🌍 Сообщество
234
+
235
+ ### Группы QQ
236
+
237
+ - Группа 1: 322154837
238
+ - Группа 3: 630166526
239
+ - Группа 5: 822130018
240
+ - Группа 6: 753075035
241
+ - Группа разработчиков: 975206796
242
+
243
+ ### Группа Telegram
244
+
245
+ <a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
246
+
247
+ ### Сервер Discord
248
+
249
+ <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>
250
+
251
+ ## ❤️ Особая благодарность
252
+
253
+ Особая благодарность всем контрибьюторам и разработчикам плагинов за их вклад в AstrBot ❤️
254
+
255
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
256
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot" />
257
+ </a>
258
+
259
+ Кроме того, рождение этого проекта было бы невозможно без помощи следующих проектов с открытым исходным кодом:
260
+
261
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - Замечательный кошачий фреймворк
262
+
263
+ ## ⭐ История звёзд
264
+
265
+ > [!TIP]
266
+ > Если этот проект помог вам в жизни или работе, или если вас интересует его будущее развитие, пожалуйста, поставьте проекту звезду. Это движущая сила поддержки этого проекта с открытым исходным кодом <3
267
+
268
+
269
+ <div align="center">
270
+
271
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
272
+
273
+ </div>
274
+
275
+ <div align="center">
276
+
277
+ _Сопровождение и способности никогда не должны быть противоположностями. Мы стремимся создать робота, который сможет как понимать эмоции, оказывать душевную поддержку, так и надёжно выполнять работу._
278
+
279
+ _私は、高性能ですから!_
280
+
281
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
282
+
283
+ </div>
README_zh-TW.md ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">简体中文</a> |
6
+ <a href="https://github.com/AstrBotDevs/AstrBot/blob/master/README_en.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
+ </div>
37
+
38
+ AstrBot 是一個開源的一站式 Agent 聊天機器人平台,可接入主流即時通訊軟體,為個人、開發者和團隊打造可靠、可擴展的對話式智慧基礎設施。無論是個人 AI 夥伴、智慧客服、自動化助手,還是企業知識庫,AstrBot 都能在您的即時通訊軟體平台的工作流程中快速構建生產可用的 AI 應用程式。
39
+
40
+ <img width="1776" height="1080" alt="image" src="https://github.com/user-attachments/assets/00782c4c-4437-4d97-aabc-605e3738da5c" />
41
+
42
+ ## 主要功能
43
+
44
+ 1. 💯 免費 & 開源。
45
+ 2. ✨ AI 大模型對話,多模態,Agent,MCP,Skills,知識庫,人格設定,自動壓縮對話。
46
+ 3. 🤖 支援接入 Dify、阿里雲百煉、Coze 等智慧體 (Agent) 平台。
47
+ 4. 🌐 多平台,支援 QQ、企業微信、飛書、釘釘、微信公眾號、Telegram、Slack 以及[更多](#支援的訊息平台)。
48
+ 5. 📦 插件擴展,已有近 800 個插件可一鍵安裝。
49
+ 6. 🛡️ [Agent Sandbox](https://docs.astrbot.app/use/astrbot-agent-sandbox.html) 隔離化環境,安全地執行任何代碼、調用 Shell、會話級資源複用。
50
+ 7. 💻 WebUI 支援。
51
+ 8. 🌈 Web ChatUI 支援,ChatUI 內置代理沙盒 (Agent Sandbox)、網頁搜尋等。
52
+ 9. 🌐 國際化(i18n)支援。
53
+
54
+ <br>
55
+
56
+ <table align="center">
57
+ <tr align="center">
58
+ <th>💙 角色扮演 & 情感陪伴</th>
59
+ <th>✨ 主動式 Agent</th>
60
+ <th>🚀 通用 Agentic 能力</th>
61
+ <th>🧩 900+ 社區外掛程式</th>
62
+ </tr>
63
+ <tr>
64
+ <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>
65
+ <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>
66
+ <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>
67
+ <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>
68
+ </tr>
69
+ </table>
70
+
71
+ ## 快速開始
72
+
73
+ #### Docker 部署(推薦 🥳)
74
+
75
+ 推薦使用 Docker / Docker Compose 方式部署 AstrBot。
76
+
77
+ 請參閱官方文件 [使用 Docker 部署 AstrBot](https://astrbot.app/deploy/astrbot/docker.html#%E4%BD%BF%E7%94%A8-docker-%E9%83%A8%E7%BD%B2-astrbot)。
78
+
79
+ #### uv 部署
80
+
81
+ ```bash
82
+ uv tool install astrbot
83
+ astrbot
84
+ ```
85
+
86
+ #### 寶塔面板部署
87
+
88
+ AstrBot 與寶塔面板合作,已上架至寶塔面板。
89
+
90
+ 請參閱官方文件 [寶塔面板部署](https://astrbot.app/deploy/astrbot/btpanel.html)。
91
+
92
+ #### 1Panel 部署
93
+
94
+ AstrBot 已由 1Panel 官方上架至 1Panel 面板。
95
+
96
+ 請參閱官方文件 [1Panel 部署](https://astrbot.app/deploy/astrbot/1panel.html)。
97
+
98
+ #### 在雨雲上部署
99
+
100
+ AstrBot 已由雨雲官方上架至雲端應用程式平台,可一鍵部署。
101
+
102
+ [![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)
103
+
104
+ #### 在 Replit 上部署
105
+
106
+ 社群貢獻的部署方式。
107
+
108
+ [![Run on Repl.it](https://repl.it/badge/github/AstrBotDevs/AstrBot)](https://repl.it/github/AstrBotDevs/AstrBot)
109
+
110
+ #### Windows 一鍵安裝器部署
111
+
112
+ 請參閱官方文件 [使用 Windows 一鍵安裝器部署 AstrBot](https://astrbot.app/deploy/astrbot/windows.html)。
113
+
114
+ #### CasaOS 部署
115
+
116
+ 社群貢獻的部署方式。
117
+
118
+ 請參閱官方文件 [CasaOS 部署](https://astrbot.app/deploy/astrbot/casaos.html)。
119
+
120
+ #### 手動部署
121
+
122
+ 首先安裝 uv:
123
+
124
+ ```bash
125
+ pip install uv
126
+ ```
127
+
128
+ 透過 Git Clone 安裝 AstrBot:
129
+
130
+ ```bash
131
+ git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
132
+ uv run main.py
133
+ ```
134
+
135
+ 或者請參閱官方文件 [透過原始碼部署 AstrBot](https://astrbot.app/deploy/astrbot/cli.html)。
136
+
137
+ #### 系統套件管理員安裝
138
+
139
+ ##### Arch Linux
140
+
141
+ ```bash
142
+ yay -S astrbot-git
143
+ # 或者使用 paru
144
+ paru -S astrbot-git
145
+ ```
146
+
147
+ ## 支援的訊息平台
148
+
149
+ **官方維護**
150
+
151
+ - QQ(官方平台 & OneBot)
152
+ - Telegram
153
+ - 企微應用 & 企微智慧機器人
154
+ - 微信客服 & 微信公眾號
155
+ - 飛書
156
+ - 釘釘
157
+ - Slack
158
+ - Discord
159
+ - Satori
160
+ - Misskey
161
+ - LINE
162
+ - Whatsapp(即將支援)
163
+
164
+
165
+ **社群維護**
166
+
167
+ - [Matrix](https://github.com/stevessr/astrbot_plugin_matrix_adapter)
168
+ - [KOOK](https://github.com/wuyan1003/astrbot_plugin_kook_adapter)
169
+ - [VoceChat](https://github.com/HikariFroya/astrbot_plugin_vocechat)
170
+
171
+ ## 支援的模型服務
172
+
173
+ **大型模型服務**
174
+
175
+ - OpenAI 及相容服務
176
+ - Anthropic
177
+ - Google Gemini
178
+ - Moonshot AI
179
+ - 智譜 AI
180
+ - DeepSeek
181
+ - Ollama(本機部署)
182
+ - LM Studio(本機部署)
183
+ - [優雲智算](https://www.compshare.cn/?ytag=GPU_YY-gh_astrbot&referral_code=FV7DcGowN4hB5UuXKgpE74)
184
+ - [302.AI](https://share.302.ai/rr1M3l)
185
+ - [小馬算力](https://www.tokenpony.cn/3YPyf)
186
+ - [矽基流動](https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot)
187
+ - [PPIO 派歐雲](https://ppio.com/user/register?invited_by=AIOONE)
188
+ - ModelScope
189
+ - OneAPI
190
+
191
+ **LLMOps 平台**
192
+
193
+ - Dify
194
+ - 阿里雲百煉應用
195
+ - Coze
196
+
197
+ **語音轉文字服務**
198
+
199
+ - OpenAI Whisper
200
+ - SenseVoice
201
+
202
+ **文字轉語音服務**
203
+
204
+ - OpenAI TTS
205
+ - Gemini TTS
206
+ - GPT-Sovits-Inference
207
+ - GPT-Sovits
208
+ - FishAudio
209
+ - Edge TTS
210
+ - 阿里雲百煉 TTS
211
+ - Azure TTS
212
+ - Minimax TTS
213
+ - 火山引擎 TTS
214
+
215
+ ## ❤️ 貢獻
216
+
217
+ 歡迎任何 Issues/Pull Requests!只需要將您的變更提交到此專案 :)
218
+
219
+ ### 如何貢獻
220
+
221
+ 您可以透過檢視問題或協助審核 PR(拉取請求)來貢獻。任何問題或 PR 都歡迎參與,以促進社群貢獻。當然,這些只是建議,您可以以任何方式進行貢獻。對於新功能的新增,請先透過 Issue 討論。
222
+
223
+ ### 開發環境
224
+
225
+ AstrBot 使用 `ruff` 進行程式碼格式化和檢查。
226
+
227
+ ```bash
228
+ git clone https://github.com/AstrBotDevs/AstrBot
229
+ pip install pre-commit
230
+ pre-commit install
231
+ ```
232
+
233
+ ## 🌍 社群
234
+
235
+ ### QQ 群組
236
+
237
+ - 1 群:322154837
238
+ - 3 群:630166526
239
+ - 5 群:822130018
240
+ - 6 群:753075035
241
+ - 開發者群:975206796
242
+
243
+ ### Telegram 群組
244
+
245
+ <a href="https://t.me/+hAsD2Ebl5as3NmY1"><img alt="Telegram_community" src="https://img.shields.io/badge/Telegram-AstrBot-purple?style=for-the-badge&color=76bad9"></a>
246
+
247
+ ### Discord 群組
248
+
249
+ <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>
250
+
251
+ ## ❤️ Special Thanks
252
+
253
+ 特別感謝所有 Contributors 和外掛開發者對 AstrBot 的貢獻 ❤️
254
+
255
+ <a href="https://github.com/AstrBotDevs/AstrBot/graphs/contributors">
256
+ <img src="https://contrib.rocks/image?repo=AstrBotDevs/AstrBot" />
257
+ </a>
258
+
259
+ 此外,本專案的誕生離不開以下開源專案的幫助:
260
+
261
+ - [NapNeko/NapCatQQ](https://github.com/NapNeko/NapCatQQ) - 偉大的貓貓框架
262
+
263
+ ## ⭐ Star History
264
+
265
+ > [!TIP]
266
+ > 如果本專案對您的生活 / 工作產生了幫助,或者您關注本專案的未來發展,請給專案 Star,這是我們維護這個開源專案的動力 <3
267
+
268
+ <div align="center">
269
+
270
+ [![Star History Chart](https://api.star-history.com/svg?repos=astrbotdevs/astrbot&type=Date)](https://star-history.com/#astrbotdevs/astrbot&Date)
271
+
272
+ </div>
273
+
274
+ <div align="center">
275
+
276
+ _陪伴與能力從來不應該是對立面。我們希望創造的是一個既能理解情緒、給予陪伴,也能可靠完成工作的機器人。_
277
+
278
+ _私は、高性能ですから!_
279
+
280
+ <img src="https://files.astrbot.app/watashiwa-koseino-desukara.gif" width="100"/>
281
+
282
+ </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,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_using_llm_tool as on_using_llm_tool
29
+ from astrbot.core.star.register import (
30
+ register_on_waiting_llm_request as on_waiting_llm_request,
31
+ )
32
+ from astrbot.core.star.register import register_permission_type as permission_type
33
+ from astrbot.core.star.register import (
34
+ register_platform_adapter_type as platform_adapter_type,
35
+ )
36
+ from astrbot.core.star.register import register_regex as regex
37
+
38
+ __all__ = [
39
+ "CustomFilter",
40
+ "EventMessageType",
41
+ "EventMessageTypeFilter",
42
+ "PermissionType",
43
+ "PermissionTypeFilter",
44
+ "PlatformAdapterType",
45
+ "PlatformAdapterTypeFilter",
46
+ "after_message_sent",
47
+ "command",
48
+ "command_group",
49
+ "custom_filter",
50
+ "event_message_type",
51
+ "llm_tool",
52
+ "on_astrbot_loaded",
53
+ "on_decorating_result",
54
+ "on_llm_request",
55
+ "on_llm_response",
56
+ "on_plugin_error",
57
+ "on_platform_loaded",
58
+ "on_waiting_llm_request",
59
+ "permission_type",
60
+ "platform_adapter_type",
61
+ "regex",
62
+ "on_using_llm_tool",
63
+ "on_llm_tool_respond",
64
+ ]
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}")
astrbot/builtin_stars/astrbot/metadata.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ name: astrbot
2
+ desc: AstrBot 自带插件,包含人格注入、思考内容注入、群聊上下文感知等功能的实现,禁用后将无法使用这些功能。
3
+ author: Soulter
4
+ version: 4.1.0
astrbot/builtin_stars/builtin_commands/commands/__init__.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Commands module
2
+
3
+ from .admin import AdminCommands
4
+ from .alter_cmd import AlterCmdCommands
5
+ from .conversation import ConversationCommands
6
+ from .help import HelpCommand
7
+ from .llm import LLMCommands
8
+ from .persona import PersonaCommands
9
+ from .plugin import PluginCommands
10
+ from .provider import ProviderCommands
11
+ from .setunset import SetUnsetCommands
12
+ from .sid import SIDCommand
13
+ from .t2i import T2ICommand
14
+ from .tts import TTSCommand
15
+
16
+ __all__ = [
17
+ "AdminCommands",
18
+ "AlterCmdCommands",
19
+ "ConversationCommands",
20
+ "HelpCommand",
21
+ "LLMCommands",
22
+ "PersonaCommands",
23
+ "PluginCommands",
24
+ "ProviderCommands",
25
+ "SIDCommand",
26
+ "SetUnsetCommands",
27
+ "T2ICommand",
28
+ "TTSCommand",
29
+ ]