Skip to content

Commit 37ceb61

Browse files
authored
Merge pull request #25 from CyprusCodes/extensions-studio
document CMND extensions studio
2 parents a042deb + 31864c1 commit 37ceb61

9 files changed

Lines changed: 189 additions & 8 deletions

File tree

docs/cmnd-custom-tools/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "CMND Custom Tools",
3-
"position": 5,
3+
"position": 4,
44
"link": {
55
"type": "generated-index"
66
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "CMND Extensions API",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index"
6+
},
7+
"description": "CMND Extensions API"
8+
}

docs/cmnd-custom-tools/cmnd-extension-js.md renamed to docs/cmnd-custom-tools/cmnd-extensions-api/cmnd-extension-js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: custom-tool-js
33
title: Build a Custom Tool – JavaScript
44
description: How to build a CMND Custom Tool using JavaScript
5-
sidebar_position: 3
5+
sidebar_position: 1
66
---
77

88
# Build a Custom Tool – JavaScript

docs/cmnd-custom-tools/cmnd-extension-python.md renamed to docs/cmnd-custom-tools/cmnd-extensions-api/cmnd-extension-python.md

File renamed without changes.

docs/cmnd-custom-tools/connect-tools.md renamed to docs/cmnd-custom-tools/cmnd-extensions-api/connect-tools.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: connect-to-cmnd
33
title: Connecting Your Tool to CMND.ai
44
description: How to connect your custom tool to the CMND.ai platform
5-
sidebar_position: 4
5+
sidebar_position: 3
66
---
77

88
# Connecting Your Tool to CMND.ai
@@ -19,7 +19,7 @@ Go to [app.cmnd.ai](https://app.cmnd.ai) and log in to your account.
1919

2020
From the sidebar, navigate to the **Connections** section:
2121

22-
![Connections Sidebar](../../static/img/integrations/connections.png)
22+
![Connections Sidebar](../../../static/img/integrations/connections.png)
2323

2424
---
2525

@@ -29,23 +29,23 @@ From the sidebar, navigate to the **Connections** section:
2929

3030
2. In the search bar enter "CMND Extensions API" an dselect the result.
3131

32-
![CMND Extensions API](../../static/img/integrations/cmnd-extensions-api.png)
32+
![CMND Extensions API](../../../static/img/integrations/cmnd-extensions-api.png)
3333

3434
2. Fill in the required fields:
3535

3636
- **Integration Name**: Give your connection a recognizable name
3737
- **API Base URL**: This is the public URL of your tool server (e.g., from Ngrok)
3838
- **Token**: If your extension requires a token enter one, otherwise leave the default value
3939

40-
![Fields to Create New Connections](../../static/img/integrations/create-new-connection.png)
40+
![Fields to Create New Connections](../../../static/img/integrations/create-new-connection.png)
4141

4242
:::warning
4343
Do **not** include a trailing `/` at the end of the API URL.
4444
:::
4545

4646
3. Submit the form. If everything is correct, you’ll see a confirmation:
4747

48-
![Tool Added](../../static/img/integrations/tool-added.png)
48+
![Tool Added](../../../static/img/integrations/tool-added.png)
4949

5050
---
5151

@@ -55,7 +55,7 @@ From the sidebar, navigate to the **Connections** section:
5555
2. Select the assistant or conversation you want to enhance.
5656
3. Scroll to the **Tools** section, and locate the CMND Extension collapse — you should see your tools listed there.
5757

58-
![Tool Selection](../../static/img/integrations/tool-selection.png)
58+
![Tool Selection](../../../static/img/integrations/tool-selection.png)
5959

6060
---
6161

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
id: extensions-studio
3+
title: CMND Extensions Studio
4+
description: Create and deploy custom tools easily inside CMND using the Extensions Studio.
5+
sidebar_position: 3
6+
---
7+
8+
import Tabs from '@theme/Tabs';
9+
import TabItem from '@theme/TabItem';
10+
11+
# Extensions Studio
12+
13+
The CMND Extensions Studio provides an easier way to create and connect custom tools to CMND — without needing to deploy your own server.
14+
15+
It offers the same functionality as building through the Extensions API, but streamlines the process by allowing you to develop, configure, and host your tool directly inside the CMND platform.
16+
17+
:::note
18+
This guide walks through how to create and deploy a custom tool using JavaScript or Python inside the CMND Extensions Studio.
19+
:::
20+
21+
---
22+
23+
## How to Use the Extensions Studio
24+
25+
### 1. Open the CMND Dashboard
26+
27+
- Go to [app.cmnd.ai](https://app.cmnd.ai) and log in to your account.
28+
- From the sidebar, navigate to the **Connections** section.
29+
30+
![Connections Sidebar](../../static/img/integrations/connections.png)
31+
32+
---
33+
34+
### 2. Launch the Extensions Studio
35+
36+
- In the search bar, enter "CMND Extension Studio" and select it from the results.
37+
38+
![CMND Extensions Studio](../../static/img/integrations/cmnd-extensions-studio.png)
39+
40+
---
41+
42+
### 3. Configure Your Tool
43+
44+
- Enter the name of your new tool.
45+
- Choose your development language (**Python** or **JavaScript**).
46+
- Click **Start**.
47+
48+
<!-- ![Extensions Studio Configurations]() -->
49+
50+
Once you click Start, you’ll be taken to the code editor with a boilerplate project ready, depending on the language you chose.
51+
52+
---
53+
54+
## Defining Your Tool
55+
56+
Each project will contain a base file (`tools.py` or `tools.js`) where you define your tool logic, input schema, and metadata.
57+
58+
<Tabs>
59+
<TabItem value="python" label="Python" default>
60+
61+
Inside `tools.py`:
62+
63+
```python title="tools.py" showLineNumbers
64+
from pydantic import BaseModel, Field
65+
import httpx
66+
import os
67+
68+
class WeatherCitySchema(BaseModel):
69+
city: str = Field(..., title="City", description="City name required")
70+
71+
async def weather_from_location(city: str):
72+
api_key = os.getenv('WEATHER_API_KEY')
73+
url = f"https://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}"
74+
async with httpx.AsyncClient() as client:
75+
response = await client.get(url)
76+
return response.json()
77+
78+
tool = [
79+
{
80+
"name": "weather_from_location",
81+
"description": "Gets the weather details from a given city name",
82+
"parameters": WeatherCitySchema.schema(),
83+
"runCmd": weather_from_location,
84+
"isDangerous": False,
85+
"functionType": "backend",
86+
"isLongRunningTool": False,
87+
"rerun": True,
88+
"rerunWithDifferentParameters": True
89+
}
90+
]
91+
```
92+
93+
- Use **Pydantic** to define your input schema
94+
- Write the tool's logic
95+
- Register the tool by adding it to the `tool` array
96+
97+
</TabItem>
98+
99+
<TabItem value="javascript" label="JavaScript">
100+
101+
Inside `tools.js`:
102+
103+
```javascript title="tools.js" showLineNumbers
104+
const axios = require("axios");
105+
const yup = require("yup");
106+
const yupToJsonSchema = require("./yupToJsonSchema");
107+
108+
const WeatherSchema = yup.object({
109+
city: yup.string().required(),
110+
});
111+
112+
const WeatherTool = {
113+
name: "weather_from_location",
114+
description: "Fetches current weather for a given city",
115+
category: "weather",
116+
subcategory: "forecast",
117+
functionType: "backend",
118+
dangerous: false,
119+
associatedCommands: [],
120+
prerequisites: [],
121+
parameters: yupToJsonSchema(WeatherSchema),
122+
rerun: true,
123+
rerunWithDifferentParameters: true,
124+
runCmd: async ({ city }) => {
125+
try {
126+
const response = await axios.get(
127+
`https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${process.env.WEATHER_API_KEY}`
128+
);
129+
return JSON.stringify(response.data);
130+
} catch (err) {
131+
return "Error trying to execute the tool";
132+
}
133+
},
134+
};
135+
136+
const tools = [WeatherTool];
137+
module.exports = tools;
138+
```
139+
140+
- Use **Yup** to define your input schema
141+
- Implement the tool logic
142+
- Export your tool properly for CMND to pick up
143+
144+
</TabItem>
145+
</Tabs>
146+
147+
---
148+
149+
## Deploying Your Tool
150+
151+
Once you finish defining your tool:
152+
153+
- Click the **Deploy** button in the Extensions Studio editor.
154+
- CMND will build and host the tool for you automatically.
155+
- Your tool will be available immediately inside the platform for use in conversations and assistants.
156+
157+
---
158+
159+
The CMND Extensions Studio allows you to go from an idea to a live, integrated tool — without worrying about servers, hosting, or infrastructure.

docs/cmnd-custom-tools/overview_and_capabilities.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ This means your assistants can do more than talk — they can act.
1515

1616
---
1717

18+
## Ways to Create Custom Tools
19+
20+
You can build and connect custom tools in CMND.ai in two ways:
21+
22+
- [**CMND Extensions API:**](https://docs.cmnd.ai/docs/category/cmnd-extensions-api)
23+
Develop your tool externally using your own infrastructure (e.g., FastAPI, Flask, Node.js), then connect it to CMND via a secure public endpoint.
24+
25+
- [**CMND Extensions Studio:**](https://docs.cmnd.ai/docs/cmnd-custom-tools/extensions-studio)
26+
Create and deploy your tool entirely within CMND’s web platform — no separate hosting needed. Ideal for quick setups, prototypes, or simpler tools.
27+
28+
Both options give you full flexibility over your tool’s behavior, schema, and integration.
29+
30+
---
31+
1832
## What You Can Do with Custom Tools
1933

2034
- **Connect LLMs to your backend logic**
28.1 KB
Loading
62.5 KB
Loading

0 commit comments

Comments
 (0)