Skip to content

Configure exit policy of AgentValidationManager using a property - #1801

Merged
igordayen merged 16 commits into
embabel:mainfrom
deleSerna:ghissue-1796
Aug 27, 2026
Merged

igordayen merged 16 commits into
embabel:mainfrom
deleSerna:ghissue-1796

Conversation

@deleSerna

@deleSerna deleSerna commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Issue - #1796

Context - Currently, we are not consistently handling whenever an Agent is failing to adhere to a valid structure ( annotated properly, parameters and return type as expected etc..). In some cases, we are skipping such agent and in some cases, we are just logging a message.

Solution

  • Configure exit policy of such invalid cases by a property. By default, it just logs.
  • Add a new check to handle a method with AchieveGoal annotation but without an Action annotation
  • Test added for both failure cases and a successful case.

@alexheifetz

Copy link
Copy Markdown
Contributor

@deleSerna please confirm this PR is for Embabel 1.5.0 release vs 1.0.1
I will create labels rel-1.5.0 and rel-1.0.x for clarity

@igordayen igordayen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deleSerna - thank you for your contribution, left few comments. Also: how does this check correlate with generic Agent validation method. thanks

@igordayen igordayen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deleSerna - could you please consider aligning with:
src/main/kotlin/com/embabel/agent/spi/validation
thanks
@azanux - FYI

@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna - build failed; expected failure?

[ERROR] com.embabel.agent.api.annotation.support.VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected -- Time elapsed: 0.007 s <<< FAILURE!
org.opentest4j.AssertionFailedError: No goal should be created for an @AchievesGoal method returning void: [Goal(name=com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, description=Consume a frog, pre=[hasRun_com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, it:com.embabel.agent.api.dsl.Frog, it:void], inputs=[IoBinding(value=it:void)], outputType=JvmType(className=void), value=com.embabel.agent.api.annotation.support.AgentMetadataReader$$Lambda/0x00007f84a87b4620@71fdc611, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[])), Goal(name=Nirvana, description=Nirvana: Nothing more to do, pre=[__unobtanium__], inputs=[], outputType=null, value=com.embabel.agent.core.Goal$$Lambda/0x00007f84a8a57b80@187da86e, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[]))] ==> expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
	at com.embabel.agent.api.annotation.support.VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected(VoidAchievesGoalJavaTest.java:37)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR] com.embabel.agent.api.annotation.support.VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected
[ERROR]   Run 1: VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected:37 No goal should be created for an @AchievesGoal method returning void: [Goal(name=com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, description=Consume a frog, pre=[hasRun_com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, it:com.embabel.agent.api.dsl.Frog, it:void], inputs=[IoBinding(value=it:void)], outputType=JvmType(className=void), value=com.embabel.agent.api.annotation.support.AgentMetadataReader$$Lambda/0x00007f84a87b4620@4652404f, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[])), Goal(name=Nirvana, description=Nirvana: Nothing more to do, pre=[__unobtanium__], inputs=[], outputType=null, value=com.embabel.agent.core.Goal$$Lambda/0x00007f84a8a57b80@187da86e, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[]))] ==> expected: <true> but was: <false>
[ERROR]   Run 2: VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected:37 No goal should be created for an @AchievesGoal method returning void: [Goal(name=com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, description=Consume a frog, pre=[hasRun_com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, it:com.embabel.agent.api.dsl.Frog, it:void], inputs=[IoBinding(value=it:void)], outputType=JvmType(className=void), value=com.embabel.agent.api.annotation.support.AgentMetadataReader$$Lambda/0x00007f84a87b4620@71fdc611, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[])), Goal(name=Nirvana, description=Nirvana: Nothing more to do, pre=[__unobtanium__], inputs=[], outputType=null, value=com.embabel.agent.core.Goal$$Lambda/0x00007f84a8a57b80@187da86e, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[]))] ==> expected: <true> but was: <false>
[INFO] 
[INFO] 
[ERROR] Tests run: 3924, Failures: 1, Errors: 0, Skipped: 23
[INFO] 

@deleSerna

Copy link
Copy Markdown
Contributor Author

please confirm this PR is for Embabel 1.5.0 release vs 1.0.1
@alexheifetz It should be for both. I have created the PR based on main. Could you let me know the exact process I should follow here ?

@deleSerna

Copy link
Copy Markdown
Contributor Author

could you please consider aligning with:
src/main/kotlin/com/embabel/agent/spi/validation

@igordayen Could you clarify what do you meant by this? Move the check to DefaultAgentStructureValidator and get called as part of agentValidationManager.validate?

@igordayen

Copy link
Copy Markdown
Contributor

please confirm this PR is for Embabel 1.5.0 release vs 1.0.1
@alexheifetz It should be for both. I have created the PR based on main. Could you let me know the exact process I should follow here ?

https://github.com/embabel/embabel-agent/wiki/Working-with-Multiple-Releases

@deleSerna

Copy link
Copy Markdown
Contributor Author

build failed; expected failure?

I will check. Since both tests around the same criteria, may be VoidAchievesGoalJavaTest need an update . I will check it tomorrow.

@deleSerna

Copy link
Copy Markdown
Contributor Author

bug on 1.0.x - to be committed into main too

@igordayen In my case, should I just need to target to 1.0.x and would whoever merging the PR will take care of committing that to 1.5.0 and main?
Btw, why the branch name is 1.5.0, looks like a sudden jump from 1.0.x. ?

@igordayen

Copy link
Copy Markdown
Contributor

bug on 1.0.x - to be committed into main too

@igordayen In my case, should I just need to target to 1.0.x and would whoever merging the PR will take care of committing that to 1.5.0 and main? Btw, why the branch name is 1.5.0, looks like a sudden jump from 1.0.x. ?

@deleSerna it us actually developer responsibility to commit to both branches, if required. 1.5.0 - is actually "main" branch, thanks

@igordayen

Copy link
Copy Markdown
Contributor

could you please consider aligning with:
src/main/kotlin/com/embabel/agent/spi/validation

@igordayen Could you clarify what do you meant by this? Move the check to DefaultAgentStructureValidator and get called as part of agentValidationManager.validate?

Yes, ideally validation to be aligned with existing package structure and good reason why it can not be incorporated into agent structure validation. Thank you.

@deleSerna

Copy link
Copy Markdown
Contributor Author

@deleSerna - build failed; expected failure?

[ERROR] com.embabel.agent.api.annotation.support.VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected -- Time elapsed: 0.007 s <<< FAILURE!
org.opentest4j.AssertionFailedError: No goal should be created for an @AchievesGoal method returning void: [Goal(name=com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, description=Consume a frog, pre=[hasRun_com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, it:com.embabel.agent.api.dsl.Frog, it:void], inputs=[IoBinding(value=it:void)], outputType=JvmType(className=void), value=com.embabel.agent.api.annotation.support.AgentMetadataReader$$Lambda/0x00007f84a87b4620@71fdc611, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[])), Goal(name=Nirvana, description=Nirvana: Nothing more to do, pre=[__unobtanium__], inputs=[], outputType=null, value=com.embabel.agent.core.Goal$$Lambda/0x00007f84a8a57b80@187da86e, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[]))] ==> expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
	at com.embabel.agent.api.annotation.support.VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected(VoidAchievesGoalJavaTest.java:37)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR] com.embabel.agent.api.annotation.support.VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected
[ERROR]   Run 1: VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected:37 No goal should be created for an @AchievesGoal method returning void: [Goal(name=com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, description=Consume a frog, pre=[hasRun_com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, it:com.embabel.agent.api.dsl.Frog, it:void], inputs=[IoBinding(value=it:void)], outputType=JvmType(className=void), value=com.embabel.agent.api.annotation.support.AgentMetadataReader$$Lambda/0x00007f84a87b4620@4652404f, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[])), Goal(name=Nirvana, description=Nirvana: Nothing more to do, pre=[__unobtanium__], inputs=[], outputType=null, value=com.embabel.agent.core.Goal$$Lambda/0x00007f84a8a57b80@187da86e, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[]))] ==> expected: <true> but was: <false>
[ERROR]   Run 2: VoidAchievesGoalJavaTest.voidActionWithAchievesGoalIsRejected:37 No goal should be created for an @AchievesGoal method returning void: [Goal(name=com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, description=Consume a frog, pre=[hasRun_com.embabel.agent.api.annotation.support.VoidGoalAgent.consumeFrog, it:com.embabel.agent.api.dsl.Frog, it:void], inputs=[IoBinding(value=it:void)], outputType=JvmType(className=void), value=com.embabel.agent.api.annotation.support.AgentMetadataReader$$Lambda/0x00007f84a87b4620@71fdc611, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[])), Goal(name=Nirvana, description=Nirvana: Nothing more to do, pre=[__unobtanium__], inputs=[], outputType=null, value=com.embabel.agent.core.Goal$$Lambda/0x00007f84a8a57b80@187da86e, tags=[], examples=[], export=Export(name=null, remote=false, local=true, startingInputTypes=[]))] ==> expected: <true> but was: <false>
[INFO] 
[INFO] 
[ERROR] Tests run: 3924, Failures: 1, Errors: 0, Skipped: 23
[INFO] 

Understood, why it's failed. I have wrongly interpreted that only plan type with PlannerType.needsGoals will only have goal and hence put the check only for those plan types and this particular test was using plan type is utility. That's why it failed.
Obviously, I was wrong here. will fix it.

@deleSerna

Copy link
Copy Markdown
Contributor Author

good reason why it can not be incorporated into agent structure validation.

We don't fail on them at the moment.
IMO, this one should fail as it's a spec violation and therefore should not want to put it there.

On the other hand, IMO, there is no point in a validation failure that would not result in actual failure as people simply won't notice such warnings.

I can create a separate ticket for this and then decide in which branch that should go.
IMO, there are so many adhoc failures in the AgentMetadataReader that could fit in as part of AgentValidationManager but some of the verification is happening too late in AgentMetadataReader IMO. Maybe we have to split that in to two phases like - pre and post verification. But as mentioned above, IMO that should not be part of this PR.
what do you think?

@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna, may I suggest creating an AchievableGoalValidator in a package with existing Agent Validators and employing it?
Thanks

@igordayen igordayen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deleSerna - more comments added. more leaning to configurable policy. complex conditions require proper documentation, i would suggest.
PR is having conflicts too.
Thank you

@deleSerna

Copy link
Copy Markdown
Contributor Author

more leaning to configurable policy
As I mentioned in the other thread, IMO, this is a spec violation and it is fixable within the Agent itself. Therefore, IMO, we should just fail here.
Do you still think exit condition for this violation should still be configurable via policy?

@igordayen

Copy link
Copy Markdown
Contributor

IMO, we should just fail here.
Do you still think exit condition for this violation should still be configurable via policy?

For multi-agent deployment, single-agent failure should not block server bootstrapping, my thinking

@deleSerna

Copy link
Copy Markdown
Contributor Author

For multi-agent deployment, single-agent failure should not block server bootstrapping, my thinking

But there are other validation errors already for which already fail. eg: here . Do you think this violation is different from those ones?

@igordayen

Copy link
Copy Markdown
Contributor

For multi-agent deployment, single-agent failure should not block server bootstrapping, my thinking

But there are other validation errors already for which already fail. eg: here . Do you think this violation is different from those ones?

==> Could you please document the behavior in English, in your own words? Thanks.

Related to goals dup too, looping @tuannx

@deleSerna

Copy link
Copy Markdown
Contributor Author

Could you please document the behavior in English, in your own words? Thanks.
Sorry for not being clear.
I meant that there is precedence of returning null to block server boot strapping when validation of single agent is failing.
For example, here and here.

Therefore, IMO, we could also return null and fail here as this validation error is similar to the cases I mentioned above.
what do you think?

@igordayen

Copy link
Copy Markdown
Contributor

Therefore, IMO, we could also return null and fail here as this validation error is similar to the cases I mentioned above. what do you think?

Please compile full documentation on known agent validators behavior for consistency. Thanks

@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna - please see conflicts. And- what is more important - per analysis, deployments should not be rejected. Thanks

@igordayen

Copy link
Copy Markdown
Contributor

his blocker one, I do not fully understand what AnnotationUtils.findAnnotation

Looking for consistency to use spring API cross the board. Spring APIs are more resilient than standard JDK

@igordayen

Copy link
Copy Markdown
Contributor

a different agent's AchievableGoalValidator instance. Fix: make it a local variable inside the method, not a field.

Make sense but this means, I do not need the extension function. OK with you?

yes, thanks

@deleSerna

Copy link
Copy Markdown
Contributor Author

The isMethodFromSupertype manual traversal (interfaces loop + superclass while-loop) is also reinventing what >AnnotationUtils.findAnnotation already does,

How can AnnotationUtils.findAnnotation be same as isMethodFromSupertype ()? @igordayen I am really not confident about this suggestion from Claude. Therefore, if it's OK I don't apply this suggestions from Claude.

Rest all suggestions are applied , including the replacement of method.isAnnotationPresent by AnnotationUtils.findAnnotation.

@igordayen

Copy link
Copy Markdown
Contributor

DCO
There is one commit incorrectly signed off. This means that the author of this commit failed to include a Signed-off-by line in the commit message.

@igordayen

igordayen commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@deleSerna The current isMethodFromSupertype plus its caller condition is:

agentClass.declaredMethods.contains(method) || isMethodFromSupertype(method, agentClass)

Both halves together mean: "is this method anywhere in the class hierarchy?" That's exactly what ReflectionUtils.findMethod does in one call:

// replaces the entire combined condition
ReflectionUtils.findMethod(agentClass, method.name, *method.parameterTypes) != null

ReflectionUtils.findMethod walks declared methods → superclasses → interfaces, handles bridge methods, and is null-safe. The manual traversal in isMethodFromSupertype also has a gap:
type.interfaces only returns directly implemented interfaces, not transitive ones. ReflectionUtils.findMethod handles the full hierarchy.

So the full replacement for isActionMethod:

fun isActionMethod(
logger: Logger,
method: Method,
agentClass: Class<*>,
requireInterfaceDeserializationAnnotations: Boolean,
): Boolean =
AnnotationUtils.findAnnotation(method, Action::class.java) != null &&
ReflectionUtils.findMethod(agentClass, method.name, *method.parameterTypes) != null &&
(!method.returnType.isInterface || !requireInterfaceDeserializationAnnotations ||
hasRequiredJsonDeserializeAnnotationOnInterfaceReturnType(method, logger))

And isConditionMethod:

fun isConditionMethod(method: Method, agentClass: Class<*>): Boolean =
AnnotationUtils.findAnnotation(method, Condition::class.java) != null &&
ReflectionUtils.findMethod(agentClass, method.name, *method.parameterTypes) != null

isMethodFromSupertype, methodSignaturesMatch, and the ClassUtils.getMethodIfAvailable call inside it all disappear. Two helper functions → one Spring call each, with better coverage.

@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna - one more comment (from me, not from Caude:):

in number of places:

if (skipAgentDeploymentOnError)
  retrun null

can we have it nicer and have private method:

returnOnAgentDeploymentErrorIfNecessary

Thanks for consideration

Signed-off-by: deleSerna <nadeeshtv@gmail.com>
Signed-off-by: deleSerna <nadeeshtv@gmail.com>
@deleSerna

Copy link
Copy Markdown
Contributor Author

returnOnAgentDeploymentErrorIfNecessary

Moving that to function still would not simplify it right as I could not do return returnOnAgentDeploymentErrorIfNecessary as it will exit 🤔 ?
Rest is handled.

@igordayen

Copy link
Copy Markdown
Contributor

returnOnAgentDeploymentErrorIfNecessary

Moving that to function still would not simplify it right as I could not do return returnOnAgentDeploymentErrorIfNecessary as it will exit 🤔 ? Rest is handled.

@deleSerna You are right; thanks for correcting me (too late:)

@igordayen igordayen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deleSerna - getting closer, thanks. besides unit tests, are you able to test on live agents?

Signed-off-by: deleSerna <nadeeshtv@gmail.com>
@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna - did you have a chance to test behavior on live agents? thank you

@igordayen igordayen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deleSerna getting very close!

const val NO_ACTIONS_TO_GOALS = "NO_ACTIONS_TO_GOALS"

/** Action annotation is missing on the method. */
const val MISSING_ACTION_ANNOTATION = "MISSING_ACTION_ANNOTATION"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

makes sense to document it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could you please clarify which documentation is missing? MISSING_ACTION_ANNOTATION is already documented.

Signed-off-by: deleSerna <nadeeshtv@gmail.com>
@deleSerna

Copy link
Copy Markdown
Contributor Author

did you have a chance to test behavior on live agents?

Verifying it. Will update here.

Signed-off-by: deleSerna <nadeeshtv@gmail.com>
@deleSerna

Copy link
Copy Markdown
Contributor Author

did you have a chance to test behavior on live agents?

Yes, tested on agent with the following method for both cases - embabel.agent.api.validation.manager.skip-agent-deployment-on-error=false and embabel.agent.api.validation.manager.skip-agent-deployment-on-error=true. It behaved as expected.
@igordayen Therefore, all good.

  // @Action(description = "Verify whether the given dish fits the agent criteria")
  @AchievesGoal(description = "A reviewed vegetarian dish")
  public Dish verifyTheDish(Dish input, Ai ai) {
    Dish dish =
        ai.withDefaultLlm()
            .creating(Dish.class)
            .fromPrompt(
                """
               Review the given dish name %s and verify whether the ingredient of it are vegetarian. If yes then return the same otherwise null
               """
                    .formatted(input.name()));
    return dish;
  }

Case - Default (embabel.agent.api.validation.manager.skip-agent-deployment-on-error=false)
Expected - Validation messages are logged but agent is not rejected.
Actual - Met expectation

10:06:46.416 [main] ERROR DefaultAgentValidationManager - - MISSING_GOALS: Agent 'DishSuggester' must have at least one goal defined
10:06:46.416 [main] ERROR DefaultAgentValidationManager - - MISSING_ACTION_ANNOTATION: @Action annotation is missing on the method 'com.agent101.DishSuggester.verifyTheDish' annotated with @AchievesGoal.
10:06:46.416 [main] WARN  AgentMetadataReader - Agent validation failed:
ValidationError(code=MISSING_GOALS, message=Agent 'DishSuggester' must have at least one goal defined, severity=ERROR, location=ValidationLocation(type=Agent, name=DishSuggester, agentName=DishSuggester, component=DishSuggester))
ValidationError(code=MISSING_ACTION_ANNOTATION, message=@Action annotation is missing on the method 'com.agent101.DishSuggester.verifyTheDish' annotated with @AchievesGoal., severity=ERROR, location=ValidationLocation(type=Agent, name=com.agent101.DishSuggester, agentName=DishSuggester, component=verifyTheDish))

Case embabel.agent.api.validation.manager.skip-agent-deployment-on-error=true
Expected - Validation messages are logged and agent is rejected.
Actual - Met expectation ( validation messages, I just cut off but it was actually present)

{"name":"MaxActionsEarlyTerminationPolicy"}},"prune":false,"ephemeral":false,"listeners":[],"outputChannel":{},"plannerType":"GOAP","toolCallContext":{"isEmpty":true},"contextIdString":null}
20:49:32.550 [main] INFO  Embabel - Executing in closed mode: Trying to find appropriate agent
20:49:32.550 [main] INFO  Embabel - Choosing Agent based on UserInput(content=I have tomato and chicken  and onion left on my fridge. what dish do you suggest, timestamp=2026-08-27T18:49:32.550309Z)
20:49:32.551 [main] INFO  Embabel - Failed to choose Agent based on UserInput(content=I have tomato and chicken  and onion left on my fridge. what dish do you suggest, timestamp=2026-08-27T18:49:32.550309Z).
  Choices:
  .
  Confidence cutoff: 0.6
I'm sorry. I don't know how to do that.
  

@igordayen igordayen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deleSerna - long journey:) all good now, thank you for contributing!

@igordayen
igordayen merged commit 3145a0f into embabel:main Aug 27, 2026
7 checks passed
@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna - sorry to disturb.

i discovered that log gets severely polluted:

2:37:14.736 [main] INFO  Embabel - Deployed agent com.embabel.agent.test.type.ValidActionWithDeserializationInInterfaceGoal
	description: com.embabel.agent.test.type.ValidActionWithDeserializationInInterfaceGoal
22:37:14.736 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.autoconfigure.platform.AgentPlatformAutoConfiguration
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.autoconfigure.platform.ScanConfiguration
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.config.models.openai.OpenAiModerationClient
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.config.models.openai.OpenAiGuardRail
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.openai.OpenAiModerationModel
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.config.models.openai.SpringAiModerationClient
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.config.models.openai.SpringAiGuardRail
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.logging.DefaultColorPalette
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$AutonomyConfig
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$LlmOperationsConfig
22:37:14.737 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$ModelsConfig
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$ProcessIdGenerationConfig
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$RestConfig
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$SseConfig
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.agent.spi.config.spring.AgentPlatformProperties$TestConfig
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on com.embabel.common.core.config.CommonPlatformPropertiesLoader
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.mcp.client.common.autoconfigure.McpClientAutoConfiguration$CloseableMcpSyncClients
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.mcp.client.common.autoconfigure.McpToolCallbackAutoConfiguration
22:37:14.738 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.mcp.DefaultMcpToolNamePrefixGenerator
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.mcp.SyncMcpToolCallbackProvider
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.mcp.client.common.autoconfigure.annotations.McpClientAnnotationScannerAutoConfiguration$ClientAnnotatedBeanFactoryInitializationAotProcessor
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.mcp.client.common.autoconfigure.annotations.McpClientAnnotationScannerProperties
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.client.autoconfigure.ChatClientAutoConfiguration$TracerNotPresentObservationConfiguration
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.client.autoconfigure.ChatClientAutoConfiguration
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.client.autoconfigure.ChatClientBuilderConfigurer
22:37:14.739 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.client.autoconfigure.ChatClientBuilderProperties
22:37:14.740 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.observation.autoconfigure.ChatObservationAutoConfiguration$TracerNotPresentObservationConfiguration
22:37:14.740 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.observation.autoconfigure.ChatObservationAutoConfiguration
22:37:14.740 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.ai.model.chat.observation.autoconfigure.ChatObservationProperties
22:37:14.740 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.aop.AopAutoConfiguration$ClassProxyingConfiguration
22:37:14.740 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
22:37:14.740 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.availability.ApplicationAvailabilityBean
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.context.LifecycleProperties
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.context.support.DefaultLifecycleProcessor
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.info.ProjectInfoProperties
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.info.GitProperties
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.ssl.SslProperties
22:37:14.741 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.ssl.FileWatcher
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.ssl.SslPropertiesBundleRegistrar
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.ssl.DefaultSslBundleRegistry
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskExecutorConfigurations$TaskExecutorContextPropagationConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskExecutorConfigurations$SimpleAsyncTaskExecutorBuilderConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.task.SimpleAsyncTaskExecutorBuilder
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskExecutorConfigurations$AsyncConfigurerConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskExecutorConfigurations$ApplicationTaskExecutorAsyncConfigurer
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskExecutorConfigurations$BootstrapExecutorConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskSchedulingConfigurations$ThreadPoolTaskSchedulerBuilderConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskSchedulingProperties
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.task.ThreadPoolTaskSchedulerBuilder
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskSchedulingConfigurations$SimpleAsyncTaskSchedulerBuilderConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.task.SimpleAsyncTaskSchedulerBuilder
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration
22:37:14.742 [main] WARN  AgentMetadataReader - No @EmbabelComponent or @Agent annotation found on org.springframework.boot.test

Could you please address this ASAP, thank you

looping @alexheifetz

@deleSerna

Copy link
Copy Markdown
Contributor Author

i discovered that log gets severely polluted:
ah, that looks bad.
Could you let me know which test I need to run to reproduce that?

Do you already have a proposal to fix that as it does not looks like duplicate but happening for multiple components?
I will look into that later today.

@igordayen

Copy link
Copy Markdown
Contributor

@deleSerna im currently offline, on mobile. Can't check right now, sorry.
I sent a while back connection request over discord. Thanks

@igordayen

igordayen commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@deleSerna - please execute any Ollama test:

embabel-agent/embabel-agent-autoconfigure/models/embabel-agent-ollama-autoconfigure/src/test/java/com/embabel/agent/config/models/ollama/LLMOllamaThinkingIT.java

Could you please address this as soon as possible, as we are delaying the release 1.5.2.

The BeanPostProcessor calls createAgentMetadata() on every Spring bean. The WARN at line 151 fires for all of them, including Spring Boot's own infrastructure. The fix: downgrade to DEBUG for non-agentic beans. It's expected and normal for a BeanPostProcessor to encounter non-Embabel beans; that's not a warning situation.

Proposed change in AgentMetadataReader.kt line 151:

// BEFORE
logger.warn(
"No @{} or @{} annotation found on {}",
...
)

// AFTER
logger.debug(
"No @{} or @{} annotation found on {}",
...
)

or remove it at all.

Looping in @alexheifetz @tuannx @arnabnandy7 for awareness of the impact of minor changes in logging on developer experience.

Thanks

@deleSerna

Copy link
Copy Markdown
Contributor Author

@igordayen Addressing it in PR #2016

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.

4 participants