Skip to content

Commit a5c36d5

Browse files
authored
🐛 fix bug with reasoning not being handled by a simple strategy (#1180)
<!-- Thank you for opening a pull request! Please add a brief description of the proposed change here. Also, please tick the appropriate points in the checklist below. --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> After the fix from @devcrocod we do need to update our example code agent to use the explicit sequential strategy. ## Breaking Changes <!-- Will users need to update their code or configurations? --> --- #### 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) - [ ] 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 9e6ec06 commit a5c36d5

File tree

2 files changed

+4
-2
lines changed
  • examples/code-agent
    • step-01-minimal-agent/src/main/kotlin
    • step-02-add-execution-tool/src/main/kotlin

2 files changed

+4
-2
lines changed

examples/code-agent/step-01-minimal-agent/src/main/kotlin/Main.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ai.koog.agents.examples.codeagent.step01
22

33
import ai.koog.agents.core.agent.AIAgent
4+
import ai.koog.agents.core.agent.ToolCalls
45
import ai.koog.agents.core.agent.singleRunStrategy
56
import ai.koog.agents.core.tools.ToolRegistry
67
import ai.koog.agents.ext.tool.file.EditFileTool
@@ -25,7 +26,7 @@ val agent = AIAgent(
2526
Your goal is to deliver production-ready code changes that integrate seamlessly with the existing codebase and solve given task.
2627
""".trimIndent(),
2728

28-
strategy = singleRunStrategy(),
29+
strategy = singleRunStrategy(ToolCalls.SEQUENTIAL),
2930
maxIterations = 100
3031
)
3132
{

examples/code-agent/step-02-add-execution-tool/src/main/kotlin/Main.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ai.koog.agents.examples.codeagent.step02
22

33
import ai.koog.agents.core.agent.AIAgent
4+
import ai.koog.agents.core.agent.ToolCalls
45
import ai.koog.agents.core.agent.singleRunStrategy
56
import ai.koog.agents.core.tools.ToolRegistry
67
import ai.koog.agents.ext.tool.file.EditFileTool
@@ -36,7 +37,7 @@ val agent = AIAgent(
3637
Verify your changes don't break existing functionality through regression testing, but prefer running targeted tests over full test suites.
3738
Note: the codebase may be fully configured or freshly cloned with no dependencies installed - handle any necessary setup steps.
3839
""".trimIndent(),
39-
strategy = singleRunStrategy(),
40+
strategy = singleRunStrategy(ToolCalls.SEQUENTIAL),
4041
maxIterations = 400
4142
) {
4243
handleEvents {

0 commit comments

Comments
 (0)