aboutsummaryrefslogtreecommitdiffstats
path: root/agents/demo/README.md
blob: d430477eb177b8519fcb79b8a50ee61852ef6579 (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
# Demo

This is demo agent.

## tools.{sh,js,py}

You only need one of the `tools.sh`, `tools.js`, or `tools.py` files. All three are provided so that everyone can understand how to implement the tools in each language.

## tools.txt

The `tools.txt` is used to reuse the tools in the `tools/` directory.

## index.yaml

This document is essential as it defines the agent.

### variables

Variables are generally used to record a certain behavior or preference of a user.

```yaml
variables:
  - name: foo
    description: This is a foo
  - name: bar
    description: This is a bar with default value
    default: val
```

Variables can be used in the `instructions`.

```yaml
instructions: |
  The instructions can inline {{foo}} and {{bar}} variables.
```

### 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
```