AI platform for research, creation, and exploration.
A conversation-first interface that expands into a multi-step research agent, generative UI for inline data and maps, and a canvas workspace that compiles single-file React artifacts live.
Polymorph end to end — canvas artifacts, generative UI, conversational workflows, and the evals dashboard. View the high-resolution video on GitHub.
- Canvas artifacts — generates and previews single-file React apps with live editing
- Multi-step research agent — searches the web, reasons across sources, and synthesizes answers
- Generative UI — tables, charts, geo maps, timelines, citations, callouts, and link previews render inline
- Three conversation modes — Search, Research, and Build share one chat surface with intent-aware prompting
- Geo intelligence — interactive maps, real directions, reachability polygons, and static map images
- Multi-provider AI — GLM-5.3 Flash/GLM-5.3 via OpenRouter for text, Meta Muse Image via Vercel AI Gateway for inline generation, plus direct OpenAI, Anthropic, Google, OpenAI-compatible, and Ollama providers
- Voice mode — speech input and text-to-speech playback
- Configurable guest access — optional instant search without sign-up, rate-limited per IP in cloud deployments
- RLS-keyed multi-tenant Postgres — every user-scoped table is protected by Row-Level Security policies keyed on a per-request session GUC, set through
withRLS/withOptionalRLS(lib/db/with-rls.ts) - Generative UI as typed message parts — ~15 display, canvas, and image tools stream structured output that renders as tables, charts, maps, timelines, and interactive widgets (
lib/tools/*,components/tool-ui/*) - Single-artifact canvas — one React app compiled server-side to a persisted, versioned single-file HTML document and served client-side via
iframe.srcdoc, with HMAC-SHA256-signed guest edit tokens that rotate on every write (lib/canvas/*) - 9-evaluator LLM-judge pipeline — 3 deterministic + 6 LLM-judge evaluators run against Phoenix experiments, including a weekly regression canary on Railway cron (
services/evals) - End-to-end OpenTelemetry tracing — every LLM call and tool invocation is traced into Arize Phoenix, with production span-content masking (
instrumentation.ts,lib/utils/telemetry.ts)
- Quickstart Guide — local setup, Supabase, auth, and a guided first search
- Architecture Overview — system design, data flow, tech stack
- Geo & Spatial Tools — geocoding, directions, isochrones, static maps, and
displayGeoMap - Environment Reference — all environment variables
- Deployment Guide — Vercel deployment and production config
- Contributing Guide — development workflow and quality gates
- API Reference — chat API endpoint and schemas
Three-agent chat system with generative UI · See architecture overview for the full breakdown.
Offline LLM-judge pipeline · Railway cron → Phoenix experiments → Postgres dashboard.
- Canvas is one artifact per chat —
createCanvasArtifact/updateCanvasArtifact/readCanvasArtifactare only registered when a chat has an active canvas context; there's no multi-artifact workspace yet - OpenRouter/Z.ai is the default text provider — GLM-5.3 Flash/GLM-5.3 via OpenRouter, with direct OpenAI, Anthropic, Google, OpenAI-compatible, and Ollama providers supported for self-hosted or BYO-key setups
- Deferred dependency upgrades — Vitest 5,
@vitejs/plugin-react6, and ESLint 10 were attempted and rolled back (ESLint 10 is blocked oneslint-plugin-reactcompatibility); TypeScript 7 and the Drizzle ORM v1 beta are also not yet adopted - Evals cron runs a low-cost weekly canary by default — the scheduled Railway cron replays a single synthetic regression case; full capability/traffic-monitor suites are triggered on demand from the Railway dashboard
Polymorph is derived from miurla/morphic under the Apache-2.0 license. See LICENSE for details.