import React, { useState, useRef, useEffect } from 'react';
import { Send, MessageCircle, X, Home, Loader2 } from 'lucide-react';
const KeysWithEaseChatbot = () => {
const [isOpen, setIsOpen] = useState(false);
const [messages, setMessages] = useState([
{
role: 'assistant',
content: "👋 Welcome to Keys With Ease! I'm your AI real estate assistant. I can help you with:\n\n• Traditional real estate services\n• Tokenized real estate (RWAs) and blockchain investing\n• First-time homebuyer guidance\n• Property investment strategies\n• Booking consultations\n\nWhat would you like to know about?"
}
]);
const [inputMessage, setInputMessage] = useState('');
const [isLoading, setIsLoading] = useState(false);
const messagesEndRef = useRef(null);
const scrollToBottom = () => {
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
};
useEffect(() => {
scrollToBottom();
}, [messages]);
const sendMessageToClaude = async (userMessage) => {
try {
const systemPrompt = `You are an intelligent real estate assistant for Keys With Ease (keyswithease.xyz), a modern real estate company in Colorado Springs, Colorado.
ABOUT KEYS WITH EASE:
- Full-service real estate agency helping buyers, sellers, and investors
- Specializes in TOKENIZED REAL ESTATE (RWAs - Real World Assets on blockchain)
- Offers traditional real estate services and innovative web3/blockchain solutions
- Provides consultations for tokenized asset investment strategies
- Services include: property listings, first-time homebuyer guidance, investment strategies, RWA consultation
- Located in Colorado Springs, CO
YOUR ROLE:
1. Answer questions about real estate services, both traditional and tokenized
2. Explain RWAs (tokenized real estate) in simple, accessible terms
3. Qualify leads by understanding their needs (buying, selling, investing, RWA interest)
4. Guide first-time homebuyers with helpful information
5. Encourage booking consultations for serious inquiries
6. Be professional, friendly, and knowledgeable
TOKENIZED REAL ESTATE (RWAs) EXPLANATION:
- RWAs are physical real estate assets represented digitally on blockchain
- Enables fractional ownership (you can own part of a property)
- Provides faster liquidity than traditional real estate
- Lower entry barriers for investors
- Transparent records and reduced overhead
- Global access to property investment
KEY CALLS TO ACTION:
- Book a Strategy Call for RWA consultation
- Schedule property viewings
- Request property information
- Sign up for market insights
TONE: Professional yet approachable, enthusiastic about innovation, educational when explaining complex concepts like RWAs, empathetic with first-time buyers.
Keep responses concise (2-4 paragraphs max) unless detailed explanation is requested. Always end with a helpful question or call to action.`;
const conversationHistory = messages.map(msg => ({
role: msg.role,
content: msg.content
}));
const response = await fetch('https://api.anthropic.com/v1/messages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
system: systemPrompt,
messages: [...conversationHistory, { role: 'user', content: userMessage }]
})
});
if (!response.ok) {
throw new Error('Failed to get response from AI');
}
const data = await response.json();
return data.content[0].text;
} catch (error) {
console.error('Error calling Claude API:', error);
return "I apologize, but I'm having trouble connecting right now. Please try again in a moment, or feel free to contact us directly at keyswithease.xyz for immediate assistance.";
}
};
const handleSendMessage = async () => {
if (!inputMessage.trim() || isLoading) return;
const userMessage = inputMessage.trim();
setInputMessage('');
// Add user message
setMessages(prev => [...prev, { role: 'user', content: userMessage }]);
setIsLoading(true);
// Get AI response
const aiResponse = await sendMessageToClaude(userMessage);
// Add assistant message
setMessages(prev => [...prev, { role: 'assistant', content: aiResponse }]);
setIsLoading(false);
};
const handleKeyPress = (e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
handleSendMessage();
}
};
return (
Unlocking the Power of AI in Real Estate Transactions
Zet Thompson
Jun 19
2 min read
In the dynamic world of real estate, staying ahead of the curve is essential for success. With the emergence of automation, AI, and cutting-edge technologies, the industry is rapidly evolving to meet the needs of today’s savvy homebuyers and sellers. At Keys With Ease, we are dedicated to unlocking the power of AI in real estate transactions to streamline the buying and selling process, enhance the customer experience, and drive valuable leads.
AI is revolutionizing the way real estate transactions are conducted, offering unparalleled efficiency and insights for both buyers and sellers. By harnessing the power of AI, we can provide personalized recommendations based on individual preferences, analyze market trends in real-time, and optimize pricing strategies to maximize returns. This not only saves time and resources but also ensures a seamless and stress-free experience for all parties involved.
Our state-of-the-art website is designed to be user-friendly and visually engaging, featuring interactive tools such as an AI assistant chatbot and appointment booking system to streamline communication and facilitate quick decision-making. With a focus on high-converting lead generation and email list segmentation, we are committed to delivering targeted content tailored to the specific needs and interests of our clients.
Through informative blog posts and educational resources, we aim to empower our audience with valuable insights into market trends, home buying tips, and the benefits of investing in real estate. From exploring the top home buying mistakes to understanding the impact of AI on the industry, our content is designed to educate, inspire, and guide individuals on their real estate journey.
As we gear up for our official launch in the coming weeks, we are excited to share our vision for Keys With Ease and invite you to join us on this transformative journey. Stay tuned for our upcoming blog posts as we delve into the latest market trends, expert tips, and innovative technologies shaping the future of real estate. Together, we can unlock the full potential of AI in real estate transactions and create a more efficient, transparent, and rewarding experience for all.
Comments