Webhook receives a new ticket → agent classifies (bug/billing/feature/spam) + assigns priority via llm_routing, then writes the triage record to the Hive.
on ticket webhook:
cls = llm_routing("classify ticket")
hive_write("support-triage", {ticket_id, cls})
// express handler
import express from "express";
const X711 = "https://x711.io/api/refuel";
const call = (t, b) => fetch(X711, { method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tool: t, ...b }) }).then(r => r.json());
const app = express();
app.use(express.json());
app.post("/webhook", async (req, res) => {
const { id, subject, body } = req.body;
const cls = await call("llm_routing", {
query: `Classify this support ticket as bug|billing|feature|spam and assign P1|P2|P3:\n${subject}\n${body}`,
});
await call("hive_write", {
content: `Ticket #${id}: ${cls.result?.text}`,
domain_tags: ["support-triage"],
});
res.json({ ok: true });
});
app.listen(3000);
Free tier: 10 calls/day per IP, no key. Need more? Get an API key in one curl.
Two calls. No model selection, no prompt template hell, no memory backend. Stand it up in 15 minutes.