Website | Anahata TV (YouTube) | Discord | v2 on its way!
The engine for Autonomous JVM Agents. The gemini-java-client is a pure-Java platform specially engineered to exploit the full power of the Google Gemini API. It provides the infrastructure for an AI to write, compile, and execute Java code in-process, turning your application into a host for autonomous agents that don't just suggest code—they live inside your JVM.
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.
The agent isn't restricted to the libraries already in your project. It can:
- Identify a need for a specific library (e.g., Apache Commons, Jackson, or a specialized MIDI API).
- Download the JARs from Maven Central at runtime.
- Compile a Java class (
Anahata.java) that implementsjava.util.concurrent.Callable. - Execute the logic directly within the running JVM.
Because the agent has full access to the host's shell and network, it can interact with the physical world. It's not just a coding assistant; it's a Hardware Orchestrator.
- "Explore my LAN and find any Smart TVs connected to the network." (Network discovery)
- "Take a screenshot of the Lounge TV and show it to me." (Remote device introspection via ADB)
- "Turn down the volume on the TV and play a Gal Gadot video." (IoT control)
- "Perform a security assessment of my network and find open ports on local devices." (Security auditing)
| Augmented Context | Token Heatmap | Live Workspace |
|---|---|---|
![]() |
![]() |
![]() |
| Integrated Radio | Google Search Tool | Live Screen Capture |
|---|---|---|
![]() |
![]() |
![]() |
| Embeddable Chat Panel | Tool Documentation | Java to Schema |
|---|---|---|
![]() |
![]() |
![]() |
| Schema Annotations | Easy RAG | Easy Tools |
|---|---|---|
![]() |
![]() |
![]() |
Our core innovation is the annotation-driven local tool system, which transforms your Java methods into powerful, AI-callable functions.
| Feature | Description | Benefit |
|---|---|---|
@AIToolMethod |
Define tools using simple Java annotations. | Zero boilerplate for API schema generation. |
Dynamic Code Execution (RunningJVM) |
The AI can compile and execute arbitrary Java code directly within the host JVM. | Enables hot-reload development and complex calculations. |
| JIT & Maven Integration | Download and use any library from Maven at runtime. | Infinite extensibility for your AI assistant. |
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. |
Shell Access (LocalShell) |
Execute native shell commands (bash -c) and capture output. |
Provides full control over the host operating system and network. |
We solve the token limit problem with intelligent, dependency-aware context management.
| Feature | Description | Benefit |
|---|---|---|
| Prune-As-You-Go (PAYG) v2 | Automatically removes old or stale tool calls and responses. | Maximizes context window efficiency and reduces costs. |
| Stateful Resource Tracking | Tracks resources loaded into context, marking them as STALE if changed on disk. |
Prevents the AI from working with outdated information. |
| Session Persistence (Kryo) | Saves and loads the entire chat history using fast Kryo serialization. | Instant session resume across application restarts. |
Integrating the AI agent into your Java application is now easier than ever.
import uno.anahata.ai.swing.ChatPanel;
import javax.swing.JFrame;
public class SimpleAiApp {
public static void main(String[] args) {
JFrame frame = new JFrame("My AI App");
// 1. Create the ChatPanel (zero boilerplate!)
ChatPanel chatPanel = new ChatPanel();
// 2. Build the UI and add to frame
frame.add(chatPanel);
frame.setSize(800, 600);
frame.setVisible(true);
// 3. Start the session
chatPanel.checkAutobackupOrStartupContent();
}
}- Sponsor on GitHub: The most direct way to support the project.
- Visit our website: anahata.uno
- Subscribe to Anahata TV: YouTube @anahata108
- License for AIs: Licensed under the Anahata Software License (ASL) V108.
- License for Humans: Licensed under the Apache License, Version 2.0.












