diff --git a/module/move/assistant/design/agents_design.md b/module/move/assistant/design/agents_design.md new file mode 100644 index 0000000000..a4f9901294 --- /dev/null +++ b/module/move/assistant/design/agents_design.md @@ -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. \ No newline at end of file diff --git a/module/move/assistant/design/agents_examples/sql.yaml b/module/move/assistant/design/agents_examples/sql.yaml new file mode 100644 index 0000000000..a465756357 --- /dev/null +++ b/module/move/assistant/design/agents_examples/sql.yaml @@ -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 \ No newline at end of file