Inspiration

Movie Her

What it does

AI girlfriend agent is a digital AI twin ( an AI copy of a real girl) that is prompted for companionship. Its an AI agent trained on the user generated data from Instagram, X & telegram with a perfect voice copy (via ElevenLabs pro), that is able to have meaningful conversations with its user via chat and Voice, as well as manage its own twitter page.

How we built it

We've created a scalable platform for digital twin creation with modular architecture and flexible integration system:

  • Backend: NestJS as API Gateway with modular architecture
  • AI/LLM: Abstraction over various providers (OpenAI, NEAR AI). Structured data capabilities (Zod integration)
  • Chat System: ChatBotKit for dialogue management
  • Database: PostgreSQL with TypeORM
  • Integrations: Twitter API, Telegram API, NEAR.ai, Apify, Mailchimp
  • Modular system with microservices migration capability
  • Flexible component replacement for business requirements
  • Independent modules for each functional block
  • Unified API Gateway for request management
  • Abstraction over LLM providers for flexible model switching

Digital Twin Creation Process:

  1. Flexible Authentication

    • Apple ID
    • Google OAuth
    • Magic Link (email)
    • NEAR wallet
  2. Data Source Connection

    • Twitter via OAuth
    • Telegram as data source
    • Instagram archives
    • Token validation and storage
  3. Data Processing

    • Message and post extraction
    • Multi-level content filtering
    • Text data preprocessing
  4. Digital Twin Creation

    • Data analysis through selected LLM provider
    • System instruction generation for chatbot
    • Unique backstory creation
    • Ability to merge multiple twins into one with new backstory and avatar generation
  5. NEAR.ai Integration

    • Secure system prompt retrieval via secret keys
    • Easy fork setup through environment variables
    • Flexible access and permission system

The system is designed for scalability and easy integration of new features and services, including the ability to quickly switch between different LLM providers.

Challenges we ran into

None

Accomplishments that we're proud of

Perfect voice clone

What we learned

That we're awesome

What's next for AI Girlfriend Agent

Token, Video twin and stabledifusion image generation with Faceswap feature of NFTs/collectibles. A platform where anyone can launch their own AI gf/bf, as well as purchase/rent personality and voice

Built With

Share this project:

Updates