Skip to content

Commit 5607fdd

Browse files
committed
2 parents a61792c + 3be05b9 commit 5607fdd

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,112 @@ layout:
281281
| [/opensolon/solon-idea-plugin](../../../../opensolon/solon-idea-plugin) | Solon Idea ,Plugin code repository |
282282
| [/opensolon/solon-vscode-plugin](../../../../opensolon/solon-vscode-plugin) | Solon VsCode ,Plugin code repository |
283283

284+
## FAQ
285+
286+
### What is Solon AI?
287+
288+
Solon AI is a full-scenario Java AI development framework that deeply integrates LLM large models, RAG knowledge bases, MCP protocol, and Agent collaboration orchestration. It's designed for building production-grade AI applications with Java.
289+
290+
### How does Solon AI differ from Python frameworks like LangChain?
291+
292+
Solon AI is built **specifically for Java developers** with seamless integration into the Java ecosystem:
293+
294+
**Key differences:**
295+
- **Java-native**: Fits perfectly into Solon, SpringBoot, Vert.X, Quarkus ecosystems
296+
- **JDK 8-25 support**: Broad Java version compatibility
297+
- **Multi-model dialects**: Unified interface adapts model differences automatically
298+
- **Graph-driven orchestration**: Transforms Agent reasoning into observable computation flow graphs
299+
300+
### What components does Solon AI provide?
301+
302+
- **ChatModel**: General-purpose LLM call interface with Tool, Skill, ChatSession support
303+
- **Skills**: Dynamic admission and instruction injection
304+
- **RAG**: Full-link support (DocumentLoader, DocumentSplitter, EmbeddingModel, RerankingModel)
305+
- **MCP**: Deep integration with Model Context Protocol (MCP_2025_06_18)
306+
- **Agent**: ReAct introspective reasoning and Team collaboration
307+
- **Ai Flow**: YAML-based flow orchestration (Dify-like low-code experience)
308+
309+
### What LLM providers are supported?
310+
311+
Supported via dialect adaptation:
312+
- OpenAI, Gemini, Claude
313+
- Ollama (local models)
314+
- DeepSeek, Dashscope (Alibaba)
315+
- Custom endpoints
316+
317+
### How do I get started?
318+
319+
Add Maven dependency:
320+
```xml
321+
<dependency>
322+
<groupId>org.noear</groupId>
323+
<artifactId>solon-ai</artifactId>
324+
</dependency>
325+
```
326+
327+
Basic usage:
328+
```java
329+
ChatModel chatModel = ChatModel.of("http://127.0.0.1:11434/api/chat")
330+
.provider("ollama")
331+
.model("qwen2.5:1.5b")
332+
.build();
333+
334+
AssistantMessage result = chatModel.prompt("Hello").call().getMessage();
335+
```
336+
337+
### How do I add tools?
338+
339+
```java
340+
chatModel.prompt("What's the weather?")
341+
.options(op -> op.toolAdd(new WeatherTools()))
342+
.call();
343+
```
344+
345+
### How do I use RAG?
346+
347+
```java
348+
EmbeddingModel embeddingModel = EmbeddingModel.of(apiUrl)
349+
.apiKey(apiKey).provider(provider).model(model).build();
350+
351+
InMemoryRepository repository = new InMemoryRepository(embeddingModel);
352+
repository.insert(new PdfLoader(pdfUri).load());
353+
354+
List<Document> docs = repository.search(query);
355+
ChatMessage message = ChatMessage.ofUserAugment(query, docs);
356+
chatModel.prompt(message).call();
357+
```
358+
359+
### What is MCP integration?
360+
361+
Solon AI provides both MCP server and client:
362+
363+
**Server:**
364+
```java
365+
@McpServerEndpoint(channel = McpChannel.STREAMABLE, mcpEndpoint = "/mcp")
366+
public class MyMcpServer {
367+
@ToolMapping(description = "Checking the weather")
368+
public String getWeather(@Param(description = "city") String location) {
369+
return "It's sunny, 25 degrees";
370+
}
371+
}
372+
```
373+
374+
**Client:**
375+
```java
376+
McpClientProvider client = McpClientProvider.builder()
377+
.channel(McpChannel.STREAMABLE)
378+
.url("http://localhost:8080/mcp")
379+
.build();
380+
```
381+
382+
### What are the Agent patterns?
383+
384+
- **ReActAgent**: Reflective agent with Think → Call → Observe → Summarize loop
385+
- **TeamAgent**: Multi-agent collaboration with 6 preset protocols (HIERARCHICAL, etc.)
386+
387+
### Where can I find help?
388+
389+
- **Documentation**: [solon.noear.org/article/learn-solon-ai](https://solon.noear.org/article/learn-solon-ai)
390+
- **Examples**: [solonlab/solon-ai-mcp-embedded-examples](https://github.com/solonlab/solon-ai-mcp-embedded-examples)
391+
- **SolonCode**: Java version of "Claude Code" - [github.com/opensolon/soloncode](https://github.com/opensolon/soloncode)
392+
- **SolonClaw**: Java version of "OpenClaw" - [github.com/opensolon/solonclaw](https://github.com/opensolon/solonclaw)

0 commit comments

Comments
 (0)