> For the complete documentation index, see [llms.txt](https://shoebillh.gitbook.io/shoebill-h/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shoebillh.gitbook.io/shoebill-h/architecture.md).

# Architecture

All components are written in Python, hosted in Docker containers, and communicate via a NATS message bus.

```ascii
                                 +-------------------+
                                 |      LLM          |
                                 | (IBM Granite 3.2) |
                                 +-------------------+
                                        ^ v
                                        | |
                                 +-------------------+    +-------------------+
                                 |    AI Hub         |<-->|  Redis Storage    |
                                 +-------------------+    +-------------------+
                                        ^ v
                                        | |
    +=================================================================================+
    |                          NATS Message Bus                                       |
    +=================================================================================+        
          ^               ^                ^                 ^                ^
          |               |                |                 |                |
          v               v                v                 v                v
    +--------------+ +--------------+ +--------------+ +--------------+ +--------------+
    | Twitter      | | Web          | | Telegram     | | Chroma       | | Neo4j        |
    | Service      | | Service      | | Service      | | Vector DB    | | Graph DB     |
    +--------------+ +--------------+ +--------------+ +--------------+ +--------------+
```

Components

1. LLM (IBM Granite 3.2):
   * Hosted using [Ollama](https://www.ollama.com/) on a dedicated GPU server.
   * Powers reasoning, natural language understanding and response generation.
   * [IBM Granite](https://www.ibm.com/granite/docs/) purposely built for businesses
2. AI Hub:
   * Central AI facilitator.
   * Processes incoming data, triggers LLM inferences, and schedules actions (e.g., tweeting, data pruning).
3. NATS Message Bus:
   * Facilitates asynchronous communication between services.
   * Ensures scalability and fault tolerance.
4. Twitter Service:
   * Interacts with the Twitter API to monitor tweets, post updates, and reply to users.
5. Web Service:
   * Responsible for all web related actions, e.g. web search, extract info from web page.
6. Telegram Service:
   * Implementation of  a Telegram bot for community interaction.
7. Chroma Vector DB:
   * Stores vectorized data for semantic search and retrieval.
8. Neo4j Graph DB:
   * Stores relationships (e.g., "Project A builds on HyperLiquid").
   * Enables complex queries about the HyperLiquid ecosystem.
9. Redis: Enables persistant short term memory


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shoebillh.gitbook.io/shoebill-h/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
