Skip to content

Commit 6835e9b

Browse files
Merge remote-tracking branch 'origin/main' into feat/rag
# Conflicts: # pyproject.toml
2 parents 93b2acb + f39efd5 commit 6835e9b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3061
-348
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
name: Pull Request
3-
about: Create a pull request for AgentScope Runtime
4-
title: '[Component] Brief description'
5-
labels: ''
6-
assignees: ''
7-
---
8-
91
## Description
102
[Describe what this PR does and why]
113

.github/release-drafter.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- 'Feature'
9+
- title: '🐛 Bug Fixes'
10+
labels:
11+
- 'fix'
12+
- 'bugfix'
13+
- 'bug'
14+
- 'hotfix'
15+
exclude-labels:
16+
- 'skip-changelog'
17+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
18+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
19+
version-resolver:
20+
major:
21+
labels:
22+
- 'major'
23+
minor:
24+
labels:
25+
- 'minor'
26+
patch:
27+
labels:
28+
- 'patch'
29+
default: patch
30+
template: |
31+
## Changes
32+
33+
$CHANGES

.github/workflows/cookbook.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install -q -e ".[dev]"
25-
24+
pip install -q -e ".[dev,sandbox,agentscope,langgraph,agno,a2a,autogen]"
2625
- name: Add execute permission to build.sh
2726
run: |
2827
chmod +x cookbook/build.sh

.github/workflows/unittest.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Unit Tests
2+
3+
4+
on:
5+
push:
6+
branches:
7+
- 'main'
8+
9+
10+
jobs:
11+
test:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ ubuntu-latest ]
16+
python-version: [ '3.10' ]
17+
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Cache pip dependencies
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.cache/pip
32+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
33+
restore-keys: |
34+
${{ runner.os }}-pip-
35+
36+
- name: Update setuptools
37+
run: |
38+
pip install --upgrade pip
39+
pip install setuptools==78.1.1 wheel==0.45.1
40+
41+
- name: Set PYTHONPATH
42+
run: |
43+
echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/src" >> $GITHUB_ENV
44+
45+
- name: Install dependencies
46+
run: |
47+
export PIP_DEFAULT_TIMEOUT=300
48+
pip install -q -e ".[dev,sandbox,agentscope,langgraph,agno,a2a,autogen]"
49+
50+
- name: Run tests with coverage
51+
env:
52+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
53+
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
54+
run: |
55+
coverage run -m pytest tests
56+
57+
- name: Generate coverage report
58+
run: |
59+
coverage report -m

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ repos:
3232
| \.html$
3333
)
3434
args: [
35-
# --disallow-untyped-defs,
36-
# --disallow-incomplete-defs,
3735
--ignore-missing-imports,
3836
--disable-error-code=var-annotated,
3937
--disable-error-code=union-attr,

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
[![Discord](https://img.shields.io/badge/Discord-Join_Us-blueviolet.svg?logo=discord)](https://discord.gg/eYMpfnkG8h)
1717
[![DingTalk](https://img.shields.io/badge/DingTalk-Join_Us-orange.svg)](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11)
1818

19+
[[Cookbook]](https://runtime.agentscope.io/)
1920
[[中文README]](README_zh.md)
2021

2122
**A Production-Ready Runtime Framework for Intelligent Agent Applications**
@@ -154,7 +155,7 @@ with BaseSandbox() as box:
154155

155156
> [!NOTE]
156157
>
157-
> Current version requires Docker to be installed and running on your system. In the future, we will provide Kubernetes deployment and public cloud deployment options. Please refer to [this tutorial](https://runtime.agentscope.io/en/sandbox.html) for more details.
158+
> Current version requires Docker or Kubernetes to be installed and running on your system. Please refer to [this tutorial](https://runtime.agentscope.io/en/sandbox.html) for more details.
158159
159160
---
160161

@@ -164,6 +165,7 @@ with BaseSandbox() as box:
164165
- **[💡 Concept](https://runtime.agentscope.io/en/concept.html)**: Core concepts and architecture overview
165166
- **[🚀 Quick Start](https://runtime.agentscope.io/en/quickstart.html)**: Quick start tutorial
166167
- **[🏠 Demo House](https://runtime.agentscope.io/en/demohouse.html)**: Rich example projects
168+
- **[📋 API Reference](https://runtime.agentscope.io/en/api/index.html)**: Complete API documentation
167169

168170
---
169171

@@ -172,6 +174,7 @@ with BaseSandbox() as box:
172174
### AgentScope Integration
173175

174176
```python
177+
# pip install "agentscope-runtime[agentscope]"
175178
import os
176179

177180
from agentscope.agent import ReActAgent
@@ -194,6 +197,7 @@ agent = AgentScopeAgent(
194197
### Agno Integration
195198

196199
```python
200+
# pip install "agentscope-runtime[agno]"
197201
from agno.agent import Agent
198202
from agno.models.openai import OpenAIChat
199203
from agentscope_runtime.engine.agents.agno_agent import AgnoAgent
@@ -210,9 +214,30 @@ agent = AgnoAgent(
210214
)
211215
```
212216

217+
### AutoGen Integration
218+
219+
```python
220+
# pip install "agentscope-runtime[autogen]"
221+
from autogen_agentchat.agents import AssistantAgent
222+
from autogen_ext.models.openai import OpenAIChatCompletionClient
223+
from agentscope_runtime.engine.agents.autogen_agent import AutogenAgent
224+
225+
agent = AutogenAgent(
226+
name="Friday",
227+
model=OpenAIChatCompletionClient(
228+
model="gpt-4",
229+
),
230+
agent_config={
231+
"system_message": "You're a helpful assistant",
232+
},
233+
agent_builder=AssistantAgent,
234+
)
235+
```
236+
213237
### LangGraph Integration
214238

215239
```python
240+
# pip install "agentscope-runtime[langgraph]"
216241
from typing import TypedDict
217242
from langgraph import graph, types
218243
from agentscope_runtime.engine.agents.langgraph_agent import LangGraphAgent

README_zh.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
[![Discord](https://img.shields.io/badge/Discord-Join_Us-blueviolet.svg?logo=discord)](https://discord.gg/eYMpfnkG8h)
1717
[![DingTalk](https://img.shields.io/badge/DingTalk-Join_Us-orange.svg)](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11)
1818

19+
[[Cookbook]](https://runtime.agentscope.io/)
1920
[[English README]](README.md)
2021

2122
**智能体应用的生产就绪运行时框架**
@@ -151,7 +152,7 @@ with BaseSandbox() as box:
151152

152153
> [!NOTE]
153154
>
154-
> 当前版本需要安装并运行Docker,未来我们将提供Kubernetes部署和公有云部署选项。请参考[此教程](https://runtime.agentscope.io/zh/sandbox.html)了解更多详情。
155+
> 当前版本需要安装并运行Docker或者Kubernetes,未来我们将提供更多公有云部署选项。请参考[此教程](https://runtime.agentscope.io/zh/sandbox.html)了解更多详情。
155156
156157
---
157158

@@ -161,6 +162,7 @@ with BaseSandbox() as box:
161162
- **[💡 概念](https://runtime.agentscope.io/zh/concept.html)**: 核心概念和架构概述
162163
- **[🚀 快速开始](https://runtime.agentscope.io/zh/quickstart.html)**: 快速入门教程
163164
- **[🏠 展示厅](https://runtime.agentscope.io/zh/demohouse.html)**: 丰富的示例项目
165+
- **[📋 API 参考](https://runtime.agentscope.io/zh/api/index.html)**: 完整的API文档
164166

165167
---
166168

@@ -169,6 +171,7 @@ with BaseSandbox() as box:
169171
### AgentScope 集成
170172

171173
```python
174+
# pip install "agentscope-runtime[agentscope]"
172175
import os
173176

174177
from agentscope.agent import ReActAgent
@@ -191,6 +194,7 @@ agent = AgentScopeAgent(
191194
### Agno集成
192195

193196
```python
197+
# pip install "agentscope-runtime[agno]"
194198
from agno.agent import Agent
195199
from agno.models.openai import OpenAIChat
196200
from agentscope_runtime.engine.agents.agno_agent import AgnoAgent
@@ -207,9 +211,30 @@ agent = AgnoAgent(
207211
)
208212
```
209213

214+
### AutoGen集成
215+
216+
```python
217+
# pip install "agentscope-runtime[autogen]"
218+
from autogen_agentchat.agents import AssistantAgent
219+
from autogen_ext.models.openai import OpenAIChatCompletionClient
220+
from agentscope_runtime.engine.agents.autogen_agent import AutogenAgent
221+
222+
agent = AutogenAgent(
223+
name="Friday",
224+
model=OpenAIChatCompletionClient(
225+
model="gpt-4",
226+
),
227+
agent_config={
228+
"system_message": "You're a helpful assistant",
229+
},
230+
agent_builder=AssistantAgent,
231+
)
232+
```
233+
210234
### LangGraph集成
211235

212236
```python
237+
# pip install "agentscope-runtime[langgraph]"
213238
from typing import TypedDict
214239
from langgraph import graph, types
215240
from agentscope_runtime.engine.agents.langgraph_agent import LangGraphAgent

cookbook/_config.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,48 @@ latex:
2626
bibtex_bibfiles:
2727
- references.bib
2828

29+
# Sphinx settings
2930
sphinx:
31+
extra_extensions:
32+
- sphinx.ext.autodoc
33+
- sphinx.ext.viewcode
34+
- sphinx.ext.napoleon
35+
- sphinx.ext.intersphinx
36+
- sphinx.ext.autosummary
3037
config:
38+
# API Documentation Configuration
39+
autosummary_generate: True
40+
autosummary_imported_members: True
41+
42+
# Autodoc Configuration
43+
autodoc_typehints: 'description'
44+
autodoc_member_order: 'bysource'
45+
autodoc_default_options:
46+
members: True
47+
member-order: 'bysource'
48+
special-members: '__init__'
49+
undoc-members: True
50+
exclude-members: '__weakref__'
51+
52+
# Napoleon Configuration
53+
napoleon_google_docstring: True
54+
napoleon_numpy_docstring: True
55+
napoleon_include_init_with_doc: False
56+
napoleon_include_private_with_doc: False
57+
napoleon_include_special_with_doc: True
58+
napoleon_use_admonition_for_examples: False
59+
napoleon_use_admonition_for_notes: False
60+
napoleon_use_admonition_for_references: False
61+
napoleon_use_ivar: False
62+
napoleon_use_param: True
63+
napoleon_use_rtype: True
64+
65+
# Intersphinx Configuration
66+
intersphinx_mapping:
67+
python: ['https://docs.python.org/3', null]
68+
numpy: ['https://numpy.org/doc/stable/', null]
69+
70+
# Theme Configuration
3171
html_theme: furo
3272
pygments_style: "friendly"
3373
html_favicon: logo.svg

cookbook/_templates/language-switch.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353

5454
// Define which captions should be displayed based on the selected language
5555
const languageMapping = {
56-
'en': ['English'],
57-
'zh': ['简介', '中文']
56+
'en': ['Tutorial', 'API Reference' ],
57+
'zh': ['简介', '教程', 'API 参考']
5858
};
5959

6060
const visibleCaptions = languageMapping[lang] || [];

cookbook/_toc.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format: jb-book
22
root: en/intro
33
parts:
4-
- caption: English
4+
- caption: Tutorial
55
numbered: 1
66
chapters:
77
- file: en/install.md
@@ -24,11 +24,23 @@ parts:
2424
- file: en/contribute.md
2525
sections:
2626
- file: en/README.md
27+
28+
- caption: API Reference
29+
chapters:
30+
- file: en/api/index.md
31+
title: "API Reference"
32+
sections:
33+
- file: en/api/sandbox.md
34+
title: "Sandbox"
35+
- file: en/api/engine.md
36+
title: "Engine"
37+
2738
- caption: 简介
2839
chapters:
2940
- file: zh/intro.md
3041
title: "0. 介绍"
31-
- caption: 中文
42+
43+
- caption: 教程
3244
numbered: 1
3345
chapters:
3446
- file: zh/install.md
@@ -50,4 +62,14 @@ parts:
5062
- file: zh/demohouse.md
5163
- file: zh/contribute.md
5264
sections:
53-
- file: zh/README.md
65+
- file: zh/README.md
66+
67+
- caption: API 参考
68+
chapters:
69+
- file: zh/api/index.md
70+
title: "API 参考"
71+
sections:
72+
- file: zh/api/sandbox.md
73+
title: "Sandbox"
74+
- file: zh/api/engine.md
75+
title: "Engine"

0 commit comments

Comments
 (0)