Skip to content

Commit 8998213

Browse files
authored
Merge pull request #176 from joreilly/agent_updates
koog agent updates
2 parents be98494 + a36b46d commit 8998213

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

agents/src/main/kotlin/koog/koog_agent.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ fun main() = runBlocking {
4040
executor = simpleOllamaAIExecutor(),
4141
//llmModel = OpenAIModels.Chat.GPT4o,
4242
//llmModel = GoogleModels.Gemini1_5Pro,
43+
systemPrompt ="""
44+
You an AI assistant specialising in providing information about global climate emissions.
45+
Pass the list of countries and the year to the get-emissions MCP tool to get climate emission information.
46+
Use 3 letter country codes.
47+
Use units of millions for the emissions data.
48+
""",
4349
llmModel = model,
4450
toolRegistry = createToolSetRegistry()
4551
) {
@@ -50,23 +56,17 @@ fun main() = runBlocking {
5056
onAgentRunError { eventContext ->
5157
println("An error occurred: ${eventContext.throwable.message}\n${eventContext.throwable.stackTraceToString()}")
5258
}
53-
onAgentFinished { eventContext ->
54-
println("Agent finished with result: ${eventContext.result}")
55-
}
5659
}
5760
}
5861

5962

6063
val output = agent.run(
6164
"""
62-
Get emission data for France and Germany for 2023 and 2024.
63-
Also break down by sector.
64-
Use 3 letter country codes.
65-
Use units of millions for the emissions data.
66-
""".trimIndent()
65+
Get per capita emission data for France, Germany and Spain for the year 2024.
66+
Results should include full country name, country code, total emissions, population and per capita emissions.
67+
"""
6768
)
68-
69-
println(output)
69+
println("Result = $output")
7070
}
7171

7272

0 commit comments

Comments
 (0)