Skip to content

Commit ed38277

Browse files
agent and tool documentatation update
1 parent af4bf6c commit ed38277

34 files changed

+277
-56
lines changed

.zshrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Log fnm environment initialization
2+
fnm_env_with_logging() {
3+
local log_file="$HOME/fnm_env.log"
4+
echo "$(date): Running fnm env" >> "$log_file"
5+
fnm env >> "$log_file" 2>&1
6+
eval "$(fnm env)"
7+
}
8+
9+
# Replace the original command with our logging function
10+
alias load_fnm='fnm_env_with_logging'
11+
12+
# Uncomment to automatically run on shell startup
13+
# fnm_env_with_logging

docs/agents/1_agentIntroduction.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# App Introduction
1+
# Agent Introduction
22

33
Codebolt is an extremely powerful tool for AI Code Editing and AI Code Generation. Most of the power of Codebolt comes from the ability to use Agents. These agents are powerful tools that can be used to automate tasks, generate code, and even create entire applications.
44

@@ -13,7 +13,7 @@ Codebolt Editor exposes all the functionality of the Editor in the format of API
1313
- [JavaScript](https://github.com/codebolt-ai/codebolt-js)
1414
- [Python](https://github.com/codebolt-ai/codebolt-python) -->
1515

16-
## Codebolt Agents
16+
<!-- ## Codebolt Agents
1717
1818
Codebolt has Multiple Types of Agents that can do various tasks.
1919
- [Universal Agents](./AgentTypes/UniversalAgents/universalAgents.md)
@@ -23,5 +23,5 @@ Codebolt has Multiple Types of Agents that can do various tasks.
2323
Universal Agents are called whenever the user sends any chat in the editor or asks to perform any action that can be resolved to any agent. You can learn more about them at [Universal Agents](./AgentTypes/UniversalAgents/universalAgents.md)
2424
2525
### Action Agents
26-
Action Agents are called whenever the user sends any chat in the editor or asks to perform any action that can be resolved to any agent. You can learn more about them at [Action Agents](./AgentTypes/actionAgents.md)
26+
Action Agents are called whenever the user sends any chat in the editor or asks to perform any action that can be resolved to any agent. You can learn more about them at [Action Agents](./AgentTypes/actionAgents.md) -->
2727

docs/agents/2_firstExtension.md

+91-33
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,103 @@
1-
# Create your First Agent
1+
# Creating Your First Codebolt Agent
22

3-
## Create Codebolt Agent
4-
Follow the steps below to create a new agent using Codebolt.
3+
This guide will walk you through the process of creating your first custom Codebolt agent. Custom agents allow you to extend Codebolt's functionality with your own AI-powered tools.
54

6-
### Step 1: Select or Create a Project for Agent Creation
5+
## Prerequisites
76

8-
![create agent](../../static/img/create-agent.png)
7+
Before creating an agent, ensure you have:
8+
- Codebolt installed on your system
9+
- Node.js and npm (comes with the Codebolt installation)
10+
- Basic understanding of JavaScript/TypeScript
911

10-
- *After creating or opening a project, open a terminal to create an agent.*
12+
## Step-by-Step Guide
1113

12-
### Step 2: Initialize the Agent Creation Process
14+
### 1. Initiating Agent Creation
1315

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
16+
To begin creating a new agent:
2217

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
18+
1. **Open Codebolt** and navigate to the chat interface.
19+
2. **Click on the "Create Agent" button** in the chat window. This option is typically found in the sidebar or main interface.
2620

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-
```
21+
![In chat window click on create agent](../../static/img/create-agent.png)
3522

36-
### Step 4: Verify Agent Creation
23+
### 2. Select Agent Type
3724

38-
- *After successfully creating the agent, you can find your agent inside the .codeboltAgents folder.*
39-
![after success](../../static/img/after-creation.png)
25+
Next, you'll need to choose the type of agent you want to create:
26+
27+
1. **Select "Custom Agent"** from the available options. This allows you to create an agent with your own defined functionality.
28+
29+
![Select custom agent](../../static/img/custom-agent.png)
30+
31+
### 3. Configure Your Agent
32+
33+
Now it's time to set up the basic details for your agent:
34+
35+
1. **Name Your Agent**: Enter a descriptive name that indicates the agent's purpose.
36+
2. **Add a Description**: Provide a brief description explaining what your agent does.
37+
38+
![Name and description for agent](../../static/img/agent-name.png)
39+
40+
### 4. Creation Confirmation
41+
42+
After configuring your agent, the system will create the necessary files and structure:
43+
44+
1. **Success Message**: You'll see a confirmation screen indicating that your agent has been successfully created.
45+
46+
![Success confirmation screen](../../static/img/success.png)
47+
48+
### 5. Explore Generated Code
49+
50+
Codebolt will generate a starter code structure for your agent:
51+
52+
1. **Code Structure**: Review the generated files. Typically, this includes:
53+
- Main agent file with the core functionality
54+
- Configuration files
55+
- Dependencies and setup scripts
56+
57+
![Generated code structure](../../static/img/code.png)
58+
59+
### 6. Understanding the Agent Structure
60+
61+
The generated code provides a foundation for your custom agent with the following key components:
62+
63+
- **Main Agent File**: Contains the core logic for your agent
64+
- **Configuration Settings**: Defines how your agent interacts with Codebolt
65+
- **Tool Definitions**: Specifies the capabilities of your agent
66+
- **API Integration**: Enables your agent to communicate with external services
67+
68+
### 7. Customizing Your Agent
69+
70+
Now that your agent is created, you can start customizing it:
71+
72+
1. **Modify the Agent Logic**: Update the generated code to implement your desired functionality
73+
2. **Add Custom Tools**: Define additional tools that your agent can use
74+
3. **Configure Settings**: Adjust the configuration to meet your specific requirements
75+
4. **Implement API Calls**: Add code to connect with external services or APIs if needed
76+
77+
### 8. Testing Your Agent
78+
79+
Before finalizing your agent, it's important to test it:
80+
81+
1. **Run the Agent Locally**: Use the Codebolt testing environment to run your agent
82+
2. **Debug Issues**: Check for any errors or unexpected behavior
83+
3. **Refine Functionality**: Make adjustments based on testing results
84+
85+
### 9. Deploying Your Agent
86+
87+
Once your agent is working as expected, you can deploy it:
88+
89+
1. **Build Your Agent**: Compile the final version of your agent
90+
2. **Register in Codebolt**: Add your agent to the Codebolt registry
91+
3. **Share with Others**: Optionally, share your agent with the Codebolt community
92+
93+
## Next Steps
94+
95+
After creating your first agent, consider:
96+
- Exploring advanced agent features
97+
- Creating agents for specific workflows or tasks
98+
- Learning about agent collaboration and chaining
99+
- Contributing to the Codebolt agent ecosystem
100+
101+
By following this guide, you've successfully created your first Codebolt agent. As you become more familiar with the platform, you can develop increasingly sophisticated agents to enhance your productivity and workflow.
40102

41-
### Step 5: Next Steps
42103

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

+25-18
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
1-
# Run Local Agent in Codebolt
1+
# Running Local Agents in Codebolt
22

33
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.
44

55
## Step-by-Step Guide
66

77
### 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
8+
- Open Codebolt and locate the "Agent" section in the chat window
9+
- Click on the "Agent" dropdown menu in the top bar
1010

11-
![install agent](../../static/img/select-auto.png)
11+
![Access Agent Menu](../../static/img/browseAgent.png)
1212

1313
### 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
14+
- Click on "Browse agents" in the dropdown menu
15+
- Select "Local agent" from the available options
16+
17+
![Select Local Agent](../../static/img/selectLocalAgent.png)
1918

20-
![runlocal Agent](../../static/img/select-local-agent.png)
2119
### 3. Select Your Agent
22-
- Browse through the list of local agents
20+
- Browse through the list of available local agents
2321
- Each agent will display its name and basic information
2422
- Click on the agent you want to activate
23+
- The selected agent will become your active assistant
24+
25+
![Select From Local Agents](../../static/img/selectFormAllLocalAgent.png)
2526

27+
### 4. Debug Your Agent
28+
- All debug logs will be displayed in the debug window
29+
- Use these logs to troubleshoot any issues with your agent's performance
30+
- Monitor the execution of your agent's actions in real-time
2631

27-
![runlocal Agent](../../static/img/select-agent.png)
32+
![Debug Agent](../../static/img/DebugAgent.png)
2833

34+
### 5. Interact with Your Agent
35+
- Once activated, you can communicate with your local agent directly in the chat window
36+
- Ask questions, request assistance with coding tasks, or use any specialized functionality your agent provides
37+
- Your agent will respond based on its programmed capabilities
2938

30-
- After selection, the selected agent will be activated.
39+
## Additional Information
40+
- Local agents run directly on your machine, ensuring your code and queries remain private
41+
- You can switch between different agents at any time by repeating the selection process
42+
- For information on creating your own custom agent, refer to our [Agent Development Guide](./agentDevelopment.md)
3143

3244

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_runAgent.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To use or run an agent, you’ll need to follow these steps:
1111

1212
* **Switch Agents as Needed**: If you need a different set of functions, return to your agent list to deactivate the current agent and select another. For instance, if you’re done with development and need to deploy, switch from CodeBolt Dev to CodeBolt Web Deployment for automated deployment support.
1313

14-
![selectAgent](../../static/img/selectAgent.png)
14+
![selectAgent](../../static/img/browseAgent.png)
1515

1616
**To use agent in chat, you can follow these steps:**
1717

@@ -23,4 +23,6 @@ In the chat interface, click on the `# symbol`. This will open list of all avail
2323

2424
* **Switch Agents if Needed**: If you need help with a different type of task, click # again to open the agent list, select another agent, and start your next interaction.
2525

26-
![runAgent2](../../static/img/runAgent2.png)
26+
![runAgent2](../../static/img/selectMarketplaceAgent.png)
27+
28+
![runAgent2](../../static/img/SelectFormAgent.png)

docs/tools/1_tools.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Tools
2+
3+
Codebolt supports writing your own custom Model Control Protocol (MCP) tools. These custom tools allow you to extend Codebolt's functionality by creating specialized actions that AI agents can perform. You can define your own tool interfaces, implement their functionality, and make them available for agents to use when solving tasks.
4+
5+
Custom MCP tools are powerful for:
6+
- Integrating with external services and APIs
7+
- Creating domain-specific functionality for your projects
8+
- Automating repetitive tasks with specialized tools
9+
- Building workflow-specific capabilities
10+
11+

docs/tools/2_create_tool.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Creating Your First Tool
2+
3+
This guide walks you through the process of creating and customizing your first Codebolt tool.
4+
5+
## Tool Creation
6+
7+
You can create a new tool using either the Codebolt UI or the CLI:
8+
9+
### Option 1: Using the Codebolt UI
10+
11+
Navigate to the Codebolt dashboard and use the tool creation interface:
12+
13+
![Codebolt tool creation interface](../../static/img/mcpcreate.png)
14+
15+
Enter a descriptive name for your tool:
16+
17+
![Naming your Codebolt tool](../../static/img/nameyourmcp.png)
18+
19+
### Option 2: Using the CLI
20+
21+
Alternatively, use the Codebolt CLI by running:
22+
23+
```bash
24+
npx codebolt-cli createtool <toolName>
25+
```
26+
27+
Replace `<toolName>` with a descriptive name for your tool.
28+
29+
![CLI tool creation example](../../static/img/createTool.png)
30+
31+
## Tool Configuration
32+
33+
After creation, your tool will be available in the `.codeboltAgent/tool` directory within your project structure. This directory contains all configuration and implementation files needed for your tool.
34+
35+
![Tool directory structure](../../static/img/modifyyourtool.png)
36+
37+
## Customization Options
38+
39+
You can customize various aspects of your tool:
40+
41+
- Input parameters and validation
42+
- Processing logic and business rules
43+
- Output formatting and response handling
44+
- Integration with external services
45+
46+
For detailed information on available configuration options, refer to the [Tool Configuration Reference](../reference/tool-configuration.md).
47+
48+
## Testing and Deployment
49+
50+
Once configured, your tool will appear in the Tools section of the Codebolt chat interface. You can:
51+
52+
1. Test the tool's functionality with sample inputs
53+
2. Debug any issues in real-time
54+
3. Refine the tool's behavior as needed
55+
4. Deploy for production use
56+
57+
This iterative development process ensures your tool performs as expected in your application ecosystem.

docs/tools/3_testlocalmcp.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Testing Your Local MCP
2+
3+
This guide will walk you through the process of testing a locally deployed MCP (Modular Capability Processor).
4+
5+
6+
7+
## Testing Options
8+
9+
You can test your local MCP using either the graphical interface or the command-line interface.
10+
11+
### Option 1: Using the GUI
12+
13+
#### 1. Open the MCP Panel
14+
15+
Access the MCP panel by clicking the MCP icon in the Codebolt interface.
16+
17+
![Open MCP Panel](../../static/img/openMcp.png)
18+
19+
#### 2. Select Local MCP
20+
21+
From the dropdown menu, select "Local MCP" to connect to your locally running instance.
22+
23+
![Select Local MCP](../../static/img/SelectMcp.png)
24+
25+
### Option 2: Using the CLI
26+
27+
You can also test specific tools directly from the command line:
28+
29+
```bash
30+
codebolt-cli testtool <toolName>
31+
```
32+
33+
Replace `<toolName>` with the name of the specific tool you want to test.
34+
35+
## Verifying Connection
36+
37+
Once connected, check for status indicators confirming a successful connection to your local MCP instance.
38+
39+
40+

docusaurus.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ const config: Config = {
7474
position: 'left',
7575
label: 'Agents',
7676
},
77+
{
78+
type: 'docSidebar',
79+
sidebarId: 'toolSidebar',
80+
position: 'left',
81+
label: 'Tools',
82+
},
7783
{
7884
type: 'docSidebar',
7985
sidebarId: 'appSidebar',

fnm_env_output.log

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export PATH="/Users/ravirawat/.local/state/fnm_multishells/35935_1746877594537/bin":$PATH
2+
export FNM_MULTISHELL_PATH="/Users/ravirawat/.local/state/fnm_multishells/35935_1746877594537"
3+
export FNM_VERSION_FILE_STRATEGY="local"
4+
export FNM_DIR="/Users/ravirawat/.local/share/fnm"
5+
export FNM_LOGLEVEL="info"
6+
export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist"
7+
export FNM_COREPACK_ENABLED="false"
8+
export FNM_RESOLVE_ENGINES="true"
9+
export FNM_ARCH="arm64"
10+
rehash

0 commit comments

Comments
 (0)