Skip to content

yaruyng/InnerTrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InnerTrace 🧠

基于 LLM、记忆系统与反思机制的成长型智能体
A self-growth agent powered by LLM, memory, and reflection.


项目简介 | Overview

中文
InnerTrace 是一个面向自我成长场景的 AI 系统,帮助你将日常记录转化为结构化认知,并通过长期记忆与证据检索发现行为模式、情绪波动与潜在改进方向。
它不只是“记录工具”,而是一个会基于你的历史数据进行推理的反思助手。

English
InnerTrace is an AI-powered self-growth system that turns daily journaling into structured understanding.
With long-term memory and evidence retrieval, it helps identify patterns, emotional shifts, and actionable improvements.
It is not just a note-taking tool, but a reflection assistant that reasons over your own historical data.


仓库说明 | Repositories


核心功能 | Key Features

1) 日志输入与结构化理解 | Journaling + Structured Understanding

  • 自由记录每天经历,无固定模板
    Write freely about your day with no strict format.
  • 自动抽取情绪、事件、主题、压力/能量等信号
    Automatically extract signals such as emotion, events, topics, stress, and energy.

2) 长期记忆系统 | Long-term Memory

  • 多层记忆:原始日志、结构化洞察、周期性总结
    Multi-layer memory: raw entries, structured insights, and periodic summaries.
  • 当前已支持基于结构化标签与时间范围的检索;向量语义检索正在建设中
    Currently supports structured tag + time-range retrieval; vector semantic retrieval is in progress.

3) 反思问答与模式发现 | Reflection Q&A + Pattern Discovery

  • 针对“为什么最近疲惫”“什么在消耗精力”等问题进行证据归因
    Provides evidence-grounded answers to questions like "Why have I felt tired recently?"
  • 输出模式分析与可执行建议
    Returns pattern analysis and actionable suggestions.

4) 周/月度洞察 | Weekly/Monthly Insights

  • 汇总情绪趋势、重复问题、亮点与风险
    Summarizes emotional trends, repeated issues, highlights, and risks.

工作流程 | How It Works

Journal Input
    ↓
LLM Structured Analysis
    ↓
Memory Storage (MySQL + Vector DB)
    ↓
Structured Retrieval (Vector Retrieval In Progress)
    ↓
Agent Reasoning
    ↓
Insight + Evidence + Suggestions

Agent 设计 | Agent Loop

User Question
    ↓
Intent Recognition
    ↓
Memory Retrieval (Vector + Metadata)
Memory Retrieval (Metadata/Structured First, Vector In Progress)
    ↓
Evidence Aggregation
    ↓
LLM Reasoning
    ↓
Structured Response

设计目标 / Goals:

  • 按需检索记忆,而非盲目生成
    Retrieve memory only when needed.
  • 选择有效时间窗口与主题上下文
    Select relevant time windows and topic context.
  • 确保结论有历史证据支撑
    Keep conclusions grounded in historical evidence.

技术栈 | Tech Stack

Backend

  • Java 17
  • Spring Boot
  • MyBatis-Plus

Storage

  • MySQL (结构化数据 / structured data)
  • pgvector / Milvus (向量记忆,建设中 / vector memory, in progress)
  • Redis (缓存 / cache)

AI Layer

  • LLM API (分析与推理 / analysis and reasoning)
  • Embedding model

Infrastructure

  • 异步任务处理 / Async task processing

截图 | Screenshots

下图为 InnerTrace Web 界面示意。

Dashboard1 Dashboard2 Journal1 Journal2 Reflection1 Reflection6 Memory1 Memory2 Agent Chat1 Agent Chat2


系统架构 | Architecture

Frontend
    ↓
API Layer
    ↓
InnerTrace Agent Service
    ├─ Journal Module
    ├─ Analysis Module
    ├─ Memory Module
    ├─ Reflection Module
    └─ Agent Module
    ↓
Storage Layer
    ├─ MySQL
    ├─ Vector DB
    └─ Redis

设计原则 | Design Philosophy

  1. 基于数据,而非臆测 | No hallucinated psychology
    只依据用户历史记录进行反思,不凭空贴标签。
    Reflect only from user data, not assumptions.

  2. 证据优先 | Evidence-first insight
    每个关键结论应可追溯到具体记录。
    Key conclusions should be traceable to concrete records.

  3. 温和引导 | Gentle guidance, not judgment
    提供可执行建议,而非价值评判。
    Provide actionable guidance rather than judgment.


路线图 | Roadmap

  • 日志输入与存储 / Journal input & storage
  • 结构化分析 / Structured analysis
  • 向量记忆检索 / Vector memory retrieval
  • 周/月度反思 / Weekly & monthly reflection
  • 多智能体推理 / Multi-agent reasoning
  • 个性化调优 / Personalization tuning
  • 可视化看板 / Visualization dashboard

快速开始 | Quick Start

中文

  1. 准备后端(端口 8080)

    • 安装 Java 17 与 Maven
    • 在后端目录执行:
      cd InnerTrace
      mvn clean package
      java -jar target/*.jar
    • 或直接开发模式:
      mvn spring-boot:run
    • 请根据本地环境修改 application.yml 中的数据库与 LLM API Key 配置。
  2. 启动前端(端口 3000)

    • 安装 Node.js(推荐 18+)
    • 在前端目录执行:
      cd innertrace_frontend
      npm install
      npm run dev
    • 打开浏览器访问 http://localhost:3000

English

  1. Backend (port 8080)

    • Install Java 17 and Maven.
    • From the backend directory:
      cd InnerTrace
      mvn clean package
      java -jar target/*.jar
    • Or run in dev mode:
      mvn spring-boot:run
    • Configure your own database and LLM API key in application.yml before running.
  2. Frontend (port 3000)

    • Install Node.js (18+ recommended).
    • From the frontend directory:
      cd innertrace_frontend
      npm install
      npm run dev
    • Visit http://localhost:3000 in your browser.

开源说明 | Open Source Notes

欢迎提交 Issue 和 PR,一起完善 AI 驱动的长期反思系统。
Issues and pull requests are welcome to improve this AI-driven long-term reflection system.


License

Apache-2.0

About

A Self-Growth Agent powered by LLM, Memory, and Reflection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages