Getting Started with CozeIDE: Build and Deploy Plugins in 10 Minutes
This guide introduces CozeIDE, explains its main features such as code editing, dependency management, AI programming assistant, testing and publishing, and walks you through two complete plugin development examples—including a stock‑price lookup plugin—showing how to create, test, and release plugins using Node.js or Python runtimes.
1. What is CozeIDE?
CozeIDE is a plugin‑development tool provided by Coze that lets you develop, test, and host plugins without worrying about servers or domain configuration, and it includes an AI programming assistant that helps users of any skill level create plugins quickly.
Main Features
CozeIDE offers a full set of capabilities for plugin developers, including code editing, dependency management, testing, metadata handling, deployment, and an AI programming assistant.
1. Code Editing
The IDE supplies code templates and supports two runtimes—Node.js and Python—to meet different development needs.
Node.js Template Example
Python Template Example
2. AI Programming Assistant
Press Command + I on macOS or Ctrl + I on Windows to summon the AI assistant, which can generate code, modify existing code, explain code, or add comments.
AI‑generated code: describe the desired functionality and click to receive code.
AI‑modify code: select code, invoke the assistant, and specify the changes.
AI code explanation/commenting: select code and ask the assistant to explain or automatically add comments.
3. Dependency Management
External modules required by your code are treated as dependencies. If a required module is missing, the IDE shows an error; you can click “Add Dependency” at the bottom left, type the package name, and watch the installation progress in the console.
Specific Example
When a dependency is missing, an error is shown, then you install it, and after installation the error disappears. You can also install a specific version using the package@version syntax.
4. Metadata
Metadata tells the large model the input and output parameters of a tool and their meanings. For example, a tool that receives name and returns message needs those fields defined in the metadata panel.
5. Testing
After writing code and metadata, click the Test button, provide test data, or let the IDE auto‑generate random data based on the metadata schema. Run the test to see the result.
If output parameters were missing, click “Update Output Parameters” after a successful test; the IDE will fill them in for you to edit.
6. Publishing
Once tests pass, click Publish. You can disable unfinished tools before publishing. Then choose whether the plugin collects user information; select “Yes” and specify the data, or “No”, and finalize publishing.
2. 10‑Minute Quick Plugin Creation
The following sections demonstrate two complete plugins built with CozeIDE.
Plugin 1 – Stock Price Query (★)
Goal and Plan
Build a tool that returns the price of a stock given its name. The free Alpha Vantage API provides US‑stock quotes.
Steps
Step 1: Create Plugin and Tool
Open https://www.coze.cn/ and select your team.
Click “Create Plugin”, name it “Stock Price Query”, choose “Create in Coze IDE”, and select Node.js (or Python).
Create a tool named search_stock_prices with description “Query stock price by name”.
Step 2: Write Code
Define an input parameter code (stock symbol) in metadata, then use the AI assistant (Command+I / Ctrl+I) to generate the following Node.js handler:
import { Args } from '@/runtime';
import { Input, Output } from "@/typings/search_stock_prices/search_stock_prices";
import axios from 'axios';
export async function handler({ input, logger }: Args
): Promise
{
const code = input.code;
const apiKey = 'YOUR_ALPHA_VANTAGE_API_KEY';
const url = `https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=${code}&apikey=${apiKey}`;
try {
const response = await axios.get(url);
const data = response.data['Global Quote'];
return { code: code, price: data['05. price'] };
} catch (error) {
logger.error(`Error fetching stock price for ${code}: ${error}`);
return { code: code, price: null };
}
}Install the axios dependency via the IDE’s dependency manager.
Step 3: Test
Generate test data, set code to “AAPL”, run the test, and verify the returned price.
Step 4: Publish
Click Publish, choose “No” for data collection, and confirm.
Step 5: Create Bot and Use Plugin
Create a Bot, link the published plugin, configure the prompt, and start querying stock prices.
Plugin 2 – Juejin Articles (★★★)
Goal and Plan
Develop a tool that lists popular Juejin articles and searches them by topic. No source code is provided; you need to design the solution yourself.
Steps
Create a new plugin and a tool named search following the same UI flow as the first plugin.
Implement the logic (e.g., call Juejin’s public APIs) and manage dependencies.
Test the tool with sample data, update metadata, and ensure correct output.
Publish the plugin and create a Bot to use it.
Refer to the official documentation for advanced Bot configuration.
Conclusion
These two examples demonstrate the complete lifecycle of building, testing, and publishing CozeIDE plugins, from code editing and AI assistance to dependency handling, metadata definition, and Bot integration.
Rare Earth Juejin Tech Community
Juejin, a tech community that helps developers grow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.