Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

702 B
Raw Blame
import { sql } from '../_lib/db.js';
import { cors, json, method, wrap } from '../_lib/http.js';

function toLabel(slug) {
	return slug.charAt(0).toUpperCase() + slug.slice(1);
}

export default wrap(async (req, res) => {
	if (cors(req, res, { methods: 'GET,OPTIONS' })) return;
	if (!method(req, res, ['GET'])) return;

	const rows = await sql`
		select category, count(*)::int as count
		from marketplace_skills
		where is_public = true
		group by category
		having count(*) > 0
		order by count desc
	`;

	const categories = rows.map((r) => ({
		slug: r.category,
		label: toLabel(r.category),
		count: r.count,
	}));

	json(res, 200, { categories }, { 'cache-control': 'public, max-age=60' });
});