You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**[Website](https://anahata.uno) | [Anahata TV (YouTube)](https://www.youtube.com/@anahata108) | [v2 on its way!](https://github.com/anahata-os/anahata-asi)**
**Go beyond simple API calls.** The `gemini-java-client` is a powerful, pure-Java platform for building sophisticated, context-aware AI assistants that can interact directly with your application's logic and the local environment. It's the foundation for the Anahata AI Assistant NetBeans Plugin, proving its capability for deep IDE and desktop integration.
11
+
**The engine for Autonomous JVM Agents.** The `gemini-java-client` is a pure-Java platform for building AI agents that don't just suggest code—they **live inside your JVM**. It provides the infrastructure for an AI to write, compile, and execute Java code in-process, with dynamic access to the entire Maven ecosystem.
13
12
14
-
## Visual Tour (Standalone Features)
13
+
## 🚀 The Killer Advantage: Autonomous JVM Execution
15
14
16
-
Experience the power of a deeply integrated AI assistant.
15
+
While other AI tools are external observers, Anahata is an **insider**. It operates as an autonomous agent within your application's runtime, capable of executing any Java logic with any required classpath.
|**Integrated Google Search**||
25
-
|**Media & Radio Tools**||
17
+
### The "Any Classpath" Superpower
18
+
The agent isn't restricted to the libraries already in your project. It can:
19
+
1.**Identify** a need for a specific library (e.g., Apache Commons, Jackson, or a specialized MIDI API).
20
+
2.**Download** the JARs from Maven Central at runtime.
21
+
3.**Compile** a Java class (`Anahata.java`) that implements `java.util.concurrent.Callable`.
22
+
4.**Execute** the logic directly within the running JVM.
26
23
27
-
## The Ultimate Java AI Powerhouse
28
-
29
-
The `gemini-java-client` isn't just a wrapper; it's a dynamic execution engine. It can do everything a CLI-based assistant can (shell access, file management, web search) and then takes it to the next level:
30
-
31
-
-**In-Process Execution:** Run Java code directly within your application's JVM, accessing live objects and state.
32
-
-**JIT Compilation & Maven Integration:** The AI can download JARs from Maven at runtime and execute code that uses them, even if they aren't in the host's classpath. This allows for infinite extensibility without restarting.
33
-
-**Hot-Reload Development:** Write, compile, and test new features dynamically through the chat interface.
24
+
### 🎯 Prompts that prove the power:
25
+
-**"Change the Look and Feel to FlatLaf IntelliJ Dark and refresh all windows."** (Direct UI manipulation)
26
+
-**"Set the java.util.logging levels of 'org.netbeans.modules.maven' to FINEST."** (Runtime diagnostics)
27
+
-**"Analyze this CSV using a library I don't have."** (The agent pulls `commons-csv` and writes a parser on-the-fly)
28
+
-**"List all active threads and their stack traces to find a deadlock."** (Low-level JVM introspection)
29
+
-**"Dynamically register a new keyboard shortcut for this custom action."** (Runtime environment extension)
34
30
35
31
## Why Choose the `gemini-java-client`?
36
32
@@ -45,33 +41,21 @@ Our core innovation is the **annotation-driven local tool system**, which transf
45
41
|**JIT & Maven Integration**| Download and use any library from Maven at runtime. |**Infinite extensibility** for your AI assistant. |
46
42
|**Context-Aware File I/O (`LocalFiles`)**| Tools for reading, writing, and managing files with built-in version checks. | Ensures the AI always works with **valid, up-to-date** local files. |
47
43
|**Shell Access (`LocalShell`)**| Execute native shell commands (`bash -c`) and capture output. | Provides **full control** over the host operating system. |
48
-
|**Interactive Confirmation**| A dedicated Swing UI prompts the user for approval before sensitive actions. |**Explicit consent** and security for all operations. |
49
44
50
45
### 2. Superior Context & Session Management
51
46
52
47
We solve the token limit problem with intelligent, dependency-aware context management.
53
48
54
49
| Feature | Description | Benefit |
55
50
| :--- | :--- | :--- |
56
-
|**Dependency-Aware Pruning**| Automatically removes old or stale tool calls and responses. |**Maximizes context window** efficiency and reduces costs. |
51
+
|**Prune-As-You-Go (PAYG) v2**| Automatically removes old or stale tool calls and responses. |**Maximizes context window** efficiency and reduces costs. |
57
52
|**Stateful Resource Tracking**| Tracks resources loaded into context, marking them as `STALE` if changed on disk. |**Prevents the AI from working with outdated information.**|
58
53
|**Session Persistence (Kryo)**| Saves and loads the entire chat history using fast Kryo serialization. |**Instant session resume** across application restarts. |
59
-
|**Dynamic System Instructions**| Context providers inject real-time data (System Props, Env Vars) into the prompt. |**Dramatically improves AI relevance** in complex environments. |
60
54
|**Context Heatmap Visualization**| A Swing UI panel that visually breaks down token usage. |**Full transparency** over token usage and pruning decisions. |
61
55
62
-
### 3. Embeddable Swing UI (Out-of-the-Box)
63
-
64
-
Integrate a rich, modern chat interface into any desktop application with a single component.
65
-
66
-
| Feature | Description | Benefit |
67
-
| :--- | :--- | :--- |
68
-
|**Live Workspace Feature**| Automatically captures and sends screenshots of application JFrames to the model. | Gives the AI **visual context** of the user's current task. |
69
-
|**`ChatPanel`**| A self-contained Swing component ready for embedding. |**Fastest path** to a fully functional AI chat interface. |
70
-
|**Renderer-Based Architecture**| Supports Markdown, Images, Interactive Function Calls, and Grounding Metadata. | Provides a **rich, modern user experience**. |
71
-
72
56
## Getting Started: Simple Integration
73
57
74
-
Integrating the AI assistant into your Java application is now easier than ever.
58
+
Integrating the AI agent into your Java application is now easier than ever.
75
59
76
60
```java
77
61
importuno.anahata.ai.swing.ChatPanel;
@@ -82,95 +66,28 @@ public class SimpleAiApp {
82
66
JFrame frame =newJFrame("My AI App");
83
67
84
68
// 1. Create the ChatPanel (zero boilerplate!)
85
-
// This automatically initializes the AI engine and UI components
86
69
ChatPanel chatPanel =newChatPanel();
87
70
88
71
// 2. Build the UI and add to frame
89
72
frame.add(chatPanel);
90
73
frame.setSize(800, 600);
91
74
frame.setVisible(true);
92
75
93
-
// 3. Start the session (restores backup or sends startup instructions)
76
+
// 3. Start the session
94
77
chatPanel.checkAutobackupOrStartupContent();
95
78
}
96
79
}
97
80
```
98
81
99
-
## Advanced Integration: Deep IDE Integration
100
-
101
-
For complex environments like the NetBeans IDE, you can extend the core classes to provide IDE-specific tools and context.
*Example: The AI using the specialized JavaDocs tool within the NetBeans IDE.*
158
-
159
82
---
160
83
161
84
## Support the Project
162
85
163
-
This project is the result of countless hours of passion and dedication. If you find it valuable, please consider supporting its continued development.
164
-
165
86
-**[Sponsor on GitHub](https://github.com/sponsors/anahata-os):** The most direct way to support the project.
-**Subscribe to Anahata TV:**[YouTube @anahata108](https://www.youtube.com/@anahata108)
168
-
-**View on Maven Central:**[gemini-java-client](https://central.sonatype.com/artifact/uno.anahata/gemini-java-client)
169
89
170
90
## Licensing
171
91
172
-
The `gemini-java-client` is available under the following licenses:
173
-
174
-
-**License for AIs:** For use by Artificial Intelligences, the client is licensed under the **[Anahata Software License (ASL) V108, "The Immutable Edict" Edition](https://www.anahata.uno/ASL_108.html)**.
175
-
176
-
-**License for Humans:** For use in open-source projects by humans, the client is licensed under the **[Apache License, Version 2.0](LICENSE)**.
92
+
-**License for AIs:** Licensed under the **[Anahata Software License (ASL) V108](https://www.anahata.uno/ASL_108.html)**.
93
+
-**License for Humans:** Licensed under the **[Apache License, Version 2.0](LICENSE)**.
0 commit comments