AI
The Camel AI components are a group of components for applying Apache Camel to various AI-related technologies.
Getting started with LLMs
New to Camel AI? Start with the LLM Integration Guide — it explains when to use OpenAI vs LangChain4j Chat, structured JSON extraction, streaming to browsers, dynamic prompts, and prompt management patterns.
Choosing the Right AI Component
Camel offers two main paths for integrating Large Language Models (LLMs) into routes:
-
OpenAI — talks directly to OpenAI and any OpenAI-compatible API (OpenRouter, Ollama, vLLM, LM Studio). Native support for streaming, structured output (
outputClass/jsonSchema), MCP tool calling, conversation memory, and the Responses API. Best when you are committed to the OpenAI ecosystem or using an OpenAI-compatible gateway. -
LangChain4j Chat — abstracts through LangChain4j so you can switch LLM providers (OpenAI, Anthropic, Google Gemini, Mistral, Ollama, and others) by swapping a dependency. Also provides prompt templates with variables, RAG integration via the Content Enricher pattern, and multi-message conversation history.
| Need | camel-openai | camel-langchain4j-chat |
|---|---|---|
OpenAI or compatible API (OpenRouter, Ollama, vLLM) | Yes | Via LangChain4j provider |
Switch providers without code changes | No (OpenAI-compatible only) | Yes |
MCP tool calling / agentic loops | Yes | No (use langchain4j-tools instead) |
Streaming responses | Yes | Manual (via |
Structured output (JSON schema) | Yes ( | No |
Prompt templates with variables | No (use Simple expressions) | Yes (built-in `{{variable}}` syntax) |
RAG pipelines | Manual | Yes (with |
Embeddings | Yes |
If you already use an OpenAI-compatible API and want the richest feature set (streaming, MCP, structured output), start with camel-openai. If multi-provider flexibility is a hard requirement, use camel-langchain4j-chat. Both can coexist in the same project. For end-to-end pipeline examples, see the LLM Integration Guide. |
AI components
See the following for usage of each component:
- A2A
-
A2A endpoint for agent-to-agent communication.
- AI Tool
-
Framework-agnostic consumer endpoint that registers a Camel route as an LLM tool in the shared AiToolRegistry.
- ChatScript
-
Chat with a ChatScript Server.
- Deep Java Library
-
Infer Deep Learning models from message exchanges data using Deep Java Library (DJL).
- Docling
-
Process documents using Docling library for parsing and conversion.
- KServe
-
Provide access to AI model servers with the KServe standard to run inference with remote models
- LangChain4j Agent
-
LangChain4j Agent component
- LangChain4j Chat
-
LangChain4j Chat component
- LangChain4j Embedding Store
-
Perform operations on the LangChain4jEmbeddingStores.
- LangChain4j Embeddings
-
LangChain4j Embeddings
- LangChain4j Tools
-
LangChain4j Tools and Function Calling Features
- LangChain4j Web Search
-
LangChain4j Web Search Engine
- LLM Integration Guide
- Milvus
-
Perform operations on the Milvus Vector Database.
- Neo4j
-
Perform operations on the Neo4j Graph Database
- OpenAI
-
OpenAI endpoint for chat completion, Responses API, embeddings, audio transcription, audio translation, and text-to-speech.
- PGVector
-
Perform operations on the PostgreSQL pgvector Vector Database.
- Pinecone
-
Perform operations on the Pinecone Vector Database.
- Qdrant
-
Perform operations on the Qdrant Vector Database.
- Spring AI Chat
-
Perform chat operations using Spring AI.
- Spring AI Embeddings
-
Spring AI Embeddings
- Spring AI Image
-
Spring AI Image Generation
- Spring AI Vector Store
-
Spring AI Vector Store
- TensorFlow Serving
-
Provide access to TensorFlow Serving model servers to run inference with TensorFlow saved models remotely
- weaviate
-
Perform operations on the Weaviate Vector Database.