|
1 | 1 | # Create your First Agent
|
2 | 2 |
|
3 |
| - |
4 | 3 | ## Create Codebolt Agent
|
5 |
| - |
6 | 4 | Follow the steps below to create a new agent using Codebolt.
|
7 | 5 |
|
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 |
| -  |
| 6 | +### Step 1: Select or Create a Project for Agent Creation |
12 | 7 |
|
13 |
| -- *Navigate to the .codeboltAgents directory.* |
14 |
| - ```bash |
15 |
| - cd .codeboltAgents |
16 |
| - |
17 |
| - ``` |
| 8 | +  |
18 | 9 |
|
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.* |
24 | 11 |
|
25 |
| - |
| 12 | +### Step 2: Initialize the Agent Creation Process |
26 | 13 |
|
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 | +  |
| 21 | +3. Press Enter to execute the command |
29 | 22 |
|
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 |
40 | 26 |
|
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 | +``` |
42 | 35 |
|
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 |
44 | 37 |
|
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 | +  |
48 | 40 |
|
49 |
| -- **Step 4: Add Action Steps** |
50 |
| -Actions represent the functionalities your agent provides. For example: |
| 41 | +### Step 5: Next Steps |
51 | 42 |
|
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 |
0 commit comments