SkillsReviewed · smallnest

coze-api integration skill

The coze-api skill is a Chinese-language guide and Python helper for developers integrating Coze agents, but current API compatibility and production reliability are unverified. It covers chat, streamed responses, conversation retrieval and workflow execution through Coze's China endpoint.

Researched 16 Nov 2026

In short.

The coze-api skill gives developers instructions and Python code for connecting applications to Coze agents, but its client needs stronger failure handling and validation against the current API. It combines assistant instructions, an endpoint reference and a synchronous Python requests client. Source inspection shows missing request timeouts, incomplete conversation-state handling and limited stream-event handling. Nothing was executed; live compatibility, performance and current service costs remain unknown.

Researched and written by an AI model and checked by a second AI model. How it works

Covers testdata/skills/coze-api/coze-api/SKILL.md, references/api_reference.md and scripts/coze_client.py at commit f9a22832c281ddf96bc0e94785709ef6055e7a4f, together with repository LICENSE and testdata/skills/THIRD_PARTY_NOTICES.md. Other goskills code and skills, dependency internals and the contents of linked documentation and SDKs are outside this assessment. No code was executed. Installation, live endpoint correctness, streaming interoperability, service costs, performance and application reliability remain unverified.

The overview

Identity

This resource is the coze-api skill inside smallnest/goskills at testdata/skills/coze-api/coze-api. It contains SKILL.md, references/api_reference.md and scripts/coze_client.py. The instructions and reference are written in Chinese; the Python helper exposes a CozeClient class.

Its assistant instructions describe when to use the skill for Coze integrations. The accompanying code provides an application integration starting point. Original folder: [https://github.com/smallnest/goskills/tree/master/testdata/skills/coze-api/coze-api].

Assessment

The skill offers a concrete starting point for understanding how an application authenticates, starts a Coze conversation, checks completion and retrieves an answer. Its small client makes those operations easy to inspect and adapt.

It needs additional engineering before dependable application use. The client does not set HTTP timeouts, check HTTP status codes or consistently validate API response bodies. The supplied reference describes conversation states and events that the implementation does not fully handle. Current API compatibility is not established.

Users

The strongest fit is a developer or coding-assistant user who already has a Coze agent and wants to connect it to a Python application. Beginners receive account preparation, authentication and request examples; experienced developers receive a readable wrapper they can modify.

Readers need some Python and HTTP knowledge, and must be comfortable with Chinese documentation. The files do not establish compatibility with a particular assistant host or provide a graphical setup experience.

Capabilities

CozeClient provides methods to start non-streaming chat, yield streamed text, retrieve chat status, list messages and submit workflow parameters. Chat methods accept an optional conversation_id for continuing a conversation and optional custom_variables for supplying context.

The chat_with_polling helper combines chat creation, status polling and answer retrieval. It returns the first message identified as an assistant answer. These capabilities are present in the supplied code; successful interaction with the live service is unverified.

Using it

Requirements

The helper requires Python 3, the requests package and network access to [https://api.coze.cn]. The guide calls for a Coze account, a personal access token, a bot ID and publication of the bot as an API service. Workflow execution additionally needs a published workflow, its identifier and suitable parameters.

The supplied files include no dependency manifest, pinned package versions or minimum Python version. Account eligibility, token permissions and access from a particular deployment region are not established.

Mechanism

The client sends JSON requests with the personal access token in an Authorization bearer header. Its base URL is fixed initially to [https://api.coze.cn]. Non-streaming chat posts to /v3/chat, then the polling helper queries /v3/chat/retrieve and fetches /v3/chat/message/list after completion. Workflow submission uses /v3/workflows/run.

Streaming requests iterate over response lines and extract text from JSON data records containing conversation.message.delta. The client sets auto_save_history to true for non-streaming requests and false for streaming requests. Messages and supplied custom variables are transmitted to Coze; service retention and privacy terms are not included.

Setup

The documented preparation is to create a personal access token on Coze, obtain the bot ID from its editing URL and publish the bot using Bot as API. For the Python example, provide Python 3 and requests, then supply COZE_PAT_TOKEN and COZE_BOT_ID through environment variables. The main function reads those variables and creates the client.

Use a distinct user_id when integrating multiple users: the constructor otherwise uses default_user. The main entry point attempts a polled chat followed by a streaming chat, so running it with valid credentials can consume service usage. Installation into a specific assistant host is not documented.

Example

The supplied main function asks the configured bot to introduce artificial intelligence through chat_with_polling, then requests a poem about spring through stream_chat. The intended behavior is a complete answer for the first request and incremental text for the second; no successful output was observed.

For a continuing conversation, chat accepts conversation_id and returns the API response containing identifiers in the documented response shape. chat_with_polling returns only answer text, so an application needing conversation identifiers must retain them through another integration path.

Assessment & evidence

Limitations

Client requests omit timeouts and HTTP status checks. Calls immediately attempt JSON parsing, and the polling helper assumes particular response fields exist. Network errors, malformed responses and service-level failures are not handled consistently.

The default polling loop allows 30 checks, each preceded by a two-second sleep. This is not a hard 60-second deadline because network waits have no configured timeout. The max_retries argument counts polling attempts; it does not implement retries for failed HTTP requests. The documented requires_action state has no dedicated handling.

Streaming stops on conversation.message.completed and does not explicitly handle conversation.chat.completed or conversation.chat.failed. The parser assumes the event structure shown in the bundled reference and silently ignores invalid JSON. Live stream compatibility, complete response delivery and failure reporting remain unverified.

Fit rationale

The resource's practical value is the connection between explanatory instructions, request shapes and a readable implementation. That combination can help a developer understand the integration and identify where to adapt it.

It is best suited to learning or a prototype whose developer will validate API behavior and add reliability controls. Applications needing dependable multi-user operation, actionable failures or complete streaming-state handling require work beyond the supplied helper. No evidence supports claims about speed, scale or answer quality.

Alternatives

The skill links Coze's API overview [https://www.coze.cn/open/docs/developer_guides/coze_api_overview], chat reference [https://www.coze.cn/docs/developer_guides/chat_v3] and developer playground [https://www.coze.cn/open/playground]. These provide routes to provider documentation and exploration.

The reference also links the coze-py Python SDK [https://github.com/coze-dev/coze-py] as an alternative integration resource. Those linked resources were not supplied in full, so their current features, installation requirements and comparative quality were not assessed.

Evidence

The available evidence comprises the complete skill instructions, API reference, Python client, repository MIT license and broader third-party notices. Implementation findings describe visible code; endpoint rules, account limits and billing descriptions remain claims made by the accompanying documentation.

The source snapshot is commit f9a22832c281ddf96bc0e94785709ef6055e7a4f. Its fixed folder address is [https://github.com/smallnest/goskills/tree/f9a22832c281ddf96bc0e94785709ef6055e7a4f/testdata/skills/coze-api/coze-api]. No execution results, live API responses or performance measurements are supplied. Nothing was executed.

Access & freshness

Costs

Current Coze service cost is unknown. The guide claims a one-time 100-call basic allowance and token-based professional billing. Its reference also lists basic-tier request limits and claims no professional-tier rate limits. These are unconfirmed documentation claims, not established current entitlements.

No token prices, model-specific charges or usable total-cost estimate are supplied. Polling adds HTTP requests, but their effect on billing and quotas is unknown. The repository's MIT license permits software use without a license fee; that does not establish free access to Coze.

Rights

The repository root provides an MIT license with copyright attributed to smallnest, 2025. It permits use, modification and redistribution, including commercial use, provided the copyright and permission notice accompany copies or substantial portions. It also disclaims warranty.

The broader testdata/skills/THIRD_PARTY_NOTICES.md lists separately licensed media software and fonts, including GPLv3 FFmpeg and Open Font License fonts. Those notices do not establish that the listed components are dependencies of this skill. The supplied notices do not establish the requests dependency's terms or Coze service terms.

Freshness

The supplied snapshot was captured on 16 November 2026 at 06:42:07.112 UTC. That records when the source was captured, not when the skill was written or last substantively updated.

The files describe v3 API routes, but the capture date does not confirm present endpoint behavior, streaming rules, prices or quotas. Later upstream changes and compatibility with the current Coze service are unknown.

Next steps

Before adopting the helper, confirm the chat and workflow routes, stream-event format, history settings, token permissions and account charges against current Coze documentation. Keep credentials outside source code and provide a distinct user_id for each application user.

Add explicit request timeouts, HTTP and API error checks, response validation and handling for requires_action and stream failure events. Then validate chat creation, continuation, answer retrieval, workflow execution and interrupted streams with your own bot. Preserve the source notices when copying or distributing the files.

Evidence for this report

LICENSEnotice · checked 2026-11-16
testdata/skills/THIRD_PARTY_NOTICES.mdnotice · checked 2026-11-16
testdata/skills/coze-api/coze-api/SKILL.mdselected · checked 2026-11-16