Skip to content

Commit 4d2b702

Browse files
bingggclaude
andcommitted
fix(skills/py): align Python agent skill with official CloudBase docs
Based on https://docs.cloudbase.net/ai/agent/agent-adapter/agent-adapter-langgraph-python and full cross-file audit of skill/cloudbase-agent/py/*.md Fixes: - adapter-langgraph.md: pip install cloudbase_agent[langgraph] → correct split package names (cloudbase-agent-langgraph + cloudbase-agent-server + langgraph + langchain-openai) - authentication.md, adapter-development.md, adapter-coze.md, references/recipes.md: port=8000 → port=9000 (official default) - adapter-coze.md: Docker port mapping 8000:8000 → 9000:9000 Why this matters: evaluation agents kept failing pip install because the skill documented a non-existent package name, and port tests failed because grader/case used the wrong default. This audit brings all sub-files in line with skill.md's (already-correct) main entry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9765779 commit 4d2b702

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 3 additions & 3 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
@@ -314,7 +314,7 @@ CMD ["python", "app.py"]
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 \

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)