IA Agent for Developers
SDK, CLI, Workers, Monitor, API REST y WhatsApp Cloud API en una sola plataforma. Construye agentes IA conversacionales en producción.
import { Plazbot } from "plazbot"const bot = new Plazbot({ apiKey: process.env.PLAZBOT_KEY })await bot.agent.addAgent({ name: "Sales Bot", prompt: "Eres un asistente de ventas", zone: "LA"})// LAYER 04 · SDK
plazbot/sdk
SDK TypeScript con 3 subpaths: core para Node, React para componentes, Workers para funciones serverless.
// INSTALL
// CAPABILITIES
- ├──Crear y configurar agentes IA por codigo (addAgent, updateAgent, deleteAgent)
- ├──Tool calling con servicios externos (endpoints HTTP, headers, body templates)
- ├──Acciones automaticas (asignar, cambiar etapa, etiquetar, resolver)
- ├──Instrucciones, persona, fallbacks y reglas configurables por agente
- ├──Workers definibles desde SDK (defineTool, defineWorker, defineSync, defineSchedule)
// agent-setup.tsimport { Plazbot } from "plazbot"const bot = new Plazbot({ apiKey, workspaceId })// Crear agente con tool callingconst agent = await bot.agent.addAgent({ name: "Support Bot", prompt: "Eres un asistente de soporte", useToolCalling: true, zone: "LA"})// Conversar con el agenteconst res = await bot.agent.onMessage({ agentId: agent.agentId, question: "Estado de mi pedido #1234"})// LAYER 04 · CLI
plazbot-cli
Construye, despliega y administra desde la terminal.
// LAYER 02 · WORKERS
plazbot/workers
Funciones serverless invocables desde agentes IA, automatizaciones, webhooks o cron. 5 tipos según el trigger: tool, worker, sync, schedule y webhook.
import { defineTool } from 'plz/workers' export default defineTool({ name: 'consultar-stock', reference: 'Consulta disponibilidad de productos en inventario', agents: ['agent_abc123'], parameters: [ { name: 'producto', type: 'string', description: 'Nombre del producto' } ], async run(payload, plz) { const res = await fetch(`${plz.env.API_URL}/stock?q=${payload.producto}`) return await res.json() }})// DEPLOY
// LAYER 03 · API
api.plazbot.com
REST sobre HTTPS. JWT en Authorization. Workspace en x-workspace-id. Multi-región LA y EU.
$ curl https://api.plazbot.com/v2/whatsapp/send \ -H "Authorization: Bearer $PLAZBOT_TOKEN" \ -H "x-workspace-id: $WORKSPACE_ID" \ -H "Content-Type: application/json" \ -d '{ "to": "+51912345678", "template": "welcome_onboarding", "variables": { "CONTACT_NAME": "Carlos" } }'// ENDPOINTS WHATSAPP
// LAYER 03 · WEBHOOKS
webhooks
Eventos en tiempo real. Configura URLs por workspace para recibir notificaciones de mensajes, contactos y conversaciones.
// webhook-receiver.ts (Express)app.post("/plazbot-webhook", express.json(), (req, res) => { const { event, data } = req.body; if (event === "message.received") { console.log(`Nuevo mensaje de ${data.contact.phone}`); } res.status(200).send("ok");});Nota técnica: validación HMAC de firma de webhooks aún no implementada. Recomendamos restringir el endpoint receptor a IPs de Plazbot mientras tanto.
// LAYER 04 · TOOLS
developer stack
Herramientas técnicas para construir y depurar integraciones. Sandbox para probar el SDK y monitor para inspeccionar requests y webhooks en tiempo real.
// SANDBOX
playground react
Entorno interactivo con 6 ejemplos del SDK de React. Edita props, ve cambios en vivo y copia snippets listos para tu app.
- →Vite + React 18 + TypeScript
- →Plazbot UI Kit pre-cargado
- →6 ejemplos production-ready
// INSPECTOR
monitor de api
Inspecciona requests HTTP y entregas de webhooks en tiempo real. Status codes, latencias, payloads y reintentos.
- →Logs de API en vivo
- →Webhooks con replay y retries
- →Filtros por método, status y endpoint
// RUNTIME
workers
Funciones serverless con SDK plz.* para automatizar flujos, conectar APIs externas y ejecutar lógica custom sin infraestructura.
- →SDK plz.* con 8 módulos
- →Tool, Worker, Sync, Schedule, Webhook
- →Deploy desde CLI o dashboard
// EVERYTHING CONNECTS
Una sola plataforma.
Plataforma SaaS, SDK, CLI, Workers, API y agentes IA conectados. Construye sobre cualquier capa.