Skip to content

Add blog post about Agentic RAG with Apache Camel and LangChain4j - #1828

Merged
davsclaus merged 3 commits into
apache:mainfrom
akashSurwase:blog-agentic-rag
Oct 23, 2026
Merged

davsclaus merged 3 commits into
apache:mainfrom
akashSurwase:blog-agentic-rag

Conversation

@akashSurwase

Copy link
Copy Markdown
Contributor

This pull request adds a blog post introducing an Agentic RAG application built with Apache Camel and LangChain4j.

The article explores how the application combines:

  • Apache Camel for integration
  • LangChain4j for AI agent capabilities
  • Qwen running locally through Ollama
  • Milvus for historical incident retrieval
  • Tavily for web search

The post will include implementation details and code examples from the project.

@davsclaus davsclaus 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.

TL;DR

Request changes: thanks for the post, @akashSurwase! It's a clear walkthrough of how ai-tool, langchain4j-agent, langchain4j-embeddings and milvus fit together, and I checked the Camel code shown against Camel 4.22: the Milvus actions and the AgentConfiguration methods are correct, and the only URI problem is the parameter.*.type syntax noted inline. The post isn't ready to publish yet, though.

Blockers

  • index.md:511, 531, 596, 611, 627, 645, 663: TODO placeholders. The search-tool route, the Tavily route, the agent REST route, an example request/response and the Milvus/Tavily config are still missing.
  • index.md:4: draft: true, so the post is not published.
  • Length: please cut the post to about half its length (it is ~5,000 words now, roughly 4x a typical post here) and focus on the Camel part. See "Length and focus" below.

Other findings: 5 non-blocking, plus 1 note about the linked example repo (details below).

Length and focus

The most interesting part of the post is the Camel side: the two ai-tool routes, how tags connect them to the langchain4j-agent endpoint, and the result. Right now that part competes with a lot of setup for other systems. Could you cut the post to about half its current length and center it on the Camel routes? Some ideas:

  • Model and Milvus setup (section 1, and in section 2 creating the collection, the index, loading it and the verification query): keep a short paragraph that says what is needed, and move the details into your camel-agentic-rag README, which the post already links to.
  • Repeated points: "same embedding model, same vector space" appears four times, the 768 dimension three times, and the AgentConfiguration is shown in both section 1 and section 4. Explaining each once is enough.
  • Line-by-line bullets that restate what the code already says clearly (for example setHeader / constant(MilvusAction.INSERT)) can mostly go.
  • The "Why This Component-Based Design Helps" and Conclusion sections cover much the same ground and could be combined.

That way the Camel-specific parts, which few other places on the web cover yet, stand out, and the TODO sections can be filled in without the post growing even longer.

Notes not tied to a line

  • featured.jpg (non-blocking): this file is actually a PNG (1672x941, 1.8 MB) with a .jpg extension. Hugo still resizes it for the post page (I checked with Hugo 0.121), but the og:image meta tag points to the original, so social previews download a 1.8 MB PNG served as image/jpeg. Converting it to a real JPEG, or renaming it to featured.png, would fix that.
  • Linked example repo (akashSurwase/camel-agentic-rag): the "Secure Tavily API key configuration" commit seems to have swapped the two values. application.properties now has tavily.api.key=***REMOVED*** and tavily.api.url=${TAVILY_API_KEY}, so TavilySearchToolRoute would toD() the API key as the URL and send a literal ***REMOVED*** bearer token. The tavily_search tool won't work for readers who clone it. Something like tavily.api.url=https://api.tavily.com/search and tavily.api.key=${TAVILY_API_KEY} would fix it.
  • Camel version: ai-tool was added in Camel 4.22 (Preview support level), and the example uses 4.22.0. Readers on older versions will get "no component found". It may help to say which Camel version the post needs, and optionally to link the component pages under /components/next/ (for example https://camel.apache.org/components/next/ai-tool-component.html). That's your call as the author.

This is a rules-and-conventions review. It does not replace specialized AI review tools or static analysis.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
@davsclaus
davsclaus marked this pull request as draft October 22, 2026 19:59
@akashSurwase

Copy link
Copy Markdown
Contributor Author

TL;DR

Request changes: thanks for the post, @akashSurwase! It's a clear walkthrough of how ai-tool, langchain4j-agent, langchain4j-embeddings and milvus fit together, and I checked the Camel code shown against Camel 4.22: the Milvus actions and the AgentConfiguration methods are correct, and the only URI problem is the parameter.*.type syntax noted inline. The post isn't ready to publish yet, though.

Blockers

  • index.md:511, 531, 596, 611, 627, 645, 663: TODO placeholders. The search-tool route, the Tavily route, the agent REST route, an example request/response and the Milvus/Tavily config are still missing.
  • index.md:4: draft: true, so the post is not published.
  • Length: please cut the post to about half its length (it is ~5,000 words now, roughly 4x a typical post here) and focus on the Camel part. See "Length and focus" below.

Other findings: 5 non-blocking, plus 1 note about the linked example repo (details below).

Length and focus

The most interesting part of the post is the Camel side: the two ai-tool routes, how tags connect them to the langchain4j-agent endpoint, and the result. Right now that part competes with a lot of setup for other systems. Could you cut the post to about half its current length and center it on the Camel routes? Some ideas:

  • Model and Milvus setup (section 1, and in section 2 creating the collection, the index, loading it and the verification query): keep a short paragraph that says what is needed, and move the details into your camel-agentic-rag README, which the post already links to.
  • Repeated points: "same embedding model, same vector space" appears four times, the 768 dimension three times, and the AgentConfiguration is shown in both section 1 and section 4. Explaining each once is enough.
  • Line-by-line bullets that restate what the code already says clearly (for example setHeader / constant(MilvusAction.INSERT)) can mostly go.
  • The "Why This Component-Based Design Helps" and Conclusion sections cover much the same ground and could be combined.

That way the Camel-specific parts, which few other places on the web cover yet, stand out, and the TODO sections can be filled in without the post growing even longer.

Notes not tied to a line

  • featured.jpg (non-blocking): this file is actually a PNG (1672x941, 1.8 MB) with a .jpg extension. Hugo still resizes it for the post page (I checked with Hugo 0.121), but the og:image meta tag points to the original, so social previews download a 1.8 MB PNG served as image/jpeg. Converting it to a real JPEG, or renaming it to featured.png, would fix that.
  • Linked example repo (akashSurwase/camel-agentic-rag): the "Secure Tavily API key configuration" commit seems to have swapped the two values. application.properties now has tavily.api.key=***REMOVED*** and tavily.api.url=${TAVILY_API_KEY}, so TavilySearchToolRoute would toD() the API key as the URL and send a literal ***REMOVED*** bearer token. The tavily_search tool won't work for readers who clone it. Something like tavily.api.url=https://api.tavily.com/search and tavily.api.key=${TAVILY_API_KEY} would fix it.
  • Camel version: ai-tool was added in Camel 4.22 (Preview support level), and the example uses 4.22.0. Readers on older versions will get "no component found". It may help to say which Camel version the post needs, and optionally to link the component pages under /components/next/ (for example https://camel.apache.org/components/next/ai-tool-component.html). That's your call as the author.

This is a rules-and-conventions review. It does not replace specialized AI review tools or static analysis.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Thanks for the detailed review and for checking the Camel code. I appreciate the feedback. I'll shorten the post to focus more on the Camel routes, complete the missing sections, and address the configuration and other issues you highlighted. I'll update the existing PR once the changes are ready.

@akashSurwase

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review! I've addressed the remaining comments, replaced the TODOs with the relevant implementation examples, corrected the AI tool parameter syntax and file URI explanation, and updated the article metadata and formatting. I've pushed the changes to the existing PR. Could you please review it again when you have a chance?

@davsclaus davsclaus 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.

TL;DR

Request changes: thanks for the rework, @akashSurwase! Every blocker from the first review is fixed. The TODOs are filled in, draft is false, and the post is about half its previous length, now centered on the two ai-tool routes and how tags connect them to the langchain4j-agent endpoint. It reads much better. One small front matter change is left before it can be merged.

Blockers

  • index.md:6: please change the categories to ["AI", "Usecases"] (one-click suggestion inline).

Other findings: none.

What I checked

  • Camel code against Camel 4.22.0: the parameter.NAME=string / .description / .required syntax, parameters arriving as message headers of the same name, tags on both ai-tool and langchain4j-agent (the agent only discovers tools whose tag it lists), the CamelLangChain4jAgentSystemMessage and CamelLangChain4jEmbeddingsVector header names, and the AgentConfiguration methods withChatModel, withMaxToolCallingRoundTrips and withExecuteToolsConcurrently. They're all correct, and ai-tool is indeed new in 4.22.0.
  • Earlier inline comments: the duplicate H1 is gone, the choice indentation is fixed, the parameter.*.type syntax is corrected, and the file: URI requirement is now explained.
  • Rendering: I built the site with Hugo locally. The post renders with the author avatar, the table, the screenshot and the featured image, and the four /components/next/ links resolve.
  • Example repo: the Tavily properties are fixed (tavily.api.url=https://api.tavily.com/search, tavily.api.key=${TAVILY_API_KEY}).

Once the category is changed, this is ready to merge.


This is a rules-and-conventions review. It does not replace specialized AI review tools or static analysis.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Comment thread content/blog/2026/10/agentic-rag-apache-camel/index.md Outdated
@akashSurwase

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @davsclaus! I’ve changed the categories to ["AI", "Usecases"] as suggested and pushed the update. Please take another look when you have time.

@davsclaus
davsclaus marked this pull request as ready for review October 23, 2026 10:55

@davsclaus davsclaus 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.

TL;DR

Approve: thanks for the quick update, @akashSurwase! The categories are now ["AI", "Usecases"], which was the last open item from the previous review. Nothing else changed since then, so the post is ready to merge.

Blockers: None

Other findings: none.


This is a rules-and-conventions review. It does not replace specialized AI review tools or static analysis.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

@akashSurwase

Copy link
Copy Markdown
Contributor Author

Hi @davsclaus , thanks again for the review and approval! The checks have passed. Is there anything else needed from my side before this can be merged?

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview is available at https://pr-1828--camel.netlify.app

@davsclaus
davsclaus merged commit bd6c9a3 into apache:main Oct 23, 2026
2 checks passed
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