Skip to content

fix(skills/py): align Python agent skill with official CloudBase docs#577

Open
binggg wants to merge 3 commits intomainfrom
fix/skill-python-api-alignment
Open

fix(skills/py): align Python agent skill with official CloudBase docs#577
binggg wants to merge 3 commits intomainfrom
fix/skill-python-api-alignment

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 20, 2026

Summary

Full cross-file audit of skills/cloudbase-agent/py/ against official docs.

Root problem: main skill.md was 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 package
  • port=8000 — wrong default (official is 9000)
  • Docker -p 8000:8000 — wrong port mapping

Changes

File Before After
adapter-langgraph.md pip install cloudbase_agent[langgraph] pip install cloudbase-agent-langgraph cloudbase-agent-server langgraph langchain-openai
authentication.md (×2) port=8000 port=9000
adapter-development.md port=8000 port=9000
adapter-coze.md (×3) port=8000 / 8000:8000 port=9000 / 9000:9000
references/recipes.md port=8000 port=9000

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

  • skill.md main entry unchanged (already correct)
  • All sub-files now match official docs API signatures
  • No pip install cloudbase_agent patterns remain
  • No port=8000 remains in Python code examples

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

binggg added 2 commits April 20, 2026 18:21
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant