All projects

Crett

AI-powered Chainlink CRE workflow generator, describe your automation, get deploy-ready code.

CRE & AI

What it is

Crett is an AI-powered tool that lets developers generate, simulate, and deploy Chainlink CRE (Chainlink Runtime Environment) workflows using plain English.

The Problem: Writing CRE workflows requires deep knowledge of the CRE SDK, specific import patterns, Zod config schemas, consensus aggregation types, EVM client setup, and more. The learning curve is steep and errors during simulation are hard to diagnose.

 How It Works:
 1. User describes what they want (e.g. "Monitor ETH price every 30s, POST to webhook if it drops below $2000")
 2. The backend queries a RAG service that retrieves relevant Chainlink CRE documentation chunks from Supabase pgvector (embedded with Gemini)
 3. The LLM (Z.AI GLM-4.7) uses that context to generate fresh, correct TypeScript CRE workflow code
 4. User clicks Simulate, the backend writes the code to a local CRE project and runs cre workflow simulate via CLI, streaming live logs back to the frontend
 5. An autonomous Agent Panel monitors live market data (ETH/BTC/LINK from CoinGecko + onchain Chainlink price feeds on Base Sepolia) and recommends workflow adjustments
 6. User can Debug, Fix, or Deploy, all from the same IDE-style dashboard

 What It Solves:
 - Eliminates the trial-and-error of writing CRE workflows from scratch
 - Surfaces real CRE documentation at generation time via RAG
 - Provides a full workflow IDE: code editor, terminal, market feed, agent, in one UI
 - Makes CRE accessible to developers who are new to Chainlink automation

Demo link: https://crett-one.vercel.app/

How it Works

Crett is a three-service monorepo. The frontend is built with Next.js 16 and React 19, using Monaco Editor for the in-browser code editor, RainbowKit + wagmi for wallet connection, and TailwindCSS with Radix UI for styling. A dedicated RAG microservice scrapes 92 pages from the Chainlink CRE documentation, chunks them into 732 overlapping segments, embeds them using Google Gemini (gemini-embedding-001, 768 dims), and stores the vectors in Supabase pgvector with an HNSW index for fast cosine similarity search. At generation time, the backend queries the RAG service, retrieves the top 4 most relevant doc chunks, and injects them into the LLM system prompt to ensure the model has accurate, up-to-date CRE SDK context. The LLM itself is Z.AI GLM-4.7, accessed via an OpenAI-compatible API. The backend is Express.js + TypeScript and handles workflow generation (streamed via SSE), simulation (by spawning the cre workflow simulate CLI as a child process and streaming its stdout), debugging, code analysis, and an autonomous agent that ingests live market data from CoinGecko and onchain Chainlink price feeds on Base Sepolia to make context-aware workflow recommendations.

Links

Created by

  • Mutiara Setya Rini
  • Muhamad Harfi Ibadurahman