Skip to content

Commit b4106d4

Browse files
committed
Apply feedback
1 parent 0872288 commit b4106d4

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

docs/docs/prompts/index.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ data class with the following properties:
1414
- `params`: Optional [LLM configuration parameters](prompt-creation/index.md#prompt-parameters) (such as temperature, tool choice, and others).
1515

1616
Although you can instantiate the `Prompt` class directly,
17-
the recommended way to create prompts is by using the Kotlin DSL,
17+
the recommended way to create prompts is by using the [Kotlin DSL](prompt-creation/index.md),
1818
which provides a structured way to define the conversation.
1919

2020
<!--- INCLUDE
@@ -95,8 +95,8 @@ Koog allows you to optimize performance and handle failures when running prompts
9595
## Prompts in AI agents
9696

9797
In Koog, AI agents maintain and manage prompts during their lifecycle.
98-
While LLM clients or executors are used for direct prompt execution, agents handle the flow of prompt updates to ensure
99-
the conversation history is relevant and consistent.
98+
While LLM clients or executors are used to run prompts, agents handle the flow of prompt updates, ensuring the
99+
conversation history remains relevant and consistent.
100100

101101
The prompt lifecycle in an agent usually includes several stages:
102102

@@ -107,9 +107,10 @@ The prompt lifecycle in an agent usually includes several stages:
107107

108108
### Initial prompt setup
109109

110-
When you [initialize an agent](../getting-started/#create-and-run-an-agent), you define a [system message](prompt-creation/index.md#system-message) that sets the agent's behavior.
111-
An initial [user message](prompt-creation/index.md#user-messages) is usually provided as input when you call the agent's `run()` method.
112-
For example:
110+
When you [initialize an agent](../getting-started/#create-and-run-an-agent), you define
111+
a [system message](prompt-creation/index.md#system-message) that sets the agent's behavior.
112+
Then, when you call the agent's `run()` method, you typically provide an initial [user message](prompt-creation/index.md#user-messages)
113+
as input. Together, these messages form the agent's initial prompt. For example:
113114

114115
<!--- INCLUDE
115116
import ai.koog.agents.core.agent.AIAgent
@@ -137,7 +138,7 @@ val result = agent.run("What is Koog?")
137138
```
138139
<!--- KNIT example-prompts-02.kt -->
139140

140-
The agent automatically converts the text prompt to the Prompt object and sends it to the prompt executor:
141+
In the example, the agent automatically converts the text prompt to the Prompt object and sends it to the prompt executor:
141142

142143
```mermaid
143144
flowchart TB
@@ -158,14 +159,18 @@ flowchart TB
158159
B -->|"result to"| A
159160
```
160161

162+
For more [advanced configurations](../complex-workflow-agents.md#4-configure-the-agent), you can also use
163+
[AIAgentConfig](https://api.koog.ai/agents/agents-core/ai.koog.agents.core.agent.config/-a-i-agent-config/index.html)
164+
to define the agent's initial prompt.
165+
161166
### Automatic prompt updates
162167

163168
As the agent runs its strategy, [predefined nodes](../nodes-and-components.md) automatically update the prompt.
164169
For example:
165170

166-
- [`nodeLLMRequest`](../nodes-and-components/#nodellmrequest): Appends the user message and captures the LLM response.
167-
- [`nodeExecuteTool`](../nodes-and-components/#nodeexecutetool): Adds tool execution results to the conversation history.
168-
- [`nodeAppendPrompt`](../nodes-and-components/#nodeappendprompt): Inserts specific messages or instructions into the prompt at any point in the workflow.
171+
- [`nodeLLMRequest`](../nodes-and-components/#nodellmrequest): Appends a user message to the prompt and captures the LLM response.
172+
- [`nodeLLMSendToolResult`](../nodes-and-components/#nodellmsendtoolresult): Appends tool execution results to the conversation.
173+
- [`nodeAppendPrompt`](../nodes-and-components/#nodeappendprompt): Inserts specific messages into the prompt at any point in the workflow.
169174

170175
### Context window management
171176

docs/docs/prompts/prompt-creation/multimodal-content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ All `ContentPart.Attachment` types accept the following parameters:
102102

103103
#### Attachment content
104104

105-
The AttachmentContent interface defines the type and source of content that is provided as input to the LLM:
105+
Implementations of the AttachmentContent interface define the type and source of content that is provided as input to the LLM:
106106

107107
- [`AttachmentContent.URL`](https://api.koog.ai/prompt/prompt-model/ai.koog.prompt.message/-attachment-content/-u-r-l/index.html) defines the URL of the provided content:
108108
```kotlin

0 commit comments

Comments
 (0)