Add embabel module: GOAP planning from types, conditions, cost-based choice and a plain Spring AI comparison, each with a captured transcript

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G8ikz8xdWuTP5yun8DZ1hk
This commit is contained in:
Claude
2026-10-11 08:15:46 +00:00
commit ec1b076e9b
20 changed files with 601 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
ResearchAgent, input Topic("virtual threads"), planner GOAP.
Planner: AStarGoapPlanner
Status: COMPLETED
Actions in the order they ran:
com.ankurm.agents.embabel.ResearchAgent.findSources
com.ankurm.agents.embabel.ResearchAgent.summarise
com.ankurm.agents.embabel.ResearchAgent.writeBrief
Objects on the blackboard at the end:
Topic[text=virtual threads]
Sources[items=[JEP 444 makes virtual threads final in Java 21., Virtual threads are cheap to block, so thread-per-request scales again.]]
Summary[text=Virtual threads make blocking cheap.]
Brief[text=Virtual threads: blocking is cheap again.]
Prompts the LLM received (2):
Summarise these notes in one sentence: JEP 444 makes virtual threads final in Java 21. Virtual threads are cheap to block, so thread-per-request scales again.
Write a two-line brief titled 'virtual threads' from: Virtual threads make blocking cheap.
+9
View File
@@ -0,0 +1,9 @@
Same agent, but the caller also hands over a Sources object.
Actions in the order they ran:
com.ankurm.agents.embabel.ResearchAgent.summarise
com.ankurm.agents.embabel.ResearchAgent.writeBrief
Prompts the LLM received:
Summarise these notes in one sentence: A note we already had.
Write a two-line brief titled 'virtual threads' from: Virtual threads make blocking cheap.
+11
View File
@@ -0,0 +1,11 @@
GuardedResearchAgent: summarise has pre = "hasSources".
Topic "virtual threads": status COMPLETED, actions:
com.ankurm.agents.embabel.GuardedResearchAgent.findSources
com.ankurm.agents.embabel.GuardedResearchAgent.summarise
com.ankurm.agents.embabel.GuardedResearchAgent.writeBrief
LLM prompts: 2
Topic "quantum gravity": status STUCK, actions:
com.ankurm.agents.embabel.GuardedResearchAgent.findSources
LLM prompts: 0
+10
View File
@@ -0,0 +1,10 @@
CostAwareResearchAgent: summariseWithLlm cost 0.9, summariseLocally cost 0.1, both return Summary.
Status: COMPLETED
Actions in the order they ran:
com.ankurm.agents.embabel.CostAwareResearchAgent.findSources
com.ankurm.agents.embabel.CostAwareResearchAgent.summariseLocally
com.ankurm.agents.embabel.CostAwareResearchAgent.writeBrief
Prompts the LLM received (1):
Write a two-line brief titled 'virtual threads' from: JEP 444 makes virtual threads final in Java 21.
+13
View File
@@ -0,0 +1,13 @@
Plain Spring AI (ChatClient, order written by hand):
result: Brief[text=Virtual threads: blocking is cheap again.]
prompts:
Summarise these notes in one sentence: JEP 444 makes virtual threads final in Java 21. Virtual threads are cheap to block, so thread-per-request scales again.
Write a two-line brief titled 'virtual threads' from: Virtual threads make blocking cheap.
Embabel:
result: Brief[text=Virtual threads: blocking is cheap again.]
prompts:
Summarise these notes in one sentence: JEP 444 makes virtual threads final in Java 21. Virtual threads are cheap to block, so thread-per-request scales again.
Write a two-line brief titled 'virtual threads' from: Virtual threads make blocking cheap.
Same prompts: true
+4
View File
@@ -0,0 +1,4 @@
ForgetfulGuardedAgent: identical to GuardedResearchAgent except findSources has no post = "hasSources".
Topic "virtual threads" (a topic that has sources): status STUCK, actions run: 0
LLM prompts: 0
+13
View File
@@ -0,0 +1,13 @@
mvn dependency:tree for the embabel module, filtered to embabel, spring-ai, spring-boot and kotlin-stdlib:
com.ankurm.agents:embabel:jar:1.0.0
com.embabel.agent:embabel-agent-api:jar:1.5.3:compile
com.embabel.agent:embabel-agent-ai:jar:1.5.3:compile
com.embabel.common:embabel-common-core:jar:2.0.4:compile
com.embabel.common:embabel-common-util:jar:2.0.4:compile
ch.qos.logback:logback-classic:jar:1.5.38:compile
com.embabel.common:embabel-common-textio:jar:2.0.4:compile
org.jetbrains.kotlin:kotlin-stdlib:jar:2.2.21:compile
org.springframework.boot:spring-boot:jar:4.1.1:compile
org.springframework.ai:spring-ai-client-chat:jar:2.0.1:compile
org.springframework.ai:spring-ai-model:jar:2.0.1:compile
org.springframework.ai:spring-ai-commons:jar:2.0.1:compile