fix(skills/py): align Python agent skill with official CloudBase docs#577
fix(skills/py): align Python agent skill with official CloudBase docs#577
Conversation
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>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d2b702fcd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```bash | ||
| docker build -t coze-agent . | ||
| docker run -p 8000:8000 \ | ||
| docker run -p 9000:9000 \ |
There was a problem hiding this comment.
Restore container port in Docker run example
In the updated Docker command, docker run -p 9000:9000 publishes container port 9000, but the same example still sets ENV PORT=8000 and app.run(..., port=int(os.getenv("PORT", "8000"))), so the process listens on 8000 inside the container. If readers copy this section as-is, requests to host port 9000 will fail because nothing is bound to container port 9000.
Useful? React with 👍 / 👎.
Review by @chatgpt-codex-connector flagged: docker run -p 9000:9000 published host port 9000, but ENV PORT=8000 and os.getenv("PORT","8000") kept container listening on 8000. Host requests to 9000 would hit nothing. First-pass sed only caught `port=8000` literal; missed: - os.getenv("PORT", "8000") default value - ENV PORT=8000 Dockerfile directive - "port": 8000 config example All 8000 occurrences in the Python skill dir now unified to 9000.
Summary
Full cross-file audit of
skills/cloudbase-agent/py/against official docs.Root problem: main
skill.mdwas updated to use split package names (cloudbase-agent-langgraph+cloudbase-agent-server) and port 9000, but sub-files still had the old wrong API details. Agents reading these sub-files generated code with:pip install cloudbase_agent[langgraph]— non-existent packageport=8000— wrong default (official is 9000)-p 8000:8000— wrong port mappingChanges
Why this matters
Evaluation runs of atomic-py-none-cloudbase-agent-comprehensive repeatedly failed at pip install because agents trusted adapter-langgraph.md's wrong package name. Aligning all sub-files with the authoritative skill.md (already correct) removes this whole class of failures.
Test plan
🤖 Generated with Claude Code