1. Installation
NeuralNode is available as a standard Python package. Ensure you have Python 3.9 or higher installed on your system.
# Install the NeuralNode core library
pip install neuralnode
# Optional: install extensions for local Horus execution
pip install neuralnode[llamacpp]
# Optional: install voice integrations
pip install neuralnode[voice]
2. Your First Chatbot
Create a simple script to initialize NeuralNode using a cloud provider (such as Google Gemini, Anthropic Claude, or Groq Llama) and test prompt completions.
import neuralnode as nn
# Initialize NeuralNode with Google Gemini model
ai = nn.NeuralNode(
provider="google",
model="gemini-1.5-flash",
api_key="YOUR_GOOGLE_API_KEY"
)
# Chat with the model
response = ai.chat("Explain quantum superposition in 2 sentences.")
print(response)
3. Conversation Memory
Add states and context awareness to your chatbot using built-in memory models. SlidingWindowMemory maintains the last K turns, while ConversationMemory stores all logs.
import neuralnode as nn
from neuralnode.memory import ConversationMemory
# Initialize model
ai = nn.NeuralNode(provider="google")
# Attach conversation memory
bot = ai.with_memory(ConversationMemory())
# Start memory-aware sessions
response = bot.chat_with_memory("Hi, my name is Assem.")
print(response) # "Hello Assem!"
response = bot.chat_with_memory("What is my name?")
print(response) # "Your name is Assem."