Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FastAIBot 0.1.2 [ALPHA-2026-08] β€” High-Performance Bot Orchestrator for Java

Status License: MIT Java Platform JitPack

⚑ A zero-latency, asynchronous orchestration runtime connecting LLM brains and conversation memory.

FastAIBot is the orchestrator of the FastJava ecosystem. It bridges the pure AI generation of FastAI with persistent state (FastAIMemory) and streaming interfaces.

By streaming LLM output tokens in real-time, FastAIBot enables instant responses without JSON-parsing latency.

Showcase


Quick Start β€” Example

import fastaibot.FastAIBot;
import fastai.FastAI;
import fastai.AI;
import java.util.function.Consumer;

public class Demo {
    public static void main(String[] args) {
        // 1. Connect the Brain
        AI brain = FastAI.connect("gemini:gemini-2.5-flash", "api-key");

        // 2. Define Text Output Consumer
        Consumer<String> textOut = text -> System.out.print(text);

        // 3. Boot the Bot
        FastAIBot bot = new FastAIBot(brain, "You are a helpful AI...", textOut);

        // 4. Talk (Streams instantly)
        bot.streamChat("Are you a bot in a monitor?");
    }
}

Table of Contents


Why FastAIBot?

Traditional AI frameworks add heavy abstraction layers and slow JSON parsing overhead, introducing noticeable latency to live interactions. FastAIBot provides a zero-latency, high-performance orchestration layer for Java. It connects FastAI's stateless LLM stream directly with FastAIMemory's context history, streaming incoming response tokens to your application in real-time.


Key Features

  • 🚫 Zero Lag Streaming β€” Passes tokens directly as they arrive without JSON-parsing overhead.
  • 🧠 Context Awareness β€” Seamlessly integrates with FastAIMemory for session persistence.
  • ⚑ State-Minimized β€” Built entirely in pure Java with zero heavy framework bloat.

Architecture Overview

FastAI (The Brain)
Minimalist, hyper-fast Java LLM client.

  • Zero dependencies.
  • No event system.
  • No state management. β†’ Input: Prompt in, Tokens out.

FastAIMemory (The Memory)
Module for managing conversation contexts and histories.

  • ConversationHistory: Stores and structures dialogue histories (System, User, Assistant).
  • MemoryContextBuilder: Constructs formatted context prompts for LLMs.

FastAIBot (The Orchestrator)
Lightweight orchestrator runtime for interactive bot systems.

  • Connects FastAI (LLM inference) and FastAIMemory (context management).
  • Manages real-time multi-turn conversation flow and streams tokens without overhead.

API Quick Reference

Method Description Path
streamChat(String) Sends input to FastAI and streams the mixed output. Reference β†’
getHistory() Returns the active ConversationHistory. Reference β†’

Tip

See REFERENCE.md for full documentation.


Installation

FastAIBot integrates with the FastJava ecosystem modules for LLM streaming, memory context management, and native SIMD String acceleration.

Maven (JitPack)

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <!-- FastAIBot Orchestrator -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastaibot</artifactId>
        <version>0.1.2</version>
    </dependency>

    <!-- FastAI & FastAIMemory -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastAI</artifactId>
        <version>0.1.4</version>
    </dependency>
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastAIModel</artifactId>
        <version>0.1.1</version>
    </dependency>
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastAIMemory</artifactId>
        <version>0.1.3</version>
    </dependency>

    <!-- FastJava Core & Utility Dependencies -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastString</artifactId>
        <version>0.1.0</version>
    </dependency>
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastJSON</artifactId>
        <version>0.1.2</version>
    </dependency>
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastCore</artifactId>
        <version>0.1.0</version>
    </dependency>
</dependencies>

Gradle (JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fastaibot:0.1.2'
    implementation 'com.github.andrestubbe:FastAI:0.1.4'
    implementation 'com.github.andrestubbe:FastAIModel:0.1.1'
    implementation 'com.github.andrestubbe:FastAIMemory:0.1.3'
    implementation 'com.github.andrestubbe:FastString:0.1.0'
    implementation 'com.github.andrestubbe:FastJSON:0.1.2'
    implementation 'com.github.andrestubbe:FastCore:0.1.0'
}

Direct Download (No Build Tool)

Download the required JARs directly to add them to your classpath:

  1. πŸ€– fastaibot-0.1.2.jar (Bot Orchestrator)
  2. ⚑ fastai-0.1.4.jar (LLM Engine)
  3. πŸ“¦ FastAIModel-0.1.1.jar (Local GGUF / llama.cpp & ONNX Model Engine)
  4. 🧠 FastAIMemory-0.1.3.jar (Context & History)
  5. πŸš€ FastString-0.1.0.jar (Zero-Copy Buffer)
  6. πŸ“¦ FastJSON-0.1.2.jar (JSON Parser)
  7. βš™οΈ fastcore-0.1.0.jar (Mandatory Native Loader)

Important

All JARs must be included in your classpath for the native JNI bindings and context pipelines to function correctly.


Documentation


Platform Support

Platform Status
Windows 10/11 (x64) βœ… Fully Supported
Linux 🚧 Planned
macOS 🚧 Planned

License

MIT License β€” See LICENSE file for details.


Related Projects


Part of the FastJava Ecosystem β€” Making the JVM faster. Small package. Maximum speed. Zero bloat. πŸš€πŸ“‹

About

πŸ€– High-performance conversational bot orchestrator for the FastJava AI ecosystem

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages