Skip to content

Commit e53fe87

Browse files
committed
updated
1 parent e9907d3 commit e53fe87

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,55 @@
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+
### Data Types
7+
* 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.
8+
9+
```bash
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[];
18+
universalAgentLastMessage: string;
19+
};
20+
```
21+
22+
* Instruction: Describes a single action or step for an agent to take in response to the `Message`.
23+
24+
```bash
25+
export type Instruction = {
26+
agentId: string;
27+
step: Steps;
28+
action: string;
29+
prompt: string;
30+
};
31+
32+
```
33+
34+
* ResponseMessage: The output format expected from the custom universal agent, containing a list of instructions.
35+
36+
```bash
37+
export type ResponseMessage = {
38+
instructions: Instruction[];
39+
};
40+
41+
```
42+
43+
* Steps : Enumerates the different stages an agent might use to process the user's request, allowing for more organized workflows.
44+
45+
```bash
46+
export enum Steps {
47+
USER_QUESTION = 'userquestion',
48+
CODE_GENERATION = 'codegeneration',
49+
TESTING = 'testing',
50+
DEPLOY = 'deploy',
51+
DOCUMENTATION = 'documentation',
52+
REVIEW = 'review'
53+
}
54+
55+
```

0 commit comments

Comments
 (0)