# Continuum Protocol

Continuum Protocol is a sophisticated decentralized application (dApp) operating on the Solana blockchain. It provides a robust framework for the creation, management, and monetization of advanced AI-driven digital personas. The protocol leverages the Solana Public Library (SPL) for token utilities via `$KIRAI` and integrates seamlessly with the Phantom wallet for secure, non-custodial user authentication and on-chain transactions.

***

### Table of Contents

* Core Technology
  * Stage 1: Analyst AI
  * Stage 2: Persona AI
* System Architecture
* User Tier System
* Key Features
* User Workflow
  * 1\. Wallet Authentication
  * 2\. Persona Creation
  * 3\. Interaction
  * 4\. Persistence (Saving Personas)
* Persona Management
  * The Dashboard
  * The Public Gallery
  * Advanced Features (Premium & Elite)
* Roadmap: Upcoming Features
* Technical Specifications

***

### Core Technology

The protocol's primary innovation lies in its proprietary two-stage neural processing system, which transforms unstructured textual data into interactive, high-fidelity AI personas.

#### Stage 1: Analyst AI

This initial stage performs a deep semantic and psychological analysis on the provided unstructured input. It is engineered to extract and structure complex data points beyond simple keyword matching.

* **Psychological Profiling:** Identifies foundational personality traits and cognitive patterns.
* **Communication Analysis:** Deciphers linguistic style, tone, syntax, and common vernacular.
* **Behavioral Patterns:** Extracts emotional response triggers, decision-making logic, and humor styles.
* **Value Systems:** Infers core values, beliefs, and relationship dynamics from the context of the data.

#### Stage 2: Persona AI

The structured psychological profile generated by the Analyst AI is ingested by the Persona AI. This second stage synthesizes the profile into a nuanced and interactive digital persona, creating a sophisticated prompt architecture that encapsulates the subject's essential character. The result is an AI that emulates *how* an individual thinks, feels, and responds, not just the content of *what* they have said.

### System Architecture

The dApp is designed with a clear separation of concerns, ensuring security and a smooth user experience.

1. **Frontend Interface:** A responsive UI built from scratch with HTML, CSS, and pure node.js.
2. **Wallet Integration:** The `PhantomAuth` class manages all interactions with the Phantom wallet, including connection, authentication, transaction signing, and real-time account monitoring for tier changes in a safe, non-intrusive enviroment.
3. **Backend Services:** A secure backend handles API requests for:
   * AI processing&#x20;
   * User data and persona management
   * Public gallery data&#x20;
   * Solana RPC proxying for secure transaction handling&#x20;
4. **Database:** User and persona data is stored in an encrypted database with daily backups. Access is strictly controlled and authenticated via wallet signatures.
5. **On-Chain Layer:** All value-based transactions, such as saving a persona, are executed as standard SOL transfers on the Solana network. The `$KIRAI` token balance (held or staked) is read directly from the blockchain to determine a user's tier.\
   \
   See The Kira Project documentation: <https://eloria.online/kiradocs/>

### User Tier System

User access levels and daily usage limits are determined by `$KIRAI` token holdings in the connected Phantom wallet. The system tracks balances in real-time and automatically adjusts the user's tier.

| Tier         | Requirement                | Daily AI Operations | Key Features                                                                                     |
| ------------ | -------------------------- | ------------------- | ------------------------------------------------------------------------------------------------ |
| **Standard** | No token holding required. | 30                  | Basic persona creation and interaction.                                                          |
| **Premium**  | Hold 1,000,000+ `$KIRAI`   | 100                 | Access to advanced presets, marketplace trading, persona monetization, and avatar generation.    |
| **Superior** | Stake 1,000,000+ `$KIRAI`  | 200                 | Unlimited creation capabilities, maximum revenue sharing rates, and access to exclusive tooling. |

*Note: Each persona creation or chat interaction consumes one AI Operation.*\
\
*$KIRAI Token Contract:* `HBV58vtGSRWDppXpaER3KCRU2SyH5Z9YPTF92PTwKvzq`\
*Staking Pool:* [*https://app.meteora.ag/stake2earn/DiCfVN851aQbyDohRkeMoKgzRe7F7jwwb42TsjhJP92S*](https://app.meteora.ag/stake2earn/DiCfVN851aQbyDohRkeMoKgzRe7F7jwwb42TsjhJP92S)

### Key Features

* **Wallet-Native Login:** No registration required. Connect your Phantom wallet to begin.
* **Dynamic Tier System:** Features and limits are automatically determined by your `$KIRAI` holdings.
* **Ephemeral & Permanent Personas:** Freely create temporary "ethereal" personas. For a **1 SOL** on-chain fee, a persona can be saved permanently to your private dashboard.
* **Personalized Dashboard:** A private, secure area to manage, search, sort, and interact with your saved personas.
* **Public Gallery & Discovery:** Publish your saved personas for others to try. The gallery includes robust search, filtering, and categorization features.
* **Monetization: (current development)** Earn a share of revenue when other users interact with or permanently save your public personas. Rates are highest for Elite tier users.
* **Learning & Practice System:** A curated collection of preset personas (e.g., Public Figures, Literary Characters) allows users to explore the AI's capabilities before creating their own.

### User Workflow

#### 1. Wallet Authentication

* Connect your Phantom wallet to the dApp.
* The application will automatically read your `$KIRAI` token and staked balances to assign your access tier.

#### 2. Persona Creation

* Navigate to the **AI Persona Studio**.
* Provide a name for the persona.
* Paste any form of unstructured text (messages, conversations, writings, transcripts) into the content field. &#x20;

**2.1 Initiate Analysis:**&#x20;

Upon submission, the **Analyst AI** begins its work. It does not simply read the text; it performs a deep, multi-layered analysis to extract a comprehensive psychological and behavioral blueprint. This includes:

* Psychological patterns and cognitive models.
* Distinct communication styles, syntax, and vernacular.
* Emotional response signatures and triggers.
* Decision-making frameworks and core value systems.
* Subtle markers of humor, sarcasm, and affection.
* Implicit relationship dynamics and worldview.
* **Generate Persona:** The structured, high-dimensional profile from the Analyst AI is then passed to the **Persona AI**. This second stage synthesizes the rich data into a sophisticated and nuanced prompt architecture. The output is not a simple chatbot; it is a complex, interactive entity engineered to authentically embody the subject's foundational essence, capturing *how* they think, feel, and communicate.

#### 3. Interaction

* Once created, you are transitioned to a chat interface to interact with the persona.
* Each message exchange uses one AI Operation.

#### 4. Persistence (Saving Personas)

* Ephemeral (temporary) personas are lost when you navigate away.
* To save a persona permanently, click the "Save to Wallet" button.
* This initiates an on-chain transaction for a **1 SOL** fee.
* Upon successful transaction confirmation, the persona is saved to your encrypted database account, accessible via your dashboard.

### Persona Management

#### The Dashboard

Your personal dashboard provides full control over your saved personas:

* **View & Access:** Load any saved persona for unlimited interaction without consuming daily AI operations.
* **Search & Sort:** Quickly find personas by name or creation date.
* **Management:** Delete personas you no longer need.

#### The Public Gallery

* **Sharing:** From the dashboard, you can toggle a persona's visibility to "Public".
* **Categorization:** Assign a category to your public personas for better discovery (e.g., General, Creative, Professional, Educational, Entertainment, Wellness, Technical).
* **Community Interaction:** Other users can try your public personas with a daily limit of 10 interactions per persona.
* **Revenue:** You earn revenue when another user pays the 1 SOL fee to permanently save your public persona.

#### Advanced Features (Premium & Elite)

* **Avatar Generation:** Premium and Elite users can use an AI operation to generate a unique avatar for their saved personas.
* **Marketplace Trading:** (Premium+) The architecture supports the trading and monetization of high-value personas.

### Roadmap: Upcoming Features

The following features are in active development and scheduled for the next major release:

* **Persona Rentals:** A system allowing users to rent their public personas to others for a specified price and duration. Payments will be settled directly to the owner's wallet.
* **Persona Editor:** A suite of tools to edit, upgrade, or fine-tune existing saved personas, allowing for continuous improvement and refinement.

### Technical Specifications

| Feature                   | Specification                                                                 |
| ------------------------- | ----------------------------------------------------------------------------- |
| **Input Data Limit**      | 8000 characters per persona creation.                                         |
| **Database**              | Fully encrypted with automated daily backups.                                 |
| **Wallet Integration**    | Real-time, read-only tracking of `$KIRAI` and `SOL` balances.                 |
| **Dashboard**             | Includes persona analytics for usage and revenue tracking.                    |
| **Marketplace**           | Full marketplace capabilities are available for Premium and Elite tier users. |
| **$KIRAI Token Contract** | `HBV58vtGSRWDppXpaER3KCRU2SyH5Z9YPTF92PTwKvzq`                                |
| **Persona Save Cost**     | `1 SOL` (on-chain transaction)                                                |
