Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 4.28 KB

1.Project Structure.md

File metadata and controls

80 lines (61 loc) · 4.28 KB

Table of Contents

  1. Overview
  2. Modules

Project Structure

Overview

Design Goals

Design Goal Reason
Modularity Facilitates the constant changes and additions in functionality.

Technologies Used

  • Backend: FastAPI is the primary framework for building the REST API.
  • LLM Provider: Ollama is used as the primary provider for LLMs.
  • Vector Database: Qdrant is used for storing vector embeddings in RAG (Retrieval-Augmented Generation).

Modules

Directory Structure

├── ai_ops_cli.py                  
├── src/
│   ├── api.py                     
│   ├── agent/
│   │   ├── agent.py               
│   │   └── architectures/
│   ├── core/
│   │   ├── knowledge/
│   │   ├── llm/
│   │   ├── memory/
│   │   └── tools/
│   ├── routers/
│   │   ├── sessions.py         
│   │   └── monitoring.py      
│   ├── utils/
│   ├── api.py             
│   ├── config.py 
│   ├── dependencies.py 

Agent

The Agent class is responsible for managing the AI Assistant state and interactions, with AgentArchitecture being a concrete strategy for the Agent class (Strategy Design Pattern).

New architectures can be added for experimentation.

The Agent is initialized at the start of the application and is shared across the system. It is injected into the session routers using Dependency Injection in FastAPI.

Core

The Core module contains the essential components used throughout the AI-OPS application. The components in this module are used to build the architecture of the AI Assistant.

Core Components Description
LLM This component provides an interface to interact with LLM providers like Ollama. It facilitates generating responses based on the input data and is responsible for generating embeddings in the knowledge module.
Memory The memory module manages conversation data, it keeps track of the session-related messages, context, and conversation history.
Tools The tools module is responsible for providing the assistant with external capabilities. Tools like web search, terminal commands, or other specialized functionalities can be registered here and used by the agent.
Knowledge Responsible for the RAG (Retrieval-Augmented Generation). It interacts with the LLM (Large Language Model) provider to generate embeddings for the stored documents. The knowledge module organizes data into Collections (groups of documents) and Documents (individual pieces of information).

Routers

The Routers module is designed to handle the routing of API requests within the FastAPI application. It ensures that the application follows a modular architecture by isolating various functionalities into dedicated routes