flex-ai / index.html
LuckyEnforceAgent's picture
Add 3 files
d83b491 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NoCode AI Agent Builder</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.agent-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.draggable-item {
cursor: grab;
transition: all 0.2s ease;
}
.draggable-item:active {
cursor: grabbing;
}
.drop-zone {
min-height: 200px;
transition: all 0.3s ease;
}
.drop-zone.active {
border-color: #6e8efb;
background-color: rgba(110, 142, 251, 0.1);
}
.animate-pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 0.6; }
50% { opacity: 1; }
100% { opacity: 0.6; }
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Header -->
<header class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-robot text-3xl"></i>
<h1 class="text-2xl font-bold">NoCode AI Agent Builder</h1>
</div>
<nav class="hidden md:flex space-x-6">
<a href="#" class="hover:text-gray-200 transition">Templates</a>
<a href="#" class="hover:text-gray-200 transition">Documentation</a>
<a href="#" class="hover:text-gray-200 transition">Community</a>
<a href="#" class="hover:text-gray-200 transition">Pricing</a>
</nav>
<div class="flex items-center space-x-4">
<button class="bg-white text-purple-600 px-4 py-2 rounded-lg font-medium hover:bg-gray-100 transition">
Sign In
</button>
<button class="hidden md:block bg-purple-800 text-white px-4 py-2 rounded-lg font-medium hover:bg-purple-900 transition">
Get Started
</button>
<button class="md:hidden text-2xl">
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- Hero Section -->
<section class="mb-16">
<div class="text-center max-w-3xl mx-auto">
<h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">Build AI Agents Without Writing Code</h1>
<p class="text-xl text-gray-600 mb-8">Create powerful AI assistants, chatbots, and automation workflows with our intuitive drag-and-drop interface. No coding required!</p>
<div class="flex flex-col sm:flex-row justify-center gap-4">
<button class="gradient-bg text-white px-6 py-3 rounded-lg font-medium hover:opacity-90 transition shadow-lg">
Start Building - It's Free
</button>
<button class="bg-white border border-gray-300 text-gray-700 px-6 py-3 rounded-lg font-medium hover:bg-gray-50 transition shadow">
Watch Demo <i class="fas fa-play-circle ml-2"></i>
</button>
</div>
</div>
</section>
<!-- Features Section -->
<section class="mb-16">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
<div class="text-purple-600 text-4xl mb-4">
<i class="fas fa-magic"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Drag & Drop Interface</h3>
<p class="text-gray-600">Easily build AI agents by dragging and dropping components. No technical skills needed.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
<div class="text-purple-600 text-4xl mb-4">
<i class="fas fa-brain"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Pre-trained AI Models</h3>
<p class="text-gray-600">Access state-of-the-art AI models for text, vision, and voice processing.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
<div class="text-purple-600 text-4xl mb-4">
<i class="fas fa-share-alt"></i>
</div>
<h3 class="text-xl font-semibold mb-2">Multi-platform Deployment</h3>
<p class="text-gray-600">Deploy your AI agent to websites, mobile apps, and messaging platforms with one click.</p>
</div>
</div>
</section>
<!-- Builder Section -->
<section class="mb-16">
<h2 class="text-3xl font-bold text-center text-gray-800 mb-8">AI Agent Builder</h2>
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<!-- Toolbar -->
<div class="bg-gray-100 p-4 border-b flex justify-between items-center">
<div class="flex items-center space-x-4">
<button class="bg-white px-4 py-2 rounded-lg border hover:bg-gray-50">
<i class="fas fa-plus mr-2"></i> New Agent
</button>
<button class="bg-white px-4 py-2 rounded-lg border hover:bg-gray-50">
<i class="fas fa-save mr-2"></i> Save
</button>
</div>
<div class="flex items-center space-x-2">
<button id="preview-btn" class="bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700">
<i class="fas fa-eye mr-2"></i> Preview
</button>
<button class="gradient-bg text-white px-4 py-2 rounded-lg hover:opacity-90">
<i class="fas fa-rocket mr-2"></i> Deploy
</button>
</div>
</div>
<!-- Builder Area -->
<div class="flex flex-col md:flex-row h-full">
<!-- Components Panel -->
<div class="w-full md:w-1/4 bg-gray-50 p-4 border-r">
<h3 class="font-semibold text-lg mb-4 flex items-center">
<i class="fas fa-cubes mr-2"></i> Components
</h3>
<div class="space-y-2">
<div class="draggable-item bg-white p-3 rounded-lg border cursor-move shadow-sm hover:shadow-md" draggable="true" data-type="input">
<i class="fas fa-keyboard text-blue-500 mr-2"></i> Text Input
</div>
<div class="draggable-item bg-white p-3 rounded-lg border cursor-move shadow-sm hover:shadow-md" draggable="true" data-type="llm">
<i class="fas fa-brain text-purple-500 mr-2"></i> AI Model
</div>
<div class="draggable-item bg-white p-3 rounded-lg border cursor-move shadow-sm hover:shadow-md" draggable="true" data-type="database">
<i class="fas fa-database text-green-500 mr-2"></i> Database
</div>
<div class="draggable-item bg-white p-3 rounded-lg border cursor-move shadow-sm hover:shadow-md" draggable="true" data-type="api">
<i class="fas fa-plug text-yellow-500 mr-2"></i> API Connector
</div>
<div class="draggable-item bg-white p-3 rounded-lg border cursor-move shadow-sm hover:shadow-md" draggable="true" data-type="output">
<i class="fas fa-terminal text-red-500 mr-2"></i> Output
</div>
<div class="draggable-item bg-white p-3 rounded-lg border cursor-move shadow-sm hover:shadow-md" draggable="true" data-type="condition">
<i class="fas fa-code-branch text-indigo-500 mr-2"></i> Condition
</div>
</div>
</div>
<!-- Canvas -->
<div class="w-full md:w-2/4 p-6">
<div id="canvas" class="drop-zone bg-gray-50 rounded-xl border-2 border-dashed border-gray-300 p-6 min-h-64">
<p class="text-gray-500 text-center py-8">Drag components here to build your AI agent</p>
<!-- Sample agent flow (visible after components are added) -->
<div id="agent-flow" class="hidden space-y-6">
<!-- This will be populated by JavaScript -->
</div>
</div>
</div>
<!-- Properties Panel -->
<div class="w-full md:w-1/4 bg-gray-50 p-4 border-l">
<h3 class="font-semibold text-lg mb-4 flex items-center">
<i class="fas fa-sliders-h mr-2"></i> Properties
</h3>
<div id="properties-panel" class="bg-white p-4 rounded-lg border">
<p class="text-gray-500 text-center py-8">Select a component to edit its properties</p>
</div>
</div>
</div>
</div>
</section>
<!-- Templates Section -->
<section class="mb-16">
<div class="flex justify-between items-center mb-8">
<h2 class="text-3xl font-bold text-gray-800">Starter Templates</h2>
<a href="#" class="text-purple-600 hover:text-purple-800 font-medium">View all templates →</a>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="agent-card bg-white rounded-xl overflow-hidden shadow-md hover:shadow-xl transition duration-300">
<div class="gradient-bg p-4 text-white">
<h3 class="font-bold text-xl">Customer Support Bot</h3>
<p class="text-purple-100">24/7 automated support</p>
</div>
<div class="p-4">
<p class="text-gray-600 mb-4">Handle common customer queries with AI-powered responses.</p>
<button class="w-full bg-gray-100 hover:bg-gray-200 text-gray-800 py-2 rounded-lg transition">
Use Template
</button>
</div>
</div>
<div class="agent-card bg-white rounded-xl overflow-hidden shadow-md hover:shadow-xl transition duration-300">
<div class="gradient-bg p-4 text-white">
<h3 class="font-bold text-xl">Content Generator</h3>
<p class="text-purple-100">Create engaging content</p>
</div>
<div class="p-4">
<p class="text-gray-600 mb-4">Generate blog posts, social media content, and product descriptions.</p>
<button class="w-full bg-gray-100 hover:bg-gray-200 text-gray-800 py-2 rounded-lg transition">
Use Template
</button>
</div>
</div>
<div class="agent-card bg-white rounded-xl overflow-hidden shadow-md hover:shadow-xl transition duration-300">
<div class="gradient-bg p-4 text-white">
<h3 class="font-bold text-xl">Data Analyzer</h3>
<p class="text-purple-100">Extract insights from data</p>
</div>
<div class="p-4">
<p class="text-gray-600 mb-4">Process and visualize data with natural language queries.</p>
<button class="w-full bg-gray-100 hover:bg-gray-200 text-gray-800 py-2 rounded-lg transition">
Use Template
</button>
</div>
</div>
</div>
</section>
<!-- Testimonials -->
<section class="mb-16 gradient-bg text-white rounded-xl p-8 md:p-12">
<h2 class="text-3xl font-bold text-center mb-12">Trusted by Thousands of Creators</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-sm">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-white flex items-center justify-center text-purple-600 font-bold mr-4">JD</div>
<div>
<h4 class="font-semibold">Jane Doe</h4>
<p class="text-purple-200 text-sm">E-commerce Owner</p>
</div>
</div>
<p>"Built a customer support bot in 30 minutes that handles 80% of our queries. Game changer!"</p>
</div>
<div class="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-sm">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-white flex items-center justify-center text-purple-600 font-bold mr-4">MS</div>
<div>
<h4 class="font-semibold">Mike Smith</h4>
<p class="text-purple-200 text-sm">Content Creator</p>
</div>
</div>
<p>"The content generator template saved me hours each week. The quality is surprisingly good!"</p>
</div>
<div class="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-sm">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-white flex items-center justify-center text-purple-600 font-bold mr-4">AR</div>
<div>
<h4 class="font-semibold">Alex Rivera</h4>
<p class="text-purple-200 text-sm">Startup Founder</p>
</div>
</div>
<p>"As a non-technical founder, this tool let me build our MVP's AI features myself."</p>
</div>
</div>
</section>
<!-- CTA Section -->
<section class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-6">Ready to Build Your AI Agent?</h2>
<p class="text-xl text-gray-600 max-w-2xl mx-auto mb-8">Join thousands of creators building powerful AI solutions without writing a single line of code.</p>
<button class="gradient-bg text-white px-8 py-4 rounded-lg font-bold text-lg hover:opacity-90 transition shadow-xl">
Start Building for Free <i class="fas fa-arrow-right ml-2"></i>
</button>
</section>
</main>
<!-- Footer -->
<footer class="bg-gray-900 text-gray-400 py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
<div>
<h3 class="text-white text-lg font-semibold mb-4">NoCode AI Builder</h3>
<p class="mb-4">Empowering everyone to create AI solutions without coding.</p>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-linkedin"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-github"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a>
</div>
</div>
<div>
<h3 class="text-white text-lg font-semibold mb-4">Product</h3>
<ul class="space-y-2">
<li><a href="#" class="hover:text-white transition">Features</a></li>
<li><a href="#" class="hover:text-white transition">Templates</a></li>
<li><a href="#" class="hover:text-white transition">Pricing</a></li>
<li><a href="#" class="hover:text-white transition">Integrations</a></li>
</ul>
</div>
<div>
<h3 class="text-white text-lg font-semibold mb-4">Resources</h3>
<ul class="space-y-2">
<li><a href="#" class="hover:text-white transition">Documentation</a></li>
<li><a href="#" class="hover:text-white transition">Tutorials</a></li>
<li><a href="#" class="hover:text-white transition">Blog</a></li>
<li><a href="#" class="hover:text-white transition">Community</a></li>
</ul>
</div>
<div>
<h3 class="text-white text-lg font-semibold mb-4">Company</h3>
<ul class="space-y-2">
<li><a href="#" class="hover:text-white transition">About</a></li>
<li><a href="#" class="hover:text-white transition">Careers</a></li>
<li><a href="#" class="hover:text-white transition">Contact</a></li>
<li><a href="#" class="hover:text-white transition">Legal</a></li>
</ul>
</div>
</div>
<div class="pt-8 border-t border-gray-800 text-center">
<p>© 2023 NoCode AI Builder. All rights reserved.</p>
</div>
</div>
</footer>
<!-- Preview Modal -->
<div id="preview-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl w-full max-w-4xl max-h-[90vh] overflow-hidden">
<div class="flex justify-between items-center bg-gray-100 p-4 border-b">
<h3 class="font-semibold text-lg">AI Agent Preview</h3>
<button id="close-preview" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6 overflow-y-auto" style="max-height: 80vh;">
<div class="bg-gray-50 rounded-lg p-6 mb-4">
<div class="flex mb-4">
<div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center text-purple-600 mr-3">
<i class="fas fa-robot"></i>
</div>
<div class="bg-white p-3 rounded-lg shadow-sm max-w-xs">
<p>Hello! I'm your AI assistant. How can I help you today?</p>
</div>
</div>
<div class="flex justify-end mb-4">
<div class="bg-purple-600 text-white p-3 rounded-lg shadow-sm max-w-xs">
<p>What can you do?</p>
</div>
</div>
<div class="flex">
<div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center text-purple-600 mr-3">
<i class="fas fa-robot"></i>
</div>
<div class="bg-white p-3 rounded-lg shadow-sm max-w-xs">
<p>I can answer questions, analyze data, generate content, and more! Try asking me something.</p>
</div>
</div>
</div>
<div class="flex items-center">
<input type="text" placeholder="Type your message..." class="flex-1 border border-gray-300 rounded-l-lg p-3 focus:outline-none focus:ring-2 focus:ring-purple-500">
<button class="gradient-bg text-white px-6 py-3 rounded-r-lg hover:opacity-90">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
<script>
// Drag and drop functionality
document.addEventListener('DOMContentLoaded', function() {
const canvas = document.getElementById('canvas');
const agentFlow = document.getElementById('agent-flow');
const propertiesPanel = document.getElementById('properties-panel');
const previewBtn = document.getElementById('preview-btn');
const previewModal = document.getElementById('preview-modal');
const closePreview = document.getElementById('close-preview');
let draggedItem = null;
// Make components draggable
document.querySelectorAll('.draggable-item').forEach(item => {
item.addEventListener('dragstart', function() {
draggedItem = this;
setTimeout(() => {
this.style.opacity = '0.4';
}, 0);
});
item.addEventListener('dragend', function() {
this.style.opacity = '1';
});
});
// Canvas drop zone
canvas.addEventListener('dragover', function(e) {
e.preventDefault();
this.classList.add('active');
});
canvas.addEventListener('dragleave', function() {
this.classList.remove('active');
});
canvas.addEventListener('drop', function(e) {
e.preventDefault();
this.classList.remove('active');
if (draggedItem) {
// Hide the placeholder text
if (canvas.querySelector('p')) {
canvas.querySelector('p').style.display = 'none';
}
// Show the agent flow container
agentFlow.classList.remove('hidden');
// Create a new component on the canvas
const componentType = draggedItem.getAttribute('data-type');
const newComponent = createComponent(componentType);
agentFlow.appendChild(newComponent);
// Add click event to show properties
newComponent.addEventListener('click', function() {
showProperties(componentType);
});
}
});
// Preview button
previewBtn.addEventListener('click', function() {
previewModal.classList.remove('hidden');
});
// Close preview
closePreview.addEventListener('click', function() {
previewModal.classList.add('hidden');
});
// Close modal when clicking outside
previewModal.addEventListener('click', function(e) {
if (e.target === previewModal) {
previewModal.classList.add('hidden');
}
});
// Helper function to create components
function createComponent(type) {
const component = document.createElement('div');
component.className = 'bg-white p-4 rounded-lg border shadow-sm hover:shadow-md transition cursor-pointer';
let icon, title, description;
switch(type) {
case 'input':
icon = 'keyboard';
title = 'Text Input';
description = 'Collect user input text';
break;
case 'llm':
icon = 'brain';
title = 'AI Model';
description = 'Process input with AI';
break;
case 'database':
icon = 'database';
title = 'Database';
description = 'Store and retrieve data';
break;
case 'api':
icon = 'plug';
title = 'API Connector';
description = 'Connect to external services';
break;
case 'output':
icon = 'terminal';
title = 'Output';
description = 'Display results to user';
break;
case 'condition':
icon = 'code-branch';
title = 'Condition';
description = 'Create decision branches';
break;
}
component.innerHTML = `
<div class="flex items-start">
<div class="bg-purple-100 text-purple-600 p-2 rounded-lg mr-3">
<i class="fas fa-${icon}"></i>
</div>
<div>
<h4 class="font-medium">${title}</h4>
<p class="text-sm text-gray-500">${description}</p>
</div>
</div>
`;
return component;
}
// Show properties for selected component
function showProperties(type) {
let propertiesHTML = '';
switch(type) {
case 'input':
propertiesHTML = `
<h4 class="font-medium text-lg mb-4">Text Input Properties</h4>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Prompt Text</label>
<input type="text" class="w-full border border-gray-300 rounded-lg p-2" value="Enter your question...">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Input Type</label>
<select class="w-full border border-gray-300 rounded-lg p-2">
<option>Single line text</option>
<option>Multi-line text</option>
<option>Number</option>
<option>Email</option>
</select>
</div>
<div class="flex items-center">
<input type="checkbox" id="required" class="mr-2">
<label for="required" class="text-sm text-gray-700">Required field</label>
</div>
</div>
`;
break;
case 'llm':
propertiesHTML = `
<h4 class="font-medium text-lg mb-4">AI Model Properties</h4>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Model</label>
<select class="w-full border border-gray-300 rounded-lg p-2">
<option>GPT-4</option>
<option>GPT-3.5</option>
<option>Claude 2</option>
<option>Llama 2</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">System Prompt</label>
<textarea class="w-full border border-gray-300 rounded-lg p-2 h-24">You are a helpful AI assistant...</textarea>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Temperature</label>
<input type="range" min="0" max="1" step="0.1" value="0.7" class="w-full">
<div class="text-xs text-gray-500 flex justify-between">
<span>Precise</span>
<span>Creative</span>
</div>
</div>
</div>
`;
break;
case 'database':
propertiesHTML = `
<h4 class="font-medium text-lg mb-4">Database Properties</h4>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Connection</label>
<select class="w-full border border-gray-300 rounded-lg p-2">
<option>Create new connection</option>
<option>PostgreSQL</option>
<option>MySQL</option>
<option>MongoDB</option>
<option>Firebase</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Operation</label>
<select class="w-full border border-gray-300 rounded-lg p-2">
<option>Read</option>
<option>Create</option>
<option>Update</option>
<option>Delete</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Query</label>
<textarea class="w-full border border-gray-300 rounded-lg p-2 h-20">SELECT * FROM users WHERE id = ?</textarea>
</div>
</div>
`;
break;
default:
propertiesHTML = `
<h4 class="font-medium text-lg mb-4">${type.charAt(0).toUpperCase() + type.slice(1)} Properties</h4>
<p class="text-gray-500">Configure your ${type} component here.</p>
`;
}
propertiesPanel.innerHTML = propertiesHTML;
}
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=LuckyEnforceAgent/flex-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>