Agent Templates

Prebuilt agent templates, one-click deploy to edge devices

const APP_NAME = 'OpenSaaS'; function renderNavbar() { document.getElementById('navbar').innerHTML = `
${APP_NAME}
`; } function renderFooter() { document.getElementById('footer').innerHTML = `

© 2026 ${APP_NAME}

PrivacyTermsRefund
support@edgedeploy.com
`; } async function loadTemplates() { try { const resp = await fetch('/api/v1/agents/templates', { headers: getAuthHeader() }); const templates = resp.ok ? await resp.json() : []; const icons = { 'vision': '👁️', 'iot': '📡', 'nlp': '💬', 'robot': '🤖', 'other': '📦', 'vision': '👁️', 'IoT': '📡', 'voice': '🎤', 'NLP': '💬', 'robot': '🤖', 'other': '📊', 'robot_arm': '🦾', 'quality': '✅', 'sorting': '📦', 'industrial_gateway': '🌐', 'edge': '💻', 'data_collection': '📊' }; document.getElementById('templateGrid').innerHTML = templates.map(t => `
${icons[t.category] || '📦'}

${t.name}

${t.category}

${t.description || ''}

${(t.supported_archs || []).map(a => `${a}`).join('')}
`).join(''); } catch (err) { console.error('Load templates error:', err); document.getElementById('templateGrid').innerHTML = '

Failed to load

'; } } function deployTemplate(id) { alert('Template deployment:Please add a device and upload a model first,then choose a device to deploy。'); window.location.href = '/devices'; } (async () => { renderNavbar(); renderFooter(); if (await checkAuth()) loadTemplates(); })();