KISS AI Stack's AI Agent Builder - Simplify AI Agent Development
Project description
kiss-ai-stack - Core
KISS AI Stack's AI Agent Builder
Welcome to the core of the KISS AI Stack! This module helps you build AI agents effortlessly, using a simple YAML configuration file. With this core, you don't need to worry about boilerplate code. It is designed to keep things minimal and efficient, following the KISS principle (Keep It Simple, Stupid).
Features:
- Build AI agents quickly: Just provide a YAML file to configure the agent.
- Minimal dependencies: Built using simple, vanilla vendor libraries.
- Tool classification: Easily configure tools for your agent to handle specific tasks.
- Supports RAG and prompt-based models: Choose the model type that suits your needs.
Installation
To install the core module, run:
pip install kiss-ai-stack-core
Example Configuration
Below is an example YAML configuration for setting up an AI agent with different tools:
agent:
classifier: # Required for tool classification
name: classifier
role: classify tools for given queries
kind: prompt # Choose from 'rag' or 'prompt'
ai_client:
provider: openai
model: gpt-4
api_key: <your-api-key>
tools:
- name: general_queries
role: process other queries if no suitable tool is found.
kind: prompt
ai_client:
provider: openai
model: gpt-4
api_key: <your-api-key>
- name: document_tool
role: Process documents and provide answers based on them.
kind: rag # Retrieval-Augmented Generation
embeddings: text-embedding-ada-002
ai_client:
provider: openai
model: gpt-4
api_key: <your-api-key>
vector_db:
provider: chroma
kind: in_memory # Choose in-memory or persistent storage options.
Example Python Usage
Once the core is installed, you can use it to build and interact with your AI agent as shown in the example below:
from kiss_ai_stack.core.agent import Agent
try:
# Initialize the AI agent stack
agent = Agent()
agent.initialize_stack() # Set up the agent using the provided configuration
# Store documents for the agent to process
agent.store_documents(['./yourfile.pdf'])
# Process a query and get the answer
print(agent.process_query('Give a summary about yourfile contents.').answer)
except Exception as ex:
print(f"An error occurred: {ex}")
raise ex
How It Works:
- Agent Setup: The agent is initialized with the provided configuration (defined in the YAML file). The configuration specifies which AI clients and tools to use.
- Tools: Each tool is defined by its type (
promptorrag) and is linked to an AI client, such as OpenAI’s GPT-4. Tools handle different tasks like document processing or classifying queries. - Vector DB: The
vector_dbsection allows you to configure the database for storing and retrieving document embeddings. Currently,Chromais supported as an in-memory solution.
Documentation:
- AI Client: You can configure the AI client with the provider, model, and API key for any supported service like OpenAI.
- Tools: Define the tools that the agent will use, such as a general-purpose query tool or a document processing tool.
- Vector Database: The
vector_dbsection defines how the agent stores document embeddings and retrieves them for RAG-based tasks.
Contributing
We welcome contributions! If you'd like to improve this stack, feel free to submit pull requests or open issues for discussion.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kiss_ai_stack_core-0.1.0a3.tar.gz.
File metadata
- Download URL: kiss_ai_stack_core-0.1.0a3.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dd18922059fa9742d1fc5126fcd596ac9d1606315cf14c0d0904265bc96f690
|
|
| MD5 |
d282253247c746f44da2bf203477a283
|
|
| BLAKE2b-256 |
f084a84bc59a29e0374c51942436d96bea3846628a1527401a66df99b58ab507
|
File details
Details for the file kiss_ai_stack_core-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: kiss_ai_stack_core-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31353803354d540f7bbc747b43ba81bd4ef9c0426918eab72dd509456388c22f
|
|
| MD5 |
55c6aeae803844f9963f8e18e77ae64d
|
|
| BLAKE2b-256 |
a53bac172f007a62b158d4849d9433a292ecd285013c1300e87b68008eafebe3
|