# CPU AI — Official Documentation
**Version:** 0.1 (Public product documentation draft)  
**Last updated:** October 23, 2026  
**Website:** https://cpuai.site/  
**Repository:** https://github.com/trantanlong2411-droid/CPU  
**Language policy:** Website documentation and interface are in English. CPU AI aims to answer in the language used in each user's question.

> **Read before using:** CPU AI is an actively developed AI coding workspace. The public free chat, browser-based development tools and experimental features described below have different levels of functionality. No on-chain token distribution, AI-powered autonomous code execution, token-holder privileges or financial rewards are live.

## 1. Overview — what we are building

**CPU AI (Coding Power Unit AI)** is a developer workspace that helps people turn ideas into understandable, reviewable software work. Today it combines a Google-connected free AI chat, coding project editor, code inspection tools, a lightweight agent configuration studio, a planning workflow builder and a personal dashboard.

We are **not yet** a fully autonomous coding agent, hosted IDE, Github write-back service or a blockchain launchpad. CPU emphasizes human review before any future automated changes.

### Product pillars
- **Accessible AI:** A simple Google sign-in and a small free AI allowance. No personal AI API key is required for the Free AI product.
- **Practical developer tools:** Work with local files, review code, inspect public repositories and compare changes before using them.
- **User control:** Keep editable project work local unless you explicitly share a prompt with AI; avoid executing or committing changes without explicit approval.
- **Transparent capabilities:** Clearly distinguish live browser utilities from optional operator features and roadmap proposals.
- **An open ecosystem in the future:** Optional agent sharing, collaborative bounties and governance, if developed and reviewed.

## 2. Mission, vision and values

**Mission:** Make trustworthy AI-assisted development approachable, affordable and understandable for builders at different skill levels.

**Vision:** An AI development hub where users can move from a question to a reviewable implementation, work across coding tools and eventually collaborate with specialist agents and a community — while retaining approval over their source code.

**Values:** Clarity over hype; privacy-aware design; understandable outputs; cost transparency; human review; honest product status.

**Tagline (proposed):** Build Smarter. Create Faster.

## 3. Features and availability

| Feature | Status | What it actually does |
| --- | --- | --- |
| Home / AI prompt entry | Available in code | Creates a browser-only draft and opens Free AI; it does not auto-send |
| Google account sign-in | Operationally confirmed | Verifies Google sign-in and creates a CPU account |
| Free AI Chat | Operationally confirmed | Calls Cloudflare Workers AI, up to 5 messages per Google account per UTC day |
| Conversation history | Available in code; needs D1 migration | Stores/reopens account-scoped conversation snapshots |
| Developer Dashboard | Available in code | Shows account quota, recent conversations and local workspace shortcuts |
| Project Workspace | Available in code; cloud sync needs D1 migration 0002 | Browser-based editing plus optional Google-account cloud copies (8 projects/account) |
| Repository Analyzer | Available in code | Read-only exploration and basic rule-based checks for **public** GitHub repos |
| Patch Review | Available in code | Compares changed line positions in two pasted versions; does not apply patches |
| Agent Studio | Available in code | Creates and exports agent instruction profiles; no agent execution |
| Workflow Builder | Available in code | Generates a multi-agent handoff plan from templates; no model invocation |
| Code Inspector | Available in code | Runs heuristic checks on pasted JS/TS code in the browser |
| GitHub Issue Explorer | Available in code | Lists public open issues from GitHub; read only |
| Model provider presets | Configuration only | Labels for provider settings; not live API connections |
| Operator AI Chat | Restricted preview | Separate OpenAI-backed route requiring operator secrets and access code |
| Private GitHub editing, autonomous coding, PR creation | Planned | Not live |
| Bounties, token voting, token-gated credits | Concept stage | Not live |
| $CPU token | Proposed, not verified as deployed | No official contract or chain has been confirmed |

Availability in code does not by itself confirm the latest production deployment.

## 4. Start here: your first AI conversation

1. Open **[Free AI Chat](/free-ai/)** or type a prompt on **[Home](/)**. A Home prompt is carried over as a draft, **not automatically submitted**.
2. Select **Sign in with Google**. Your Google account authenticates your CPU profile; it does **not** provide a free Google Gemini API allowance.
3. The account sidebar should show your name and today's free messages.
4. Type a coding question or choose a prompt suggestion (review code, plan an app, debug an API).
5. Optionally attach a small text/source file. Remove confidential code and credentials first.
6. Click **Send message** (or Ctrl/Cmd + Enter). The message is sent to CPU's backend and processed by Cloudflare Workers AI.
7. Read the answer, review any code, and use **Copy code**, **Copy message** or **Export .md**.
8. Choose **New chat** for a separate topic. If the history database is configured, your latest conversation can be reopened later.

**Free quota:** 5 model requests per account per UTC day; resets at **00:00 UTC**. This is an application-level quota, not a promise of guaranteed inference capacity. All users share the Cloudflare Workers AI allocation; requests can fail if capacity or provider limits are reached. Answers may be inaccurate, especially when reviewing security-sensitive code.

**File handling:** Free AI accepts small text/source file attachments (maximum **10 KB**) and includes up to **1,700 characters** of the selected file. Requests are capped at **2,500 characters per message**; shorten the prompt if needed. Attachment content is sent only when you explicitly click Send.

**Saved conversations:** If the `conversations` table exists in Cloudflare D1, the service saves a limited conversation snapshot (up to the 8 most recent messages), displays recent sessions and lets you delete them. History may be unavailable until the migration is applied; a successful AI answer does not guarantee history was saved.

## 5. Home — AI prompt launcher

1. Open **[Home](/)**.
2. Enter your prompt in the main AI input or select a starter suggestion.
3. Choose **Start with AI**. CPU opens the Free AI page and pre-fills your draft.
4. Sign in if necessary, review the draft and click **Send message**.

Home is an entry point, not a separate model. It does not use your quota just by entering text.

## 6. Developer Dashboard

1. Open **[Dashboard](/dashboard/)**.
2. Sign in through Free AI if your account is not yet active.
3. Check the daily quota and verified account status.
4. Use the shortcut tiles to open the right tool for your task.
5. Use **Recent conversations** to resume a chat, when conversation history is configured.
6. Check the **Local workspace** panel for browser-saved project files and agent profiles.

Workspace files and agent templates are counted **on this device only**; they do not automatically sync to your Google account.

## 7. Project Workspace — multiple source files

1. Open **[Project Workspace](/workspace/)**.
2. Enter your project name.
3. Use **Add file** to create a file, or **Import files** to load existing text/source files.
4. Select a file in the left list, then edit its contents in the code editor.
5. Use **Save locally** to store the project in your browser; **Load saved** restores that browser copy.
6. Use **Export JSON** to download a portable project snapshot.
7. Choose **Copy code** to copy the selected file, or **Copy AI review prompt** to prepare a short code review prompt.
8. Paste the copied prompt into **Free AI Chat** if you prefer to use the full chat interface. Copying the prompt does not itself call AI.

### Analyze a file directly in Workspace

1. Open **[Project Workspace](/workspace/)** and select a source file from the file list.
2. In the **Ask AI about this file** panel, choose **Code Review**, **Explain**, **Debug**, **Security** or **Improve**.
3. Optionally enter a question in your own language. The site's interface stays in English, while the assistant aims to reply in the language of the question.
4. Click **Preview request**. Review the exact code excerpt before sharing it; only up to 1,700 source characters are included and larger files are truncated.
5. Click **Analyze with CPU AI** and explicitly confirm sending the excerpt. This uses the existing Google account session and one daily free AI message on successful inference.
6. Read the response in Workspace, copy it, or choose **Continue in Free AI** if a saved conversation is available.
7. CPU does not modify, execute or deploy your project as a result of this analysis.

**Safety:** Previewing, editing and importing do not send content to AI. Sending requires an explicit confirmation. Do not submit sensitive source code, API keys or credentials. CPU AI suggestions require manual review.

**Limits:** maximum **12 files** per project; **15 KB per file**. Browser-local copies may disappear when storage is cleared; export backups frequently. CPU does not execute, test, build or deploy code from this editor.

### AI Patch Draft — review and approve a suggested code change

This feature is **local to the browser editor** and is not an automated GitHub pull request or deployment.

1. Open **[Project Workspace](/workspace/)** and choose a source file.
2. Highlight a precise code snippet in the file editor (**8–800 characters**). Click **Capture selected code**.
3. Optionally describe the desired change (maximum 200 characters), then click **Preview AI request** to inspect what will be shared.
4. Click **Generate replacement** and confirm sending the selection to CPU AI. One successful response counts against your regular **5 free messages/day**.
5. AI may return a proposed replacement inside a single fenced code block. Review and edit the **Proposed replacement** textbox before accepting it. If the model's output is incomplete or contains only explanation, manually paste the intended replacement; CPU will never apply a partial reply automatically.
6. Click **Compare draft** to inspect a local before/after diff.
7. Click **Approve & apply to editor** and confirm. CPU only replaces the captured snippet, not the entire file.
8. Use **Undo last apply** if the file has not changed since the application. Then review the complete file, run your own tests, and explicitly save locally, export JSON, or choose Cloud Save when ready.

**Safety guarantees:** No code is changed before approval. The patch engine refuses to apply when the source file has changed or switched, the output would exceed the 15 KB Workspace file limit, or the proposal was modified after comparison. Applying is browser-local and does not execute code, write to Cloudflare D1, change GitHub, or deploy a website. A generated replacement is not guaranteed to be correct and should always be tested. The tool supports up to **5,000 characters** in a proposed replacement.

### Cloud Project Sync (optional, requires migration 0002)

1. Sign in with Google using **Free AI**, then open **Project Workspace**.
2. Create/edit files locally as usual. Click **Save new cloud copy** to intentionally upload your project to the Google-account-scoped Cloudflare D1 storage.
3. Open Project Workspace on another device and sign in with the **same Google account**.
4. Click **Refresh list**, then **Open** next to the cloud project you want. A confirmation warns that the current editor content will be replaced.
5. Edit as needed and click **Save changes**. If the project was updated on another device in the meantime, the version check blocks the overwrite so you can reconcile changes.
6. Click **Delete** next to an uploaded cloud project to delete that cloud copy. Local browser files and exported backups are not deleted.

Cloud storage is limited to **8 projects per Google account**. It is **opt-in, not end-to-end encrypted**, and should not be used for passwords, private keys or confidential source code. Save/import locally does not upload anything. Cloud sync requires the `cloud_projects` table created by `migrations/0002_cloud_projects.sql` and a successful deployment.

## 8. Repository Analyzer — inspect a public repository

1. Open **[Repository Analyzer](/repo-analyzer/)**.
2. Enter a **public** GitHub repository in the form `owner/repo` (for example `cloudflare/workers-sdk`).
3. Click **Explore**. CPU reads the repository tree through GitHub's public API.
4. Filter the displayed paths and select a supported source file.
5. Read the file preview and choose **Scan code** for transparent heuristic findings.
6. Use **Export report** to download the results for manual review.

**Limits:** up to **300** eligible source files are listed; files larger than **200 KB** are skipped. GitHub may rate-limit requests. Private repositories cannot be read by this public, unauthenticated feature. Scanning is rule-based and is neither a comprehensive audit nor an AI review. No GitHub write operations occur.

## 9. Code Inspector — quick JS/TS checks

1. Open **[Code Inspector](/#inspector)** on the Home page.
2. Paste a small JavaScript or TypeScript snippet into the input area.
3. Click **Review snippet**.
4. Review the flagged line numbers, risk categories and remediation suggestions.
5. Click **Clear** to remove the snippet from the current input.

The inspector searches for selected patterns such as dynamic evaluation, hardcoded credentials, unsafe HTML assignment and insecure URLs. It runs locally in your browser and is not a replacement for a security audit; false positives and missed issues are possible.

## 10. Patch Review — compare before and after

1. Open **[Patch Review](/patch-review/)**.
2. Paste the **Original code** in the first box.
3. Paste the **Proposed code** in the second box.
4. Click **Compare changes** to see changes at corresponding line positions.
5. Use **Export comparison** to download the review.
6. Independently run tests and apply approved changes in your own editor.

**Limit:** up to **1,500 lines** per version. This is a simple line-position comparison, **not** a complete unified diff algorithm, patch application engine or Git commit workflow. Inserted lines may shift later positions.

## 11. Agent Studio — define reusable agents

1. Open **[Agent Studio](/#studio)**.
2. Select a template: Developer, Security Reviewer, Debugger, Architect or Custom.
3. Set the agent name, provider preset and model identifier.
4. Edit the instructions to describe goals, inputs, permissions and required output.
5. Click **Generate profile** to preview Markdown instructions.
6. Choose **Save locally** to store a template in this browser or **Download .md** to export it.
7. Load a saved template when you want to reuse or adjust it.

**Important:** Choosing OpenAI, Gemini, Ollama or any other provider in Agent Studio does **not** connect to that provider. This feature produces a reusable configuration document and does not run an agent.

## 12. Workflow Builder — plan a multi-agent process

1. Open **[Multi-Agent Workflow Builder](/#workflow)**.
2. Describe the project goal in plain language.
3. Choose a technology stack (such as Cloudflare Workers, React or Python).
4. Click **Build workflow**.
5. Review the handoff plan: Architect → Developer → Security Reviewer → Debugger/QA → Human Approval.
6. Use **Download workflow** to keep the planning document.

This is a structured, browser-generated plan, not a live conversation between collaborating AI agents.

## 13. Public GitHub Issue Explorer

1. On Home, find **Open-source issue explorer**.
2. Enter a public repository name such as `cloudflare/workers-sdk`.
3. Click **Load open issues**.
4. Select an issue to view it on GitHub.

The tool is read-only and uses GitHub's public REST API; it does not create issues or make pull requests.

## 14. Model settings and Operator AI Chat

The Models area lists potential AI providers and local runtimes. These are **configuration presets**, not proof that every listed model is available to CPU Free AI.

**Free AI:** Google sign-in, CPU backend and Cloudflare Workers AI; users do not enter AI API keys.

**Operator AI Chat:** **[Operator AI](/ai-chat/)** is a separate restricted experiment requiring an operator access code and configured server-side OpenAI API key. It is **not** the free public chat and should not be offered to untrusted users without per-user authentication, rate limiting and cost controls.

## 15. CPU AI architecture and data

- **Frontend:** Cloudflare Worker static assets; English interface, responsive Light/Dark Mode, HTML/CSS/JavaScript.
- **Identity:** Google Identity Services sign-in; the backend verifies Google ID tokens and issues a CPU session cookie.
- **Inference:** Free AI uses a Cloudflare Workers AI binding (currently Llama 3.1 8B in the repository); the model can change as the service evolves.
- **Database:** Cloudflare D1 stores account details and daily quotas, plus saved conversation snapshots if that table was deployed.
- **Local browser storage:** Workspace local copies, agent templates and appearance preferences. **Optional cloud storage:** Only projects explicitly uploaded via Cloud Project Sync are stored in Cloudflare D1.
- **GitHub:** public read-only API queries for code inspection and issues.
- **No autonomous execution:** the current website cannot install dependencies, edit private GitHub repositories, run code in a sandbox or deploy changes automatically.

**Privacy and safety:** Do not paste private keys, passwords or other sensitive information into chat. Submitted messages are processed by the AI provider; saved histories may be retained in CPU D1. Delete saved conversations through the UI where supported. Review all generated code before use.

## 16. Roadmap — staged, not promised dates

The phases below describe development direction rather than committed release dates.

### Phase 1 — Foundation (implemented in the repository)
Responsive interface, Light/Dark Mode, Google Login, free Workers AI chat, quotas, personal dashboard, basic code tools and project/agent templates.

### Phase 2 — Product usability (implemented in code / needs production validation)
Better AI workspace interface, account-scoped history after D1 migration, code file attachments, quick review prompts, consistent Docs and easier navigation.

### Phase 3 — Connected development (in progress / planned)
Initial opt-in cloud project saving (implemented in code, requiring D1 migration); secure GitHub authentication for user-approved private repository access, project-level AI context, accurate diffs, tests and review tools, and pull-request creation only after explicit permission (planned).

### Phase 4 — Agent execution (planned)
Isolated execution sandbox, scoped terminal/file permissions, multi-agent orchestration, audit logs, limits and developer approval before mutations.

### Phase 5 — Community and optional token utility (research / proposal)
Community contribution system, transparent bounties, optional token-based participation and governance mechanisms where technically, legally and economically feasible.

**Release criteria:** security testing, billing/abuse controls, privacy disclosures and production validation matter more than fixed launch dates.

## 17. $CPU — proposed token concept

**Ticker:** $CPU (proposed)  
**Status:** **Concept / not launched or verified in this project documentation**  
**Blockchain/network:** Not confirmed for this project  
**Official contract address:** **Not announced**  
**Total supply, decimals, fee/tax, liquidity, allocation and launch date:** **Not specified**  
**Current token requirement:** **None** — Free AI currently uses Google sign-in, not token holdings.

CPU AI may explore a token as an *optional ecosystem utility*, **not** as a prerequisite for basic access.

### Proposed utilities (not active)
1. **Optional advanced compute credits:** Redeem $CPU for clearly priced extra AI analyses or advanced workflows if a metered backend and transparent pricing are implemented. This would not imply unlimited compute or free third-party infrastructure.
2. **Agent ecosystem:** Potential payments for optional agent templates, tools or marketplace services where creators opt in.
3. **Community governance:** Potential participation in defined roadmap or community decisions, with on-chain verification only after governance rules and contracts exist.
4. **Developer bounties:** Potential funding or recognition for verifiable code contributions, subject to review, anti-abuse rules and a real treasury.
5. **Feature access:** Optional access to premium experimental modules, while preserving an independently defined free user tier.

### Token policy and transparency
- No claim of a deployed token, sale, airdrop, staking pool, guaranteed price, dividend, creator-fee revenue sharing or investment return is made here.
- Holding $CPU does **not** presently increase your AI quota, unlock private GitHub tools or confer governance rights.
- Token utilities, if introduced, will require specific implementation milestones, published tokenomics, security review and applicable legal/compliance assessment.
- **Never send funds to an unverified “CPU” contract.** Only use official links after an address has been publicly confirmed and independently verified.
- Product functionality will be tracked separately from token marketing.

## 18. FAQ

**Is CPU AI free?** The present Google-linked Free AI tier provides up to 5 messages per account each UTC day, subject to provider capacity. Other public browser utilities generally require no AI credits.

**Do I need an OpenAI or Gemini API key?** Not for Google Free AI. Google sign-in handles account identity; CPU provides access to its configured AI backend.

**Does CPU execute code or change my repository?** No. Existing browser tools prepare, inspect or compare content. Any autonomous execution or write-back feature is future work.

**Can CPU read my private GitHub repository?** Not through the current public Repository Analyzer. It is limited to public data.

**Are my project files saved on the server?** Local Save stores files in your browser. If you click a cloud save button, a separate copy is uploaded to CPU D1 under your Google account and can be deleted there. This is opt-in and distinct from chat history.

**Why did chat history disappear?** A cleared browser session, missing D1 history migration, unsaved conversation, or different account may explain it. CPU should show a warning when history cannot be saved.

**Is $CPU required to use Free AI?** No. The token is only a proposed optional ecosystem component at this stage.

**Where can I report a problem?** Email [support@cpuai.site](mailto:support@cpuai.site) for CPU AI product support or privacy requests. This address receives messages through Cloudflare Email Routing.

---

**Product notice:** Documentation reflects repository features and the operator's reported functioning Google Login/AI Chat as of October 22, 2026. Production rollout and availability can differ by deployment. Roadmap and token ideas may change. This document is product information, not financial or legal advice.
