Skip to content

Commit 158af52

Browse files
docs updated
1 parent 34672e9 commit 158af52

17 files changed

+194
-63
lines changed

docs/agents/2_firstExtension.md

+30-41
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,45 @@
11
# Create your First Agent
22

3-
43
## Create Codebolt Agent
5-
64
Follow the steps below to create a new agent using Codebolt.
75

8-
### Step 1: Choose Your Method to Create an Agent
9-
- **Option 1: Use Agent Template**
10-
Open Codebolt Application. Create Project In Workspace > Select Agent Template > Create Project
11-
![create agent](../../static/img/createAgent.png)
6+
### Step 1: Select or Create a Project for Agent Creation
127

13-
- *Navigate to the .codeboltAgents directory.*
14-
```bash
15-
cd .codeboltAgents
16-
17-
```
8+
![create agent](../../static/img/create-agent.png)
189

19-
- **Option 2: Use Npx Command**
20-
Open your terminal in the directory where you want the agent to be created and run the following command:
21-
```bash
22-
npx create-codebolt-agent your-agent-name
23-
```
10+
- *After creating or opening a project, open a terminal to create an agent.*
2411

25-
![create agent](../../static/img/agent-create.png)
12+
### Step 2: Initialize the Agent Creation Process
2613

27-
### Step 2: Fill in the Required Information
28-
After running the command, you'll be prompted to provide several details. Here are the inputs you need:
14+
1. Open your terminal in the project directory
15+
2. Type the following command:
16+
```bash
17+
npx codebolt-cli createagent demoAgent --quick
18+
```
19+
20+
![open terminal](../../static/img/open-terminal.png)
21+
3. Press Enter to execute the command
2922

30-
- Application Name: The name of your application **(e.g., myagent)**.
31-
- Unique ID: A unique identifier for the agent **(e.g., myagent)**.
32-
- Installation Path: The path where your agent will be installed **(e.g., C:\btpl\codeboltapp\crud\myagent)**.
33-
- Template: Select a template for your application **(e.g., basic)**.
34-
- Description: Provide a description for your agent **(e.g., My Codebolt Agent)**.
35-
- Tags: Enter tags for your agent **(comma-separated, e.g., test)**.
36-
- Works on Blank Code: Choose **Yes** if your agent works on blank code.
37-
- Works on Existing Code: Choose **Yes** if your agent works on existing code.
38-
- Supported Languages: Specify the languages your agent will support **(e.g., all, javascript, typescript)**.
39-
- Supported Frameworks: Select the frameworks your agent will support **(e.g., all, nextjs)**.
23+
- `demoAgent`: This is the name of your agent (can be customized)
24+
- `--quick`: This flag creates a basic agent template with default configurations
25+
### Step 3: Understanding the Agent Structure
4026

41-
- **Step 3: Configure SDLC Steps**
27+
After successful creation, your agent will have the following structure:
28+
```
29+
.codeboltAgents/
30+
└── demoAgent/
31+
├── codeboltagent.yaml # Agent configuration file
32+
├── agent.yaml # contains Prompt for agent
33+
├── task.yaml # contains instruction for task
34+
```
4235

43-
- The SDLC (Software Development Life Cycle) steps define what tasks your agent will handle **(e.g., code generation, deployment)**. Here's an example configuration:
36+
### Step 4: Verify Agent Creation
4437

45-
- **SDLC Step Name: codegeneration**
46-
- Instruction Description: Generate a new React component
47-
Once you've provided these details, you'll be asked if you want to add more SDLC steps. Choose No if you don’t need additional steps.
38+
- *After successfully creating the agent, you can find your agent inside the .codeboltAgents folder.*
39+
![after success](../../static/img/after-creation.png)
4840

49-
- **Step 4: Add Action Steps**
50-
Actions represent the functionalities your agent provides. For example:
41+
### Step 5: Next Steps
5142

52-
- Action Name: **Execute**
53-
- Action Description: **Executes the given task**
54-
- Detail Description (Optional): **more detailed description**
55-
- Action Prompt (Optional): **Please run this code**
56-
- You can add more actions if needed.
43+
1. Open the `codeboltagent.yaml` file to customize your agent's settings
44+
2. Configure your agent's prompt in the `agent.yaml` file
45+
3. Define tasks and instructions in the `task.yaml` file

docs/agents/3_runExtension.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Run Local Agent in Codebolt
2+
3+
This guide will walk you through the process of running a local agent in Codebolt. Local agents allow you to use custom-built AI assistants directly within your development environment.
4+
5+
## Step-by-Step Guide
6+
7+
### 1. Access the Agent Menu
8+
- Open Codebolt and locate the "Agent" section in the main toolbar
9+
- Click on the "Agent: auto chat" header to open the agent selection menu
10+
11+
![install agent](../../static/img/select-auto.png)
12+
13+
### 2. Navigate to Local Agents
14+
- In the popup window, you'll see three tabs:
15+
- **Installed**: Shows currently active agents
16+
- **MarketPlace**: Contains pre-built agents available for download
17+
- **Local**: Displays agents stored on your machine
18+
- Click on the "Local" tab to view your available local agents
19+
20+
![runlocal Agent](../../static/img/select-local-agent.png)
21+
### 3. Select Your Agent
22+
- Browse through the list of local agents
23+
- Each agent will display its name and basic information
24+
- Click on the agent you want to activate
25+
26+
27+
![runlocal Agent](../../static/img/select-agent.png)
28+
29+
30+
- After selection, the selected agent will be activated.
31+
32+
33+
![runlocal Agent](../../static/img/after-selection.png)
34+
## Troubleshooting Tips
35+
- If you don't see your local agent:
36+
- Verify the agent files are in the correct directory
37+
- Restart Codebolt and try again

docs/agents/4_runExtension.md

-21
This file was deleted.
File renamed without changes.

docs/api/1_api_index.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
cbapicategory:
3+
- name: Agent
4+
link: /docs/api/agent
5+
description: The browser module provides functions for interacting with the browser.
36
- name: Browser
47
link: /docs/api/browser
58
description: The browser module provides functions for interacting with the browser.

docs/api/agent/_category_.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"label": "Agent",
3+
"position": 2.5,
4+
"collapsible": true,
5+
"collapsed": true,
6+
"className": "red",
7+
"link": {
8+
"type": "doc",
9+
"id": "api/agent/index"
10+
}
11+
}

docs/api/agent/findAgent.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: findAgent
3+
cbbaseinfo:
4+
description: Finds an agent suitable for the specified task.
5+
cbparameters:
6+
parameters:
7+
- name: task
8+
typeName: string
9+
description: The task for which an agent is needed.
10+
- name: maxResult
11+
typeName: number
12+
description: Maximum number of agents to return (default 1).
13+
- name: agents
14+
typeName: array
15+
description: List of agents to filter in vector database.
16+
- name: agentLocation
17+
typeName: AgentLocation
18+
description: Location preference for agents (ALL, LOCAL_ONLY, REMOTE_ONLY).
19+
- name: getFrom
20+
typeName: FilterUsing
21+
description: Filtering method (USE_AI, USE_VECTOR_DB, USE_BOTH).
22+
returns:
23+
signatureTypeName: Promise
24+
description: A promise that resolves with the agent details.
25+
typeArgs:
26+
- type: reference
27+
name: any
28+
data:
29+
name: findAgent
30+
category: agent
31+
link: findAgent.md
32+
---
33+
<CBBaseInfo/>
34+
<CBParameters/>
35+
36+
### Examples
37+
38+
```js
39+
// Example 1: Find a single agent for a task
40+
const agent = await codebolt.agent.findAgent("dataProcessing");
41+
console.log("Found Agent:", agent);
42+
43+
// Example 2: Find multiple agents with specific filters
44+
const agents = await codebolt.agent.findAgent(
45+
"imageProcessing",
46+
3, // maxResult
47+
[], // agents
48+
codebolt.agent.AgentLocation.LOCAL_ONLY,
49+
codebolt.agent.FilterUsing.USE_VECTOR_DB
50+
);
51+
console.log("Found Agents:", agents);
52+
53+
// Example 3: Find agents using AI filtering
54+
const aiFilteredAgents = await codebolt.agent.findAgent(
55+
"naturalLanguageProcessing",
56+
2,
57+
[],
58+
codebolt.agent.AgentLocation.ALL,
59+
codebolt.agent.FilterUsing.USE_AI
60+
);
61+
console.log("AI Filtered Agents:", aiFilteredAgents);
62+
```
63+

docs/api/agent/getAgentList.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: getAgentsList
3+
cbbaseinfo:
4+
description: Retrieves a list of agents based on the specified type.
5+
cbparameters:
6+
parameters:
7+
- name: type
8+
typeName: Agents
9+
description: The type of agents to list (default is Agents.DOWNLOADED)
10+
returns:
11+
signatureTypeName: Promise
12+
description: A promise that resolves with the list of agents
13+
typeArgs:
14+
- type: reference
15+
name: any
16+
data:
17+
name: getAgentsList
18+
category: agent
19+
link: getAgentsList.md
20+
---
21+
<CBBaseInfo/>
22+
<CBParameters/>
23+
24+
### Example
25+
26+
```js
27+
// Example 1: Getting list of downloaded agents (default)
28+
const downloadedAgents = await codebolt.agent.getAgentsList();
29+
console.log("Downloaded Agents:", downloadedAgents);
30+
31+
// Example 2: Getting list of local agents
32+
const localAgents = await codebolt.agent.getAgentsList(Agents.LOCAL);
33+
console.log("LOCAL Agents:", localAgents);
34+
35+
// Example 3: Getting list of cloud agents
36+
const cloudAgents = await codebolt.agent.getAgentsList(Agents.CLOUD);
37+
console.log("CLOUD Agents:", cloudAgents);
38+
39+
// Example 4: Getting list of all agents
40+
const allAgents = await codebolt.agent.getAgentsList(Agents.ALL);
41+
console.log("ALL Agents:", allAgents);
42+
```
43+

docs/api/agent/index.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ cbapicategory:
66
- name: startAgent
77
link: /docs/api/agent/startAgent
88
description: Starts an agent for the specified task via WebSocket.
9+
- name: findAgent
10+
link: /docs/api/agent/findAgent
11+
description: Retrieves an agent based on the specified task with filtering options.
12+
- name: getAgentsList
13+
link: /docs/api/agent/getAgentsList
14+
description: Lists all available agents of a specific type.
915
---
1016
# Agent
11-
<CBAPICategory />
17+
<CBAPICategory />

static/img/after-creation.png

432 KB
Loading

static/img/after-selection.png

627 KB
Loading

static/img/create-agent.png

286 KB
Loading

static/img/create-project.png

356 KB
Loading

static/img/open-terminal.png

319 KB
Loading

static/img/select-agent.png

415 KB
Loading

static/img/select-auto.png

617 KB
Loading

static/img/select-local-agent.png

541 KB
Loading

0 commit comments

Comments
 (0)