Skip to content

Commit 173fad5

Browse files
authored
Merge pull request #577 from TencentCloudBase/fix/skill-python-api-alignment
fix(skills/py): align Python agent skill with official CloudBase docs
2 parents a47a2b0 + 1549389 commit 173fad5

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

config/source/skills/cloudbase-agent/py/adapter-coze.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create_agent():
3030
api_key="your-api-key"
3131
)
3232

33-
AgentServiceApp().run(create_agent, port=8000)
33+
AgentServiceApp().run(create_agent, port=9000)
3434
```
3535

3636
## Configuration
@@ -99,7 +99,7 @@ def create_agent():
9999

100100
app = AgentServiceApp()
101101
app.use(auth_middleware)
102-
app.run(create_agent, port=8000)
102+
app.run(create_agent, port=9000)
103103
```
104104

105105
### User ID Extraction
@@ -278,7 +278,7 @@ app.use(auth_middleware)
278278
if __name__ == "__main__":
279279
app.run(
280280
create_agent,
281-
port=int(os.getenv("PORT", "8000")),
281+
port=int(os.getenv("PORT", "9000")),
282282
host="0.0.0.0"
283283
)
284284
```
@@ -307,14 +307,14 @@ RUN pip install -r requirements.txt
307307

308308
COPY . .
309309

310-
ENV PORT=8000
310+
ENV PORT=9000
311311

312312
CMD ["python", "app.py"]
313313
```
314314

315315
```bash
316316
docker build -t coze-agent .
317-
docker run -p 8000:8000 \
317+
docker run -p 9000:9000 \
318318
-e COZE_BOT_ID=your-bot-id \
319319
-e COZE_API_KEY=your-api-key \
320320
-e JWT_SECRET_KEY=your-secret \
@@ -331,7 +331,7 @@ docker run -p 8000:8000 \
331331
"name": "coze-agent",
332332
"path": "./",
333333
"runtime": "Python3.9",
334-
"port": 8000,
334+
"port": 9000,
335335
"env": {
336336
"COZE_BOT_ID": "${COZE_BOT_ID}",
337337
"COZE_API_KEY": "${COZE_API_KEY}",

config/source/skills/cloudbase-agent/py/adapter-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Deploy it:
101101
```python
102102
from cloudbase_agent.server import AgentServiceApp
103103

104-
AgentServiceApp().run(lambda: SimpleEchoAgent(), port=8000)
104+
AgentServiceApp().run(lambda: SimpleEchoAgent(), port=9000)
105105
```
106106

107107
## Streaming Response Pattern

config/source/skills/cloudbase-agent/py/adapter-langgraph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The CloudBase Agent LangGraph adapter (`cloudbase_agent.langgraph`) provides sea
2222
### 1. Install Dependencies
2323

2424
```bash
25-
pip install cloudbase_agent[langgraph]
25+
pip install cloudbase-agent-langgraph cloudbase-agent-server langgraph langchain-openai
2626
```
2727

2828
This installs:

config/source/skills/cloudbase-agent/py/authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ from cloudbase_agent.server import AgentServiceApp
9191

9292
app = AgentServiceApp()
9393
app.use(auth_middleware) # Register before run()
94-
app.run(create_agent, port=8000)
94+
app.run(create_agent, port=9000)
9595
```
9696

9797
### 3. Adapter/Agent (Read)
@@ -239,7 +239,7 @@ def create_agent():
239239
# Start server with auth middleware
240240
app = AgentServiceApp()
241241
app.use(jwt_auth_middleware) # Register auth middleware
242-
app.run(create_agent, port=8000)
242+
app.run(create_agent, port=9000)
243243
```
244244

245245
### Step 3: Coze Adapter Internal Logic

config/source/skills/cloudbase-agent/py/references/recipes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ server = create_server()
2929
server.add_agent("/chat", agent)
3030

3131
if __name__ == "__main__":
32-
server.run(host="0.0.0.0", port=8000)
32+
server.run(host="0.0.0.0", port=9000)
3333
```
3434

3535
## Recipe 2: Multi-Agent System

0 commit comments

Comments
 (0)