← Back to home

Polyjuice

Soul-sync AI agents from Farcaster data with local GPU and x402 cryptographic verification.

Problem Statement

🧪 Polyjuice: Soul-Sync AI Powered by Farcaster SnapchainPolyjuice is a modular, Rust-based framework for building soul-aligned AI agents — systems that can think, speak, and evolve like real Farcaster users. Inspired by the Polyjuice Potion in Harry Potter, it enables AI to “become” someone, capturing their tone, reasoning patterns, and digital identity through on-chain data.Live DemoTest it here: https://ai.polyjuice.io/Warning: The API server is currently running on a local rig and exposed through a Cloudflare Tunnel. Uptime and response speed are not guaranteed — expect occasional downtime or latency during heavy computation or local maintenance.

Solution

System ArchitecturePolyjuice is composed of several Rust-based components, each serving a distinct role in the soul-sync pipeline:Module Repository Description Polyjuice Frontend github.com/RyanKung/polyjuice The user interface and orchestration layer for creating and interacting with soul-aligned agents. SnapRAG github.com/RyanKung/snaprag A high-performance RAG (Retrieval-Augmented Generation) engine that vectorizes and indexes Farcaster messages in Postgres via pgvector. Castorix github.com/RyanKung/castorix A CLI and API library for interacting with the Farcaster Snapchain, enabling data synchronization, proof verification, and chain state queries. Rust-x402 github.com/RyanKung/rust-x402 A Rust implementation of the x402 signing and verification protocol used for Snapchain cryptographic primitives.Together, these modules form a complete stack — from data ingestion and vectorization to soul reconstruction and user simulation.Technical HighlightsRust Core — high-performance, memory-safe, parallelized architectureModular Design — independently deployable components for maximum flexibilityPostgres + pgvector — scalable vectorized memory for message embeddingsLocal GPU Acceleration — native GPU support for embedding and RAG computation, without relying on Ollama or any third-party APIsx402 Cryptographic Protocol — full support for Farcaster’s signing and verification standard, implemented in pure RustOn-chain Anchoring — every agent tied to verifiable Farcaster identitySoul Simulation Layer — reconstructs personality and tone from historical cast dataVisionPolyjuice envisions a world where AI agents are not generic assistants, but authentic extensions of human identity — autonomous, evolving, and cryptographically sovereign.“Not just imitation — reincarnation through data.”ComponentsPolyjuice Frontend — interactive UI and orchestratorSnapRAG — RAG and embedding engineCastorix — Snapchain CLI/APIRust-x402 — x402 middleware implementationPolyportal — onchain endpoint router

Hackathon

ETHOnline 2025

2025

Contributors