Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions module/move/assistant/design/agents_design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Agents

## YAML description structure

Please refer to `examples/` directory.

## Paths

- Used in node types, templates.
- Parts are delimited with `::`.
- Absolute path has a leading `::`.
- All paths (expect absolute) **are subject to absolutization**. Absolutization also depends on the context: in `next` fields paths are absolutized to `::nodes` dir, in templates - to `::output` and so on.

## Execution

- YAML file contains section about `nodes:`.
- Next node is encoded in `next:` field.
- Output of the nodes are stored in `::output` dir.

## Builtin scenarios

- `::scenario::entry`
- `::scenario::termination`

## Node types

- Input nodes:
- `trigger::stdin`
- `trigger::file`
- Processing nodes:
- `script`
- `agent::completion`
- Output nodes:
- `event::stdout`
- `event::file`

Refer to examples in `examples/` to see fields of nodes.
23 changes: 23 additions & 0 deletions module/move/assistant/design/agents_examples/sql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
nodes:
- id: input
type: trigger::stdin
prompt: 'Your query: '
next: node::translator

- id: sql_generator_stage1
type: agent::completion
system_message: 'Your task is to think about how to translate the user query in natural langauge in SQL langauge. Think step by steps.'
user_message: '{{input}}'
next: node::sql_generator_stage2

- id: sql_generator_stage2
type: agent::completion
system_message: 'Your task to make an SQL code based on user query in natural language and the results of thinking on that query'.
user_message: '{{sql_generator_stage1}}'
agent_reuse: node::sql_generator_stage2
next: node::output

- id: output
type: event::stdout
output: '{{sql_generator_stage2}}'
next: scenario::termination
Loading