Skip to content

Commit 58ffd7e

Browse files
2 parents 2eea35a + 2913052 commit 58ffd7e

File tree

172 files changed

+785
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+785
-405
lines changed

.codebolt/4659_output.txt

-8
This file was deleted.

.codebolt/6dd799b5-43c2-4c55-ba49-cae6cbac2498.json

-14
This file was deleted.

.codebolt/chat.json

-1
This file was deleted.

.codebolt/debug.json

-1
This file was deleted.

.codebolt/projectState.json

-142
This file was deleted.

.codebolt/tasks.json

-1
This file was deleted.

.codebolt/undefined.json

-44
This file was deleted.

.codeboltconfig.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
appName: codeboltai.github.io
2+
appUniqueId: nursid/codeboltai.github.io
3+
appInfo:
4+
description: ''
5+
appVersion: 1.0.0
6+
appRepoUrl: ''
7+
appIconUrl: ''
8+
appAuthorUserId: nursid
9+
forkedFrom: ''
10+
technicalInfo:
11+
supportedLanguages:
12+
- React
13+
supportedFrameworks:
14+
- React
15+
secrets: []
16+
services: []
17+
knowledgebases: []
18+
instruction: []
19+
usage:
20+
develop:
21+
agents: []
22+
layout: ''
23+
run:
24+
- shell:
25+
command: npm start
26+
install:
27+
steps: []
28+
customInstallationAgent:
29+
enabled: false
30+
agent: ''
31+
appUse:
32+
prerunsteps: []
33+
agents: []
34+
layout: ''
35+
appPreview:
36+
type: ''

docs/agents/1_agentIntroduction.md

-2
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ Universal Agents are called whenever the user sends any chat in the editor or as
2525
### Action Agents
2626
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

28-
## Create your own Agents
29-
You can create your own Agents and use them in the editor. You can learn more about them at [Create your own Agents](./AgentTypes/UniversalAgents/createUniversalAgents.md)

docs/agents/4_runAgent.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Run Agents
2+
To use or run an agent, you’ll need to follow these steps:
3+
4+
* **Install an Agent**: Go to the marketplace and browse the available agents. Once you’ve found the agent you want to use, install it. Installation will add the agent to your Installed agents, making it available for activation.
5+
6+
* **View Installed Agents**: After installation, you can view all the agents in your Installed Agents. This allows you to manage which agents are currently installed and ready for use.
7+
8+
* **Select an Agent**: Only one agent can be active at a time, so choose the one best suited to your current task. Selecting an agent will activate it, meaning it will respond to relevant commands or actions you initiate in the editor.
9+
10+
* **Run the Agent**: Once an agent is selected, it will automatically activate in response to specific commands or tasks related to its function. For example, if you’re using CodeBolt Dev, you can can put your prompts in the chat, and the agent will respond with suggestions, error checks, or refactoring options.
11+
12+
* **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.
13+
14+
![selectAgent](../../static/img/selectAgent.png)
15+
16+
**To use agent in chat, you can follow these steps:**
17+
18+
In the chat interface, click on the `# symbol`. This will open list of all available agents.
19+
20+
* **Select an Agent**: From the list, choose the agent that fits your task or query. For example, if you’re working on deployment, you might select CodeBolt Web Deployment.
21+
22+
* **Interact with the Agent**: Once selected, you can start typing your query or command directly in the chat. The agent will process your request and respond based on its functionality.
23+
24+
* **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.
25+
26+
![runAgent2](../../static/img/runAgent2.png)

docs/agents/AgentTypes/UniversalAgents/agentGraph.md

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,84 @@
1-
# Create Custom Universal Agents
1+
# Create Custom Universal Agents
2+
3+
A custom universal agent is a type of agent in CodeBolt designed to interact dynamically with user messages and handle specific actions or workflows. The agent interprets a structured `Message` payload and returns a tailored `ResponseMessage`, specifying instructions for various tasks such as code generation, testing, deployment, and more.
4+
5+
6+
### create custom universal Agent
7+
8+
```bash
9+
//you will get this request form codebolt
10+
export type Message = {
11+
userMessage: string;
12+
currentFile: string;
13+
selectedAgent: { id: string; name: string; lastMessage: object };
14+
mentionedFiles: string[];
15+
mentionedFolders: string[];
16+
actions: string[];
17+
mentionedAgents: any[]; // Specify the type if known
18+
universalAgentLastMessage: string;
19+
};
20+
21+
export type Instruction = {
22+
agentId: string;
23+
step: Steps;
24+
action: string;
25+
prompt: string;
26+
};
27+
28+
//this is type of response you need to send
29+
export type ResponseMessage = {
30+
instructions: Instruction[];
31+
};
32+
33+
export enum Steps {
34+
USER_QUESTION = 'userquestion',
35+
CODE_GENERATION = 'codegeneration',
36+
TESTING = 'testing',
37+
DEPLOY = 'deploy',
38+
DOCUMENTATION = 'documentation',
39+
REVIEW = 'review'
40+
}
41+
42+
```
43+
44+
* Message: Contains user input and details of the current context, including the selected agent, referenced files, folders, actions, and other agents involved in the request.
45+
46+
* Instruction: Describes a single action or step for an agent to take in response to the `Message`.
47+
48+
* ResponseMessage: The output format expected from the custom universal agent, containing a list of instructions.
49+
50+
* Steps : Enumerates the different stages an agent might use to process the user's request, allowing for more organized workflows.
51+
52+
53+
```bash
54+
const express = require('express');
55+
const app = express();
56+
const port = 3000;
57+
58+
// Middleware to parse JSON request bodies
59+
app.use(express.json());
60+
61+
// Define your endpoint
62+
app.post('/message', (req, res) => {
63+
const message = req.body; // Extracting the Message from the request body
64+
65+
// write you logic to filter agent based on user message
66+
const responseMessage = {
67+
instructions: [
68+
{
69+
agentId: selectedAgent.id,
70+
step: 'USER_QUESTION', // As an example step
71+
action: 'Process the message',
72+
prompt: message.userMessage
73+
}
74+
]
75+
};
76+
//this is the format of respose you will need to send back
77+
78+
res.json(responseMessage);
79+
);
80+
// Start the server
81+
app.listen(port, () => {
82+
console.log(`Server is running on http://localhost:${port}`);
83+
});
84+
```
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
#
1+
# Integrated Universal Agent
2+
3+
The Integrated Universal Agent is the default agent included in the CodeBolt editor, There is one Universal Agent that is integrated within the Codebolt Editor. This ensures that the code does not leaves the editor as well as also to decreate the response latency.
4+
5+
- We have an option to create your own Universal Agents. You can learn more about them at [Create your own Universal Agents](./createUniversalAgents.md)

docs/agents/AgentTypes/UniversalAgents/taskGraph.md

-1
This file was deleted.

0 commit comments

Comments
 (0)