Skip to content

Conversation

@treblereel
Copy link
Collaborator

…or LC4J

#836 Implement beforeAgentInvocation and afterAgentInvocation for LC4J 1.6.0

…rAgentInvocation for LC4J

Signed-off-by: Dmitrii Tikhomirov <[email protected]>
@treblereel treblereel requested a review from fjtirado as a code owner November 19, 2025 01:13
@treblereel treblereel self-assigned this Nov 19, 2025
@treblereel treblereel added the java Pull requests that update java code label Nov 19, 2025
@treblereel treblereel added this to the 7.4.0 milestone Nov 19, 2025
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

Thanks, @treblereel but we also must adapt our implementation:

https://github.com/serverlessworkflow/sdk-java/blob/main/experimental/fluent/agentic-langchain4j/src/main/java/io/serverlessworkflow/fluent/agentic/langchain4j/ConditionalAgentServiceImpl.java#L53

It should be part of this PR. Basically, the missing before|afterAgentInvocation methods in our LC4J impl.

private final AtomicReference<Consumer<AgenticScope>> beforeAgentInvocation =
new AtomicReference<>();
private final AtomicReference<Consumer<AgenticScope>> afterAgentInvocation =
new AtomicReference<>();
Copy link
Member

Choose a reason for hiding this comment

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

Why atomic? Is there a concurrency for changing these builders somewhere?

@ricardozanini ricardozanini removed this from the 7.4.0 milestone Nov 20, 2025
@treblereel
Copy link
Collaborator Author

Thanks, @treblereel but we also must adapt our implementation:

https://github.com/serverlessworkflow/sdk-java/blob/main/experimental/fluent/agentic-langchain4j/src/main/java/io/serverlessworkflow/fluent/agentic/langchain4j/ConditionalAgentServiceImpl.java#L53

It should be part of this PR. Basically, the missing before|afterAgentInvocation methods in our LC4J impl.

this one is tough ...

@ricardozanini
Copy link
Member

Thanks, @treblereel but we also must adapt our implementation:
https://github.com/serverlessworkflow/sdk-java/blob/main/experimental/fluent/agentic-langchain4j/src/main/java/io/serverlessworkflow/fluent/agentic/langchain4j/ConditionalAgentServiceImpl.java#L53
It should be part of this PR. Basically, the missing before|afterAgentInvocation methods in our LC4J impl.

this one is tough ...

I know! That was the real reason why I opened the issue. 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants