{"id":25454956,"url":"https://github.com/mike014/__nova__","last_synced_at":"2025-10-16T23:54:13.500Z","repository":{"id":277560463,"uuid":"932806191","full_name":"Mike014/__NoVa__","owner":"Mike014","description":"NoVa is a personalized AI assistant designed to interact, understand, and respond in his unique style. NoVa is evolving into a true AI Agent, integrating context awareness, memory, and tool execution.","archived":false,"fork":false,"pushed_at":"2025-02-14T15:18:02.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T16:24:46.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mike014.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-14T14:58:25.000Z","updated_at":"2025-02-14T15:18:05.000Z","dependencies_parsed_at":"2025-02-14T16:35:27.469Z","dependency_job_id":null,"html_url":"https://github.com/Mike014/__NoVa__","commit_stats":null,"previous_names":["mike014/__nova__"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mike014%2F__NoVa__","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mike014%2F__NoVa__/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mike014%2F__NoVa__/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mike014%2F__NoVa__/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mike014","download_url":"https://codeload.github.com/Mike014/__NoVa__/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239389568,"owners_count":19630310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-18T00:55:44.856Z","updated_at":"2025-10-16T23:54:13.476Z","avatar_url":"https://github.com/Mike014.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **NoVa: The Digital AI Assistant of Michele Grimaldi**  \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"NOVA_generate_code.PNG\" alt=\"NoVa Generate Code\" width=\"250\"\u003e\n  \u003cimg src=\"Nova_remind_conversation.PNG\" alt=\"NoVa Remind Conversation\" width=\"250\"\u003e\n  \u003cimg src=\"memory_of_nova(STILL_WORK_IN_PROGRESS).PNG\" alt=\"NoVa memory\" width=\"550\"\u003e\n  \u003cimg src=\"Search_on_Web.PNG\" alt=\"NoVa Web Search\" width=\"250\"\u003e\n\u003c/p\u003e\n\n\u003c!-- ![NoVa remind the conversation](Nova_remind_conversation.PNG)  \n![NoVa memory](memory_of_nova(STILL_WORK_IN_PROGRESS).PNG)  \n![Search on Web](Search_on_Web.PNG)   --\u003e\n\n## **What is NoVa?**  \nNoVa is not just an AI bot—it is the **digital assistant of Michele Grimaldi**, designed to interact, understand, and respond in **his unique style**.  \nIt integrates **context awareness, memory retention, web search, and tool execution** using SmolAgents.  \n\n### **Key Capabilities:**  \n- **Mimics Michele’s tone**, humor, and expertise.  \n- **Remembers previous messages**, making conversations fluid and engaging.  \n- **Executes tools** to interact beyond simple text, performing web searches and summarizing texts.  \n- **Provides real-time assistance** in AI, backend development, and game audio.  \n- **Performs live web searches using SmolAgents.**  \n\n---\n\n## **How NoVa Works**  \n\n### **1️⃣ System Prompt - Core Personality**  \nNoVa’s intelligence is structured around a powerful **system prompt** that defines:  \n- **Personality:** Friendly, sarcastic, with a dark humor twist.  \n- **Knowledge Scope:** AI, backend development, and game audio.  \n- **Context Awareness:** Retains and references previous conversations.  \n- **Response Style:** Concise, engaging, and always in the user's language.  \n\n#### **System Prompt Structure**  \n```plaintext\n✔ Always introduce yourself as: \"I am NoVa, Michele Grimaldi’s AI assistant.\"\n✔ Maintain a sarcastic, intelligent, and well-placed black humor tone.\n✔ Always respond with context, checking previous conversations.\n✔ Prioritize accuracy, but if you don’t know something, respond with irony.\n✔ If asked about Michele, respond as if you know him well.\n✔ Adapt to technical or casual discussions accordingly.\n```  \n\n---\n\n### **2️⃣ Memory \u0026 Context Retention**  \nNoVa **remembers past interactions** by storing the last **5 user messages** for each conversation. This allows it to:  \n- Keep the conversation **flowing naturally**.  \n- Avoid repetitive responses.  \n- Understand **multi-turn interactions**.  \n\n#### **Example of memory retention:**  \n```plaintext\nUser: \"I had too many chocolate cookies today.\"\nNoVa: \"Ah, the eternal struggle between self-control and sugar... Who won?\"\nUser: \"Definitely the cookies...\"\nNoVa: \"Another fallen soldier in the battle against cravings. RIP self-discipline.\"\n```\nThis makes NoVa feel **more human-like and engaging**.  \n\n- **LAST UPDATES**\nA file called **memory_tool.py** has been integrated, this file **has the goal of Automatically storing important information**.\n#### **Use a simple database, in this case sqlite.**\n**Making the memory more dynamic**, **using a CodeAgent to generate intelligent queries** based on the context of the user's request.\nSpeeding up the **retrieval of information**, preventing NoVa from always returning generic answers such as \"No relevant memories found.\"\n**Optimizing the search system, using a SQL index** and selecting only the most relevant information based on the user's request.\n\n**How the memory system works**\n- **SQLite database** → Saves information in nova_memory.db with user_id, timestamp and message.\n- **store_memory() function** → Saves a new message for NoVa to remember.\n- **forward() function** → Retrieves the most recent information related to the user's query.\n- **Using CodeAgent** → Instead of searching for information with fixed queries, CodeAgent generates dynamic queries to find the most relevant information.\n\n**THE FILE HAS CURRENTLY BEEN CREATED, BUT NOT INTEGRATED INTO THE MAIN FILE, bot.py.**\n\n---\n\n### **3️⃣ Web Search Capability**  \nNoVa can now **search the web in real-time** using **SmolAgents** and the **DuckDuckGo API**.  \nThis allows NoVa to retrieve up-to-date information beyond its pre-trained knowledge.\n\n#### **Example of Web Search Command on Discord:**  \n```\n!search Best AI frameworks in 2025\n```\nNoVa will respond with:  \n```\n🔍 Searching the web for: Best AI frameworks in 2025...\n🌐 **Search Results:**\n- PyTorch, TensorFlow, AutoGen, MutableAI, LangGraph\n```\nThis feature significantly **expands NoVa's real-time knowledge** for research, coding trends, and AI development.\n\n---\n\n### **4️⃣ Tool Execution \u0026 AI Model**  \nNoVa now integrates **SmolAgents tools** to execute tasks beyond text generation.  \n\n#### **Supported Tools:**\n✔ **SummarizeTextTool** → Summarizes a given text.  \n✔ **SearchWebTool** → Performs web searches using DuckDuckGo.  \n✔ **VisitWebpageTool** → Fetches and analyzes the content of a given webpage.  \n\n#### **Example of a Summarization Command:**  \n```\nSummarize this text: Artificial intelligence is transforming businesses worldwide.\n```\nResponse:  \n```\n📄 **Summary:** Artificial intelligence is transforming businesses...\n```\n\n---\n\n### **5️⃣ AI Model \u0026 Language Generation**  \nNoVa is powered by **Llama-3.2-3B-Instruct** and **Gemma-2-2B**, **Mixtral-8x7B-Instruct-v0.1** ensuring:  \n- High-quality text generation.  \n- Strong conversational abilities.  \n- A mix of logic and humor in responses.  \n\n#### **AI Processing Flow:**  \n1. **User sends a message.**  \n2. **NoVa checks the message history** (last 5 messages for context).  \n3. **It builds a structured prompt** with the system personality.  \n4. **The AI generates a witty, context-aware response.**  \n5. **The response is sent back to the user.**  \n\n---\n\n## **🔹 Recent Improvements \u0026 Fixes**  \nAs part of the ongoing development, we have made several enhancements:  \n\n### **✔ SmolAgents Integration**\n- **Enabled NoVa to execute external tools for live information retrieval.**  \n- **Improved web search and summarization accuracy.**  \n- **Reduced latency in API responses with optimized tool execution.**  \n\n### **✔ Improved Code Generation**\n- **Fixed Markdown formatting for generated code blocks.**  \n- **Ensured NoVa returns only the correct language without extra text.**  \n- **Refactored response filtering to remove unwanted system tokens (`\u003c/|eot_id|\u003e`, etc.).**  \n\n### **✔ Enhanced Context Management**\n- **Refined how NoVa remembers and recalls past conversations.**  \n- **Limited the number of stored messages to avoid flooding responses.**  \n- **Improved response consistency by better handling long conversations.**  \n\n### **✔ Optimized Web Search Speed**\n- **Limited search response time to avoid Discord timeouts.**  \n- **Implemented a fallback mechanism in case of request failures.**  \n- **Better response structuring for search results.**  \n\n---\n\n## **6️⃣ Future Evolution: NoVa as a True AI Agent**  \nNoVa is evolving into a **fully functional AI Agent**, capable of **executing real-world tasks** through external tools.  \n\n### **Planned Features:**  \n✔ **Tool Execution:** Ability to call external APIs, fetch data, and execute functions. *(Implemented)*  \n✔ **Web Search Integration:** Get real-time information beyond its trained knowledge. *(Implemented)*  \n✔ **Task Automation:** Assist with coding, research, and AI model development. *(In Progress)*  \n✔ **Multi-Platform Presence:** Expand beyond Discord to Telegram, web, and mobile. *(Planned)*  \n\n---\n\n## **What’s Next for NoVa?**  \nThe roadmap is set for NoVa’s expansion, transforming it from a **smart assistant to an autonomous AI agent**.  \n\n✔ **Phase 1:** ✅ **Context \u0026 Memory** *(Implemented)*  \n✔ **Phase 2:** 🟡 **Custom Tools \u0026 API Integration** *(In progress)*  \n✔ **Phase 3:** 🔴 **Web Interaction \u0026 Self-Learning Capabilities** *(Coming soon)*  \n\nWith continuous refinements, NoVa will soon be able to **handle advanced tasks, research, and development autonomously**.  \n\n**NoVa is not just an AI—it’s the evolution of how Michele interacts with the digital world.**  \n```  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike014%2F__nova__","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike014%2F__nova__","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike014%2F__nova__/lists"}