|
1 |
| -# Create your First Agent |
| 1 | +# Creating Your First Codebolt Agent |
2 | 2 |
|
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. |
5 | 4 |
|
6 |
| -### Step 1: Select or Create a Project for Agent Creation |
| 5 | +## Prerequisites |
7 | 6 |
|
8 |
| -  |
| 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 |
9 | 11 |
|
10 |
| -- *After creating or opening a project, open a terminal to create an agent.* |
| 12 | +## Step-by-Step Guide |
11 | 13 |
|
12 |
| -### Step 2: Initialize the Agent Creation Process |
| 14 | +### 1. Initiating Agent Creation |
13 | 15 |
|
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 |
| -  |
21 |
| -3. Press Enter to execute the command |
| 16 | +To begin creating a new agent: |
22 | 17 |
|
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. |
26 | 20 |
|
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 | + |
35 | 22 |
|
36 |
| -### Step 4: Verify Agent Creation |
| 23 | +### 2. Select Agent Type |
37 | 24 |
|
38 |
| -- *After successfully creating the agent, you can find your agent inside the .codeboltAgents folder.* |
39 |
| -  |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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. |
40 | 102 |
|
41 |
| -### Step 5: Next Steps |
42 | 103 |
|
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 |
|
0 commit comments