Skip to content

Commit ebc30d2

Browse files
authored
docs: Cookbook documentation in English updated (#257)
1 parent 1655c69 commit ebc30d2

26 files changed

+291
-152
lines changed

cookbook/en/advanced_deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,9 @@ if __name__ == "__main__":
644644
```
645645

646646
**Key Points**:
647-
- Automatically builds and packages project as wheel file
647+
- Automatically builds and packages the project as a wheel file
648648
- Uploads artifacts to OSS
649-
- Creates and manages runtime in AgentRun service
649+
- Creates and manages runtime in the AgentRun service
650650
- Automatically creates public access endpoints
651651
- Supports updating existing deployments (via `agentrun_id` parameter)
652652

cookbook/en/call.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The following example shows how to reuse `session_id` across multiple requests t
5959
1. First call: `"My name is Alice."`
6060
2. Second call: `"What is my name?"`
6161

62-
The SSE stream will mention “Alice”, confirming that session state is in effect.
62+
The SSE stream will mention “Alice”, confirming that the session state is in effect.
6363

6464
```python
6565
session_id = "123456"
@@ -158,5 +158,5 @@ The endpoint reuses the Responses API schema. The `test_openai_compatible_mode`
158158
- **Parsing errors**: SSE frames must be processed line by line; tolerate keep-alive blank lines or partial JSON chunks.
159159
- **Context not retained**: Confirm every request includes the same `session_id`, and that the `state/session` services are properly started within `init_func`.
160160

161-
With the examples above you can quickly validate and consume a deployed Agent service.
161+
With the examples above, you can quickly validate and consume a deployed Agent service.
162162

cookbook/en/concept.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ flowchart LR
118118
119119
class Tools,Service,Sandbox,Adapter,Agent,AgentAPP,Deployer big
120120
class RT,ST,PT,MS,SS,STS,SBS,BS,FS,GS,CSB,MSB,ETC,TAD,MAD,SAD,STAD,SBAD,AG,AG_NOTE,RA,CT,KD,DP,LD small
121-
```
121+
```
122122

123123
- **Agent**: The core AI component that processes requests and generates responses; in the runtime we recommend building agents with the AgentScope framework.
124124
- **AgentApp**: Serves as the application entry point. It exposes APIs, registers routes, loads configurations, and delegates incoming requests to the Runner for execution.
@@ -183,4 +183,4 @@ The runtime offers two patterns for integrating tools:
183183

184184
#### 7. Adapter
185185

186-
`Adapter` is categorized based on different Agent frameworks and includes tool adapters, memory adapters, session adapters, messages protocol adapters, and more.
186+
`Adapter` is categorized based on different Agent frameworks and includes tool adapters, memory adapters, session adapters, message protocol adapters, and more.

cookbook/en/deployment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Most deployments follow these stages:
2929

3030
### Service
3131

32-
The `Service` chapter explains the built-in session history, memory, sandbox, and state services plus the shared lifecycle interface. It helps you pick the right implementations (in-memory, Redis, Tablestore, and more) and shows how to manage them via `start()`, `stop()`, and `health()` so your deployment has a reliable backbone. See {doc}`service/service`.
32+
The `Service` chapter explains the built-in session history, memory, sandbox, and state services, as well as the shared lifecycle interface. It helps you pick the right implementations (in-memory, Redis, Tablestore, and more) and shows how to manage them via `start()`, `stop()`, and `health()` so your deployment has a reliable backbone. See {doc}`service/service`.
3333

3434
### Simple Deployment
3535

@@ -47,7 +47,7 @@ When you need stronger availability or observability guarantees, jump to the adv
4747

4848
- Running multi-service topologies via Docker Compose or Kubernetes.
4949
- Configuring multi-region/multi-model redundancy, canary releases, and autoscaling.
50-
- Integrating centralized logging, tracing, and alerting systems.
50+
- Integrating centralised logging, tracing, and alerting systems.
5151

5252
This is aimed at production scenarios or multi-team collaboration. See {doc}`advanced_deployment` for details.
5353

@@ -59,7 +59,7 @@ The reference sample demonstrates a full deployment that bundles sandbox service
5959
- Building the AgentApp
6060
- Starting all services
6161

62-
Review {doc}`react_agent` if you want to revisit every deployment step end to end.
62+
Review {doc}`react_agent` if you want to revisit every deployment step end-to-end.
6363

6464
## Next Steps
6565

cookbook/en/environment_manager.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ kernelspec:
1818

1919
`EnvironmentManager` provides lifecycle and access to sandboxed environments and tools through `SandboxService`.
2020

21-
Default behavior wires a `SandboxService` instance which manages environment creation, connection, and release.
21+
By default, a `SandboxService` instance is wired, which manages environment creation, connection, and release.
2222

2323
## Basic Usage
2424

@@ -45,19 +45,19 @@ In the future, `EnvironmentManager` will support not only `sandbox_service` but
4545

4646
## Sandbox Service
4747

48-
The **Sandbox Service** is designed to manage and provide access to sandboxed tool execution (see {doc}`sandbox` for details) sandboxes for different users and sessions. Sandboxes are organized by a composite key of session ID and user ID, allowing isolated execution contexts for each user session. The service supports multiple sandbox types and can automatically provision the required sandboxes based on the tools being used.
48+
The **Sandbox Service** is designed to manage and provide access to sandboxed tool execution (see {doc}`sandbox` for details) sandboxes for different users and sessions. Sandboxes are organised by a composite key of session ID and user ID, allowing isolated execution contexts for each user session. The service supports multiple sandbox types and can automatically provision the required sandboxes based on the tools being used.
4949

5050
### Service Overview
5151

52-
The Sandbox Service provides a unified interface for sandbox management with support for different sandbox types like code execution, file operations, and other specialized sandboxes. The following is an example to initialize a sandbox service:
52+
The Sandbox Service provides a unified interface for sandbox management, supporting sandbox types such as code execution, file operations, and other specialised sandboxes. The following is an example to initialise a sandbox service:
5353

5454
```{code-cell}
5555
from agentscope_runtime.engine.services.sandbox_service import SandboxService
5656
5757
# Create and start the sandbox service
5858
sandbox_service = SandboxService()
5959
60-
# Or with remote sandbox service
60+
# Or with a remote sandbox service
6161
# sandbox_service = SandboxService(
6262
# base_url="http://sandbox-server:8000",
6363
# bearer_token="your-auth-token"
@@ -68,7 +68,7 @@ sandbox_service = SandboxService()
6868

6969
#### Connecting to Sandboxes
7070

71-
The `connect` method allows you to connect to sandbox sandboxes for a specific user session:
71+
The `connect` method allows you to connect to the sandbox for a specific user session:
7272

7373
```{code-cell}
7474
# Connect with specific sandbox types

cookbook/en/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ For more detailed change descriptions and the migration guide, please refer to:
3636

3737
## What is AgentScope Runtime?
3838

39-
**AgentScope Runtime** is a full-stack agent runtime that tackles two core challenges: **efficient agent deployment** and **secure sandbox execution**. It ships with foundational services such as short- and long-term memory plus agent state persistence, along with hardened sandbox infrastructure. Whether you need to orchestrate production-grade agents or guarantee safe tool interactions, AgentScope Runtime provides developer-friendly workflows with complete observability.
39+
**AgentScope Runtime** is a full-stack agent runtime that tackles two core challenges: **efficient agent deployment** and **secure sandbox execution**. It ships with foundational services such as short- and long-term memory plus agent-state persistence, along with hardened sandbox infrastructure. Whether you need to orchestrate production-grade agents or guarantee safe tool interactions, AgentScope Runtime provides developer-friendly workflows with complete observability.
4040

4141
In V1.0, these services are exposed via an **adapter pattern**, enabling seamless integration with the native modules of different agent frameworks while preserving their native interfaces and behaviors, ensuring both compatibility and flexibility.
4242

@@ -46,7 +46,7 @@ This cookbook walks you through building service-ready agent applications with *
4646

4747
**⚙️ Agent Deployment Runtime (Engine)**
4848

49-
Provides `AgentApp` as the main entry point for agent applications, along with production‑grade infrastructure for deploying, managing, and traing agents. It also includes built‑in services such as session history, long‑term memory, and agent state management.
49+
Provides `AgentApp` as the main entry point for agent applications, along with production‑grade infrastructure for deploying, managing, and training agents. It also includes built‑in services such as session history, long‑term memory, and agent state management.
5050

5151
**🔒 Sandbox Execution Runtime (Sandbox)**
5252

cookbook/en/protocol.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Tool(BaseModel):
105105
```{code-cell}
106106
class FunctionCall(BaseModel):
107107
"""
108-
Model class for assistant prompt message tool call function.
108+
Model class for the assistant prompt message tool call function.
109109
"""
110110
111111
call_id: Optional[str] = None
@@ -128,7 +128,7 @@ class FunctionCall(BaseModel):
128128
```{code-cell}
129129
class FunctionCallOutput(BaseModel):
130130
"""
131-
Model class for assistant prompt message tool call function.
131+
Model class for the assistant prompt message tool call function.
132132
"""
133133
134134
call_id: str
@@ -240,7 +240,7 @@ class Message(Event):
240240
"""The status of the message. in_progress, completed, or incomplete"""
241241
242242
role: Optional[str] = None
243-
"""The role of the messages author, should be in `user`,`system`,
243+
"""The role of messages author, should be in `user`,`system`,
244244
'assistant'."""
245245
246246
content: Optional[
@@ -540,7 +540,7 @@ ContentBuilder supports multiple content types:
540540
#### Multi-Content Message Building
541541

542542
```python
543-
# Create message containing text and image
543+
# Create a message containing text and image
544544
message_builder = response_builder.create_message_builder()
545545

546546
# Add text content
@@ -560,7 +560,7 @@ message_builder.complete()
560560
#### Data Content Building
561561

562562
```python
563-
# Create message containing structured data
563+
# Create a message containing structured data
564564
data_builder = message_builder.create_content_builder("data", index=0)
565565

566566
# Set data content
@@ -602,7 +602,7 @@ from agentscope_runtime.engine.deployers.adapter.responses import ResponseAPIDef
602602
app = AgentApp(agent=agent)
603603
604604
# AgentApp automatically registers built-in adapters
605-
# You can also customize via protocol_adapters parameter
605+
# You can also customize via the protocol_adapters parameter
606606
app = AgentApp(
607607
agent=agent,
608608
protocol_adapters=[

cookbook/en/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ print("✅ Dependencies imported successfully")
6767

6868
### Step 2: Create the Agent App
6969

70-
`AgentApp` is the lifecycle and request hub of the agent application. All initialization, query handling, and shutdown routines are registered on it:
70+
`AgentApp` is the lifecycle and request hub of the agent application. All initialisation, query handling, and shutdown routines are registered on it:
7171

7272
```{code-cell}
7373
agent_app = AgentApp(
@@ -170,7 +170,7 @@ async def query_func(
170170

171171
### Step 5: Run the Agent App
172172

173-
Start the Agent API server. After launch it listens on `http://localhost:8090/process`:
173+
Start the Agent API server. After launch, it listens on `http://localhost:8090/process`:
174174

175175
```{code-cell}
176176
# Start the service (listen on port 8090)
@@ -221,7 +221,7 @@ async def main():
221221
await agent_app.deploy(LocalDeployManager(host="0.0.0.0", port=8091))
222222
```
223223

224-
This spins up the agent server on the specified port so external clients can call it. Beyond the basic HTTP API, you can also interact with the deployment through protocols like A2A, Response API, and Agent API—see {doc}`protocol` for details.
224+
This spins up the agent server on the specified port so external clients can call it. Beyond the basic HTTP API, you can also interact with the deployment via protocols such as A2A, Response API, and Agent API—see {doc}`protocol` for details.
225225

226226
Clients can even call the service through the OpenAI SDK:
227227

cookbook/en/react_agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ kernelspec:
1717
This tutorial shows how to build and deploy a *Reason + Act (ReAct)* agent with AgentScope Runtime and the [**AgentScope framework**](https://github.com/modelscope/agentscope).
1818

1919
```{note}
20-
The ReAct paradigm interleaves reasoning traces with task-specific actions, which is especially effective for tool-use scenarios. Combining AgentScope's `ReActAgent` with AgentScope Runtime gives you both smart decision making and safe tool execution.
20+
The ReAct paradigm interleaves reasoning traces with task-specific actions, which is especially effective for tool-use scenarios. Combining AgentScope's `ReActAgent` with AgentScope Runtime gives you both smart decision-making and safe tool execution.
2121
```
2222

2323
## Prerequisites
@@ -107,7 +107,7 @@ async def bootstrap_browser_sandbox():
107107
asyncio.run(bootstrap_browser_sandbox())
108108
```
109109

110-
Here `sandbox_types=["browser"]` matches the test suite so a single browser sandbox instance is reused for the same `session_id` / `user_id` pair.
110+
Here, `sandbox_types=["browser"]` matches the test suite, so a single browser sandbox instance is reused for the same `session_id` / `user_id` pair.
111111

112112
### Step 3: Build the AgentApp
113113

@@ -265,4 +265,4 @@ A successful result should look like “I'm Friday ...”.
265265

266266
## Summary
267267

268-
Following these steps you now have a ReAct agent with streaming responses, session memory, browser sandbox tooling, and an OpenAI-compatible endpoint. To deploy remotely or extend the toolset, swap out the model, state services, or registered tools as needed.
268+
Following these steps, you now have a ReAct agent with streaming responses, session memory, browser sandbox tooling, and an OpenAI-compatible endpoint. To deploy remotely or extend the toolset, swap out the model, state services, or registered tools as needed.

0 commit comments

Comments
 (0)