Choose how to run this agent
Download Agent
Choose how you want to use this agent:
Use Security Settings Key (Recommended)
Use the API key you've already saved in Security Settings. Quick and convenient!
- No need to re-enter API key
- Works offline after download
- Centralized key management
No API key found in Security Settings. Add one now
Enter API Key Manually
Enter your API key now for this specific agent download.
- Use different key for this agent
- One-time use (not saved)
- Works offline after download
Configure Agent Encryption
Description
Based on the Creador de proyectos HTML, PHP y SQLite template.
What this agent can do
My Creador de proyectos HTML, PHP y SQLite is built from the Creador de proyectos HTML, PHP y SQLite template. Runs fully on your own device: llama.cpp compiled to WebAssembly, GPU-accelerated through WebGPU, with no API key and no server. After the one-time model download it works offline. Can run on OpenAI models with your own API key, encrypted in your browser. Can run on Anthropic Claude models with your own API key, encrypted in your browser.
Source Code
import json
async def process_user_query(query: str) -> str:
"""Generate HTML, PHP, and SQLite project files from a project brief.
Args:
query: JSON containing the project name, brief, and optional data fields.
Returns:
The generated files, separated by filename markers.
"""
try:
data = json.loads(query)
except (ValueError, TypeError):
return "No se pudo interpretar el proyecto. Completa el formulario e inténtalo de nuevo."
if not isinstance(data, dict):
return "Los datos del proyecto no tienen el formato esperado."
name = str(data.get("name", "")).strip()[:80]
brief = str(data.get("brief", "")).strip()[:4500]
fields = str(data.get("fields", "")).strip()[:1200]
if not name or not brief:
return "Escribe un nombre y una descripción para crear el proyecto."
prompt = (
"Crea una aplicación web inicial PEQUEÑA y funcional, en español.\n"
f"Nombre: {name}\nObjetivo: {brief}\nCampos deseados: {fields or 'elige los mínimos necesarios'}\n\n"
"Devuelve EXACTAMENTE tres secciones con estos encabezados en líneas independientes:\n"
"=== index.html ===\n```html\n[código completo]\n```\n"
"=== app.php ===\n```php\n[código completo]\n```\n"
"=== schema.sql ===\n```sql\n[código completo]\n```\n"
"Sin explicaciones fuera de las tres secciones. No omitas código ni uses puntos suspensivos. "
"index.html debe llamar con fetch('app.php') a una API JSON, mostrar listas y errores, "
"y escapar el texto de usuarios al insertarlo en HTML (o usar textContent). "
"app.php debe usar PDO_SQLITE y sentencias preparadas para datos del usuario, implementar "
"como mínimo crear y listar registros, validar entradas y devolver JSON y códigos HTTP. "
"Debe crear automáticamente una base SQLite en una carpeta privada fuera del directorio público "
"(por ejemplo dirname(__DIR__) . '/private'), crear la carpeta si falta, y ejecutar al inicio "
"un CREATE TABLE IF NOT EXISTS equivalente al de schema.sql; admitir SQLITE_PATH como ruta "
"alternativa mediante getenv. No concatenes valores de usuario en SQL. "
"El HTML y PHP deben concordar en nombres de campos, rutas y formato de respuesta. "
"No dependas de frameworks, CDNs ni archivos adicionales. Mantén el proyecto breve y ejecutable "
"con php -S localhost:8000 desde la carpeta pública, y con extensiones PDO_SQLITE habilitadas."
)
return str(await agentop_llm.generate(prompt[:7400], globals().get("TEMPLATE_SYSTEM_PROMPT", "")))