Skip to content

avabb0916/echospect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Echospect (Mirror 0.1)

"Life is the sound, Growth is the echo."

Echospect is an AI-native "cognitive metabolism" engine. It captures your fragmented life signals (messages, thoughts), filters out noise, extracts core insights, and links them to your past memories to generate wisdom.

🏗 System Architecture (IPO Model)

Echospect operates on the IPO loop:

  1. Input (I): Captures messages via Telegram or Feishu (Lark).
    • Service: src/services/feishu-bot.js, src/services/telegram-bot.js
  2. Process (P):
    • Classification: Distinguishes "Noise" vs "Insight" using Gemini Flash.
    • Extraction: "Skeleton" extraction of core thoughts.
    • Linking: Conversational retrieval of related past memories via Vector Search.
    • Services: message-classifier.js, insight-extractor.js, memory-linker.js
  3. Output (O):
    • Mini-Echo: Daily philosophical summary and question generation.
    • Service: mini-echo.js

🛠 Tech Stack

  • Runtime: Node.js
  • AI: Google Gemini 2.0 Flash (via @google/generative-ai)
  • Memory: Pinecone Vector Database (@pinecone-database/pinecone)
  • Integration: Telegraf (Telegram), Lark Open Platform SDK (Feishu)
  • Server: Express.js

🚀 Getting Started

1. Prerequisites

  • Node.js (v18+)
  • Accounts for: Telegram/Feishu, Google AI Studio, Pinecone.

2. Installation

git clone <repo-url>
cd echospect
npm install

3. Configuration

Duplicate .env.example to .env and fill in your keys:

cp .env.example .env
Variable Description Source
TELEGRAM_BOT_TOKEN Bot identity @BotFather
GEMINI_API_KEY AI Brain Google AI Studio
PINECONE_API_KEY Vector Memory Pinecone Console
FEISHU_APP_ID Feishu App ID Feishu Open Platform
FEISHU_APP_SECRET Feishu Secret Feishu Open Platform

4. Running Locally

npm run dev

Server runs on http://localhost:3000.

5. Exposing to Internet (For Feishu/Webhooks)

Since Feishu needs a public URL to send events to, use ngrok:

ngrok http 3000

Copy the HTTPS URL (e.g., https://abcd.ngrok.io) and configure it in your Feishu App:

  • Event Subscription URL: https://abcd.ngrok.io/webhook/feishu

📂 Project Structure

├── src
│   ├── index.js                  # Entry point (Express + Bots)
│   └── services
│       ├── feishu-bot.js         # Feishu/Lark Adapter
│       ├── telegram-bot.js       # Telegram Adapter
│       ├── message-classifier.js # AI Noise Filter
│       ├── insight-extractor.js  # "Skeleton" Extraction
│       ├── memory-linker.js      # Vector Memory Logic
│       ├── vector-store.js       # Pinecone Wrapper
│       ├── mini-echo.js          # Daily Summary Generator
│       └── content-safety.js     # Basic Safety Filter
├── .env                          # Secrets (Excluded from Git)
└── package.json

📝 Usage

  1. Chat: Send a thought to the bot.
    • Example: "I realized today that consistency is more important than intensity."
  2. AI Response:
    • It will analyze if it's an Insight.
    • If yes, it saves it and replies with a "Core Loop" extraction.
    • If it finds similar past thoughts, it triggers an Echo ("This reminds me of...").

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors