Skip to content

refactor(agents)!: move goap and llm-based planners to a new module#1997

Merged
antoniibelyshev merged 7 commits into
developfrom
belyshev/move-planners-to-separate-module
May 14, 2026
Merged

refactor(agents)!: move goap and llm-based planners to a new module#1997
antoniibelyshev merged 7 commits into
developfrom
belyshev/move-planners-to-separate-module

Conversation

@antoniibelyshev
Copy link
Copy Markdown
Collaborator

@antoniibelyshev antoniibelyshev commented May 12, 2026

Created agents:agents:planners module, moved GOAPPlanner and SimpleLLMPlanner to the new module. Also made adjustments to the planners structure:

  • moved initializeState and provideOutput from AIAgentPlannerStrategy to AIAgentPlanner
  • removed AIAgentPlannerStrategyBuilder in favor of `AIAgentPlannerStrategy.create(name, planner) since none other configurable parameters are available.
  • removed PlannerAIAgent.builder() in favor of configuring planner agents using AIAgent.builder().plannerStrategy(...)...

BREAKING:

  • Usage of GOAP planner and LLM-based planner now requires an additional dependency: agents:agents-planner
  • AIAgentPlanner and JavaAIAgentPlanner abstract classes now have two additional abstract methods: initializeState and provideOutput.
  • AIAgentPlannerStrategy now does not accept initializeState and provideOutput as parameters to the constructor: AIAgentPlannerStrategy(name, planner), plus a convenience method AIAgentPlannerStrategy.create(name, planner) for java. AIAgentPlannerStrategy.builder() and AIAgentPlannerStrategy.goap() are now removed.

@antoniibelyshev antoniibelyshev force-pushed the belyshev/move-planners-to-separate-module branch from 3442bf8 to f1d1ca0 Compare May 12, 2026 14:25
Copy link
Copy Markdown
Collaborator

@Amaneusz Amaneusz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a solid piece of work 💪

I see two things that block the merge as of this moment:

  • Failing build :agents:agents-features:agents-features-acp:checkSplitPackages - I haven't looked into it yet tbh
  • Referencing non existing JavaTypedAIAgentPlanner type in examples

Besides that:

  • I added few minor comments, none of them is blocking
  • I would edit BREAKING section in PR description:
    • Existing imports of ai.koog.agents.planner.goap.* and ai.koog.agents.planner.llm.* now
      require a new agents-planner module dependency
    • number of generics needed by AIAgentPlanner (and Java...) increased from 2 to 4 - migth be worth mentioning here if someone had their custom strategy
    • AIAgentPlannerStrategy constructor changed - it's a public class, worth noting
    • removal of AIAgentPlannerStrategy methods: builder(name) and goap(...), also top level AIAgentPlannerStrategy(...) factory function and PlannerAIAgent.builder()

Comment thread agents/agents-planner/src/commonMain/kotlin/ai/koog/agents/planner/Planners.kt Outdated
Comment thread agents/agents-planner/build.gradle.kts Outdated
@antoniibelyshev antoniibelyshev force-pushed the belyshev/move-planners-to-separate-module branch 2 times, most recently from 14a22d3 to 2b20f55 Compare May 13, 2026 12:42
@antoniibelyshev antoniibelyshev force-pushed the belyshev/move-planners-to-separate-module branch from 2b20f55 to 4a933a0 Compare May 13, 2026 13:43
@antoniibelyshev antoniibelyshev force-pushed the belyshev/move-planners-to-separate-module branch from bbfff6e to 04e51bc Compare May 13, 2026 18:29
Copy link
Copy Markdown
Collaborator

@Amaneusz Amaneusz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

As discussed on call:

  • no-arg constructors for AIAgentPlanner and JavAIAgentPlanner silenty disable users from serialization-based features (ie persistence) - a KDoc might be valuable, otherwise we accept the risk that we think is negligible
  • examples for sping-ai will become stale as they reference an old version of AIAgentPlanner that accepts 2 generics instead of 4 - we are fine with this as examples refer strictly to 0.8 version and might be upgraded later on if necessary

@antoniibelyshev antoniibelyshev merged commit 1528e8d into develop May 14, 2026
21 of 22 checks passed
@antoniibelyshev antoniibelyshev deleted the belyshev/move-planners-to-separate-module branch May 14, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants