blob: ab9831d395059385a86852bfc501343236afee70 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Demo
This agent serves as a demo to guide agent development and showcase various agent capabilities.
## index.yaml
This file defines the agent.
### variables
Variables are generally used to store information about a user's behavior or preferences.
```yaml
variables:
- name: foo
description: This is a foo
- name: bar
description: This is a bar with default value
default: val
```
When use define variables, please avoid these built-in variables:
| name | description | example |
| :------------ | :-------------------------------------------- | :----------------------- |
| __os__ | Operating system name | linux |
| __os_family__ | Operating system family | unix |
| __arch__ | System architecture | x86_64 |
| __shell__ | Current user's default shell | bash |
| __locale__ | User's preferred language and region settings | en-US |
| __now__ | Current timestamp in ISO 8601 format | 2024-07-29T08:11:24.367Z |
| __cwd__ | Current working directory | /tmp |
Variables should be used in the `instructions` field.
```yaml
instructions: |
The instructions can inline user defined variables: {{foo}}, {{bar}} and builtin variables {{__shell__}}.
```
### documents
Documents are used for RAG, supporting local files/dirs and remote URLs.
```yaml
documents:
- local-file.txt
- local-dir/
- https://example.com/remote-file.txt
```
## tools.{sh,js,py}
The tool script implements agent-specific tools.
> You only need one of the `tools.sh`, `tools.js`, or `tools.py`.
## tools.txt
The `tools.txt` file enables tool reuse from the `/tools` folder in this project.
|