Skip to content

Commit 9a50bf0

Browse files
authored
Updated documentation on functional agents (#881)
Updated documentation on functional agents --- #### Type of the changes - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] Documentation update - [ ] Tests improvement - [ ] Refactoring #### Checklist - [ ] The pull request has a description of the proposed change - [ ] I read the [Contributing Guidelines](https://github.com/JetBrains/koog/blob/main/CONTRIBUTING.md) before opening the pull request - [ ] The pull request uses **`develop`** as the base branch - [ ] Tests for the changes have been added - [ ] All new and existing tests passed ##### Additional steps for pull requests adding a new feature - [ ] An issue describing the proposed change exists - [ ] The pull request includes a link to the issue - [ ] The change was discussed and approved in the issue - [ ] Docs have been added / updated
1 parent 45012a3 commit 9a50bf0

File tree

5 files changed

+292
-209
lines changed

5 files changed

+292
-209
lines changed

docs/docs/act-ai-agent.md

Lines changed: 0 additions & 202 deletions
This file was deleted.

docs/docs/complex-workflow-agents.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
In addition to single-run agents, the `AIAgent` class lets you build agents that handle complex workflows by defining
44
custom strategies, tools, configurations, and custom input/output types.
55

6+
!!! tip
7+
If you are new to Koog and want to create the simplest agent, start with [Single-run agents](single-run-agents.md).
8+
69
The process of creating and configuring such an agent typically includes the following steps:
710

811
1. Provide a prompt executor to communicate with the LLM.
@@ -20,7 +23,7 @@ The process of creating and configuring such an agent typically includes the fol
2023
Use environment variables or a secure configuration management system to store your API keys.
2124
Avoid hardcoding API keys directly in your source code.
2225

23-
## Creating a single-run agent
26+
## Creating a complex workflow agent
2427

2528
### 1. Add dependencies
2629

@@ -39,7 +42,7 @@ For all available installation methods, see [Installation](index.md#installation
3942
Prompt executors manage and run prompts.
4043
You can choose a prompt executor based on the LLM provider you plan to use.
4144
Also, you can create a custom prompt executor using one of the available LLM clients.
42-
To learn more, see [Prompt executors](prompt-api.md#prompt-executors).
45+
To learn more, see [Prompt executors](prompt-api.md#running-prompts-with-prompt-executors).
4346

4447
For example, to provide the OpenAI prompt executor, you need to call the `simpleOpenAIExecutor` function and provide it with the API key required for authentication with the OpenAI service:
4548

@@ -115,6 +118,7 @@ val processNode by node<InputType, OutputType> { input ->
115118
}
116119
```
117120
<!--- KNIT example-complex-workflow-agents-04.kt -->
121+
118122
!!! tip
119123
There are also pre-defined nodes that you can use in your agent strategy. To learn more, see [Predefined nodes and components](nodes-and-components.md).
120124

@@ -165,6 +169,7 @@ edge(sourceNode forwardTo targetNode transformed { output ->
165169
edge(sourceNode forwardTo targetNode onCondition { it.isNotEmpty() } transformed { it.uppercase() })
166170
```
167171
<!--- KNIT example-complex-workflow-agents-05.kt -->
172+
168173
#### 3.2. Implement the strategy
169174

170175
To implement the agent strategy, call the `strategy` function and define nodes and edges. For example:
@@ -391,7 +396,7 @@ fun main() {
391396

392397
## Working with structured data
393398

394-
The `AIAgent` can process structured data from LLM outputs. For more details, see [Structured data processing](structured-data.md).
399+
The `AIAgent` can process structured data from LLM outputs. For more details, see [Structured data processing](structured-output.md).
395400

396401
## Using parallel tool calls
397402

0 commit comments

Comments
 (0)