-
Notifications
You must be signed in to change notification settings - Fork 302
Rework Getting started and agent types tutorials #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
39f1e80 to
d24c899
Compare
Move prerequisites to a snippet library and reuse Rename Complex workflow agents -> Graph-based agents Rename Agent types -> Agents Document what agents are and what are the core components, reference different types, document agent configuration via AIAgentConfig Core components/concepts are: Prompts, Strategies, Tools, Features (instead of Events, because event handling is one of the features) Also move abbreviations to snippets
d24c899 to
99abab3
Compare
|
|
||
| The [`AIAgent`](https://api.koog.ai/agents/agents-core/ai.koog.agents.core.agent/-a-i-agent/index.html) interface | ||
| is the primary starting point for creating Koog agents. | ||
| The overloaded `invoke()` operator functions on its companion object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to omit the details about the invoke() operator here and instead just write that users can instantiate the AIAgent interface as a class? For example: “Although AIAgent is an interface, you can instantiate it using a constructor-like syntax.”
If a user needs more details, they can follow the link to the API reference provided in the previous sentence.
|
|
||
| ## Add a system prompt | ||
|
|
||
| Provide a [system message](../prompts/prompt-creation/index.md#system-message) to define the agent's role and behavior, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest using "system prompt" in the first paragraph to keep consistency with the parameter name, and then introducing "system message" for users who want to learn more about prompts in Koog.
For example: “A system prompt defines the agent's role and behavior, as well as the purpose, context, and instructions related to the task. Use the systemPrompt parameter to provide it. This creates a single system message in the prompt. To learn more about the prompt structure, see Creating prompts.”
docs/mkdocs.yml
Outdated
| - Basic agents: getting-started/basic-agents.md | ||
| - Functional agents: getting-started/functional-agents.md | ||
| - Standard agents: getting-started/standard-agents.md | ||
| - Planner agents: getting-started/planner-agents.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, even though these pages are basic, it makes sense to keep them in their own section. We planned to add an overview for the “Agent types” section that explains the differences between the types and how to choose the right one for the user’s needs. So, a separate section seems even more appropriate. I would only rename it from “Agent types” to “Agents”.
I’d also suggest renaming “Getting started” to “Quickstart”, as this title better reflects the guide’s purpose. In the “Next steps” chapter at the end of the guide, we could add a link to the Agents overview page to help users choose the agent type and get started with implementation.
| Koog agents are built around the following core concepts: | ||
|
|
||
| - A [prompt executor](../prompts/prompt-executors.md) manages and executes prompts, | ||
| enabling the agent to interact with LLMs for reasoning and decision-making. | ||
| - A [strategy](../nodes-and-components.md) in the form of a directed graph defines the agent's workflow. | ||
| - An agent can use [tools](../tools-overview.md) to interact with external data sources and services. | ||
| - You can extend and enhance the functionality of AI agents using [features](../features-overview.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to somehow connect the listed concepts to the actual creation of agents. So I think it would still be better to give a brief description of how Koog agents are created.
I’d use this paragraph from basic-agents.md, since it’s true for all Koog agents:
The AIAgent interface is the primary starting point for creating Koog agents. The overloaded invoke() operator functions on its companion object enable you to instantiate this interface with a constructor-like syntax.
And then add something like
You provide it with the core components that handle the agent’s execution loop:
val agent = AIAgent( promptExecutor = promptExecutor, toolRegistry = toolRegistry, strategy = agentStrategy, agentConfig = agentConfig, installFeatures = features )
We can still have the Getting started link below, as it explains how to install Koog and set up a key.
| For information about creating and running a minimal agent, | ||
| see [Getting started](../getting-started.md) and [Basic agents](basic-agents.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename Getting started to Quickstart?
| - [Planner agents](planner-agents.md) can plan and execute multistep tasks through iterative cycles. | ||
| These agents implement a special type of strategy that accepts the initial state and outputs the final state. | ||
|
|
||
| ## Agent configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I’d start with an intro about what the agent configuration does:
Agent configuration defines the agent's execution parameters, including the initial prompt, language model, and iteration limits.
|
|
||
| Alternatively, you can create an instance of [`AIAgentConfig`](https://api.koog.ai/agents/agents-core/ai.koog.agents.core.agent.config/-a-i-agent-config/index.html) | ||
| to define the agent's behavior and parameters more granularly, | ||
| then pass it to the agent constructor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add
This enables you to define complex prompts with multiple messages, conversation history, LLM parameters, and additional execution parameters.
|
|
||
| Here are the parameters of `AIAgentConfig`: | ||
|
|
||
| - `prompt` defines the initial [prompt](../prompts/prompt-creation/index.md) and [LLM parameters](../llm-parameters.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add
Can be a string or a complex prompt with multiple messages created using the Kotlin DSL.
Move prerequisites to a snippet library and reuse
Rename Complex workflow agents -> Graph-based agents
Rename Agent types -> Agents
Document what agents are and what are the core components, reference different types, document agent configuration via AIAgentConfig
Core components/concepts are: Prompts, Strategies, Tools, Features (instead of Events, because event handling is one of the features)
Also move abbreviations to snippets
Motivation and Context
Breaking Changes
Type of the changes
Checklist
developas the base branchAdditional steps for pull requests adding a new feature