Table of Contents
This was my first working version—it's messy and buggy, but it helped me understand the fundamentals. Feel free to check it out, but version 2 will be a much cleaner, improved version.
To get started with the app, follow these simple steps:
List things needed to use the software and how to install them:
- Clone the repository:
git clone https://github.com/aditsuru-git/llm-agent-v1.git
- Install dependencies:
npm install
npx playwright install
- Edit
.env
and add your Google Gemini API key:
API_KEY=your_gemini_api_key
- Delete all the
.gitkeep
files fromplayground
Start the chat application:
npm run start
- View images, videos, and listen to audio files
- Take screenshots of any webpage
- Perform CRUD operations on files and folders
AI can only access files & folders inside a root directory specified in
src/config/configPath.js
sayonara()
- Exit the chatreset()
- Clear chat history and start fresh
This chatbot can be customized to fit your needs, from appearance to personality and file access. Below are the key customization options.
Modify src/config/styles.json
to change the chat interface colors:
{
"welcome_color": "#ff8400",
"instruction_color": "#828181",
"user_color": "#00fff2",
"chat_color": "#F0F8FF",
"ai_color": "#ff0000"
}
Update these values to your preferred hex colors.
Edit src/config/persona.js
to adjust the AI's persona, speech style, and behavior.
For example, to modify how the AI interacts, tweak the persona
constant:
export const persona = `
1: Identity:
You are [Your AI Name]...
`;
- Make changes to the character's traits, tone, or role as needed.
- Note: Be sure to update the chat history as well to ensure the persona changes take full effect.
Change the AI's accessible root directory in src/config/configPath.js
by modifying:
export const playGroundPath = path.join(__dirname, "..", "..", "playground");
Update this path to point to a different directory.
Update src/config/userInfo.js
to personalize the chatbot's knowledge of the user:
export const userInfo = `I'm [Your Name], a [Your Role]...`;
This allows the AI to tailor responses based on user details.
Modify src/config/chatHistory.js
to control past conversations. This enables the chatbot to adhere more accurately to the persona.
Example format:
export const chatHistory = [
{ role: "user", parts: [{ text: "Hello!" }] },
{ role: "model", parts: [{ text: "Hey there!" }] },
];
Clear or edit history as needed.
- Utility functions: Located in
src/utils/
(e.g.,fileOperations.js
,validate.js
). - AI behavior rules: Managed in
src/config/systemInstructions.js
.
Customize these as needed to refine the chatbot's functionality.
Distributed under the MIT License. See LICENSE
for more information.