Skip to content

Suhaib3100/cf_ai_percify_avatar_copilot

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

236 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽญ Percify Avatar Co-Pilot

Your AI assistant that remembers who you are.

Percify Chat Interface

Percify Avatar Co-Pilot is an AI-powered assistant built on Cloudflare's edge network that maintains a persistent persona for each user. It remembers your preferences, stores your notes, and adapts to your communication style.

๐Ÿš€ Live Demo: cf-ai-percify-avatar-copilot.suhaibking310-47d.workers.dev

๐ŸŒ Documentation: docs.percify.io


โœจ Features

Feature Description
๐ŸŽญ Persistent Avatar Create your AI persona with custom name, bio, tone & expertise
๐Ÿง  Memory Storage Save preferences, tasks, and notes that persist across sessions
๐Ÿ“š Documentation Search Query docs.percify.io for help and guides
๐ŸŽจ 4 Tone Styles Casual, Professional, Playful, or Technical
โšก Edge-Powered Runs on Cloudflare Workers for global low-latency
๐Ÿ“… Task Scheduling Schedule reminders and recurring tasks

๐Ÿ“ธ Screenshots

Chat Interface

Percify Chat

Avatar & Memory in Action

Docs Ai copliot


๐Ÿš€ Quick Start

1. Install Dependencies

npm install

2. Run Locally

npm start

Opens at http://localhost:5173

3. Deploy to Cloudflare

npm run deploy

๐ŸŽฎ Usage Examples

Create Your Avatar

"Set my avatar as Alex, a senior developer who loves TypeScript"
"Change my tone to professional"
"My expertise is React, Node.js, and DevOps"

Store Memories

"Remember that I prefer dark mode"
"Note: project deadline is Friday"
"Don't forget I'm working on the Percify project"

Search Documentation

"What is Percify?"
"How do memories work?"
"What tones are available?"
"How do I schedule tasks?"

Schedule Tasks

"Remind me in 1 hour to check deployment"
"Schedule daily standup at 9am"

๐Ÿ› ๏ธ Available Tools

Tool Description
saveAvatarProfile Create/update your avatar (name, bio, tone, expertise)
saveMemory Store preferences, tasks, or notes (max 50 items)
researchWeb Search docs.percify.io documentation
getAvatarState View current avatar and recent memories
scheduleTask Schedule tasks for later
getScheduledTasks List all scheduled tasks
cancelScheduledTask Cancel a scheduled task

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Cloudflare Edge Network                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                 โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚   โ”‚   React UI   โ”‚โ—„โ”€WSSโ”€โ”€โ–บโ”‚     PercifyAvatarAgent          โ”‚ โ”‚
โ”‚   โ”‚   (Vite)     โ”‚         โ”‚     (Durable Object)            โ”‚ โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚                                 โ”‚ โ”‚
โ”‚                            โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ Avatar Profile              โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ โ€ข displayName, bio          โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ โ€ข tone, expertiseTags       โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚ โ”‚
โ”‚                            โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ Memory Storage (50 max)     โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ โ€ข tasks, preferences, notes โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚ โ”‚
โ”‚                            โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ docs.percify.io Search      โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ”‚ โ€ข 10 documentation topics   โ”‚โ”‚ โ”‚
โ”‚                            โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚ โ”‚
โ”‚                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚                                          โ”‚                     โ”‚
โ”‚                            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚                            โ”‚        Workers AI               โ”‚ โ”‚
โ”‚                            โ”‚  @cf/meta/llama-3.3-70b-        โ”‚ โ”‚
โ”‚                            โ”‚  instruct-fp8-fast              โ”‚ โ”‚
โ”‚                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Project Structure

โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ screenshot01.png    # Chat interface screenshot
โ”‚   โ””โ”€โ”€ screenshot02.png    # Avatar demo screenshot
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app.tsx             # React chat UI with avatar header
โ”‚   โ”œโ”€โ”€ server.ts           # PercifyAvatarAgent (Durable Object)
โ”‚   โ”œโ”€โ”€ tools.ts            # Tool definitions
โ”‚   โ”œโ”€โ”€ client.tsx          # React entry point
โ”‚   โ””โ”€โ”€ styles.css          # UI styling
โ”œโ”€โ”€ wrangler.jsonc          # Cloudflare Workers config
โ”œโ”€โ”€ PROMPTS.md              # AI prompts documentation
โ””โ”€โ”€ README.md               # This file

๐Ÿ“š Documentation Topics

The built-in docs.percify.io search covers:

Topic Description
Getting Started First-time setup guide
Avatar Guide Creating and customizing your avatar
Memory System How memories work and limits
Tone Customization Available tone styles
Expertise Tags Adding your areas of expertise
Tools Reference All available commands
Scheduling Reminders and recurring tasks
Architecture Technical implementation details
API Reference REST and WebSocket endpoints
Troubleshooting Common issues and fixes

โš™๏ธ Tech Stack

  • Runtime: Cloudflare Workers
  • State: Durable Objects + SQLite
  • AI Model: Workers AI (Llama 3.3 70B)
  • Frontend: React + Vite
  • Realtime: WebSockets
  • SDK: Cloudflare Agents SDK

๐Ÿ“‹ Requirements

  • Node.js v18+ (v20 recommended)
  • Cloudflare account with Workers AI
  • npm or pnpm

๐Ÿงช Test Plan

  1. Avatar Setup: "Create my avatar as Alex with professional tone"

    • โœ“ Header shows name and tone badge
  2. Memory Storage: "Remember I prefer TypeScript"

    • โœ“ Memory saved, context updated
  3. Documentation Search: "What is Percify?"

    • โœ“ Returns docs.percify.io content
  4. Tone Change: "Change tone to playful"

    • โœ“ Responses adapt to new tone
  5. Persistence: Refresh page

    • โœ“ Avatar and memories restored

๐Ÿ“„ License

MIT License - see LICENSE


Built with โค๏ธ on Cloudflare Workers

About

Percify Avatar Copliot (From cloudfare agents starter)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.9%
  • CSS 8.0%
  • HTML 1.1%