explaingit

vickman787/citeflowai

Analysis updated 2026-05-18

28TypeScriptAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

An AI research assistant that pays content creators small automatic royalties whenever it uses their work in an answer.

Mindmap

mindmap
  root((CiteFlow AI))
    What it does
      Research agent
      Pays creators per citation
      Refunds unused budget
    Tech stack
      Next.js
      Supabase
      Circle Wallets
      Gemini and Claude
    Use cases
      Grounded research answers
      Register articles for payment
      Reusable payment primitives
    Audience
      Web3 builders
      Content creators
    Payment flow
      Budget escrow
      Metered citation payments
      Dynamic refunds

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Ask research questions and get answers grounded in sources that automatically pay their creators.

USE CASE 2

Register your own articles so an AI agent can cite and pay you when it uses them.

USE CASE 3

Reuse the research agent, wallet API wrapper, and treasury code to build your own pay-per-call AI service.

USE CASE 4

Track live payment activity and citation earnings through the dashboard.

What is it built with?

TypeScriptNext.jsSupabaseCircle WalletsGeminiClaude

How does it compare?

vickman787/citeflowaiajr-khll/ghostty-config-cliaudemodo/audemodo-responsive-keepalive
Stars282828
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity4/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires API keys for Supabase, Gemini, Anthropic, and Circle Web3 Services before it runs.

Use, modify, and distribute freely, including for commercial purposes, as long as you keep the copyright notice.

In plain English

CiteFlow AI is a research assistant that answers questions and pays content creators automatically whenever it uses their work to build an answer. It was built to solve a specific problem: when an AI agent reads and summarizes someone's writing, the original writer usually gets nothing in return. This project tries to fix that by attaching real, tiny payments to each answer. Here is how the payment side works. A user connects a Circle wallet and locks a small budget upfront, for example fifty cents, before asking a question. As the AI researches an answer, it checks which registered articles it actually drew from. Each time it uses a specific creator's work, it sends that creator a very small payment, for example five cents, straight from the locked budget. The service itself takes a small fee to cover the cost of running the AI. If a question turns out to be simple and no paid sources were needed, the AI refunds the entire budget back to the user automatically. On the technical side, logging in feels like an ordinary email signup, but behind the scenes it creates a Circle wallet and links it to a Supabase account, so users get a familiar login experience while still holding their own wallet. Research history and answers are saved per user and follow them across devices. For generating answers, the system primarily uses Gemini 2.5 Flash, and automatically switches to Claude Haiku through the Anthropic API if it hits a rate limit, so the service keeps working even under load. It also uses retrieval and vector search through Supabase to find relevant registered sources quickly. The project exposes reusable pieces of code, including a research agent script, a wrapper for Circle's wallet API, and a treasury module that manages the budget and refund logic, so other builders can adapt the same pay-per-question pattern for their own AI tools. It is written in TypeScript, built on Next.js, and released under the MIT License.

Copy-paste prompts

Prompt 1
Explain how the Pay-Per-Prompt budget escrow and refund system works in CiteFlow AI.
Prompt 2
Help me set up the environment variables needed to run CiteFlow AI locally with Supabase and Circle.
Prompt 3
Walk me through how research-agent.ts decides which sources to cite and pay in this project.
Prompt 4
Show me how to adapt treasury.ts to add micro-payments to my own AI application.
Prompt 5
Explain the fallback from Gemini 2.5 Flash to Claude Haiku in this codebase.

Frequently asked questions

What is citeflowai?

An AI research assistant that pays content creators small automatic royalties whenever it uses their work in an answer.

What language is citeflowai written in?

Mainly TypeScript. The stack also includes TypeScript, Next.js, Supabase.

What license does citeflowai use?

Use, modify, and distribute freely, including for commercial purposes, as long as you keep the copyright notice.

How hard is citeflowai to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is citeflowai for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.