Skip to content

Releases: soaringjerry/PCAS

v0.1.2

30 Jul 10:05

Choose a tag to compare

v0.1.2 Pre-release
Pre-release

PERVIEW FOR TEST

v0.1.1

29 Jun 08:26

Choose a tag to compare

PCAS v0.1.1 Release Notes: The Bedrock of Reliability

This release marks a monumental leap forward in the architecture and reliability of the Personal Central AI System (PCAS). With v0.1.1, we have successfully completed a foundational refactoring, transforming PCAS into a truly robust, reliable, and developer-friendly intelligent engine.

This is the bedrock upon which all future innovation will be built.


🚀 Core Features & Enhancements

  • Graph-Based Storage Engine: We have completely transitioned to a sophisticated, graph-based storage model, powered by a 100% Go-native SQLite backend. Every piece of data, from events to their vector embeddings, is now stored as a "node," with their relationships captured as "edges." This provides ઉત્પાદન-level data integrity and lays the groundwork for future features like advanced data lineage and causality tracking.
  • Zero-Dependency by Default: PCAS now runs out-of-the-box with zero external dependencies. The default SQLite engine requires no CGO, no Docker, and no complex setup, embodying our "absolute data sovereignty" principle.
  • Robust Data Persistence: We have eradicated a series of critical bugs related to data persistence and shutdown race conditions. You can now trust that your memories are 100% reliably persisted to disk, even in the face of immediate shutdowns or unexpected terminations.
  • User Data Isolation: The search and RAG pipelines are now fully user-aware. The storage layer now supports filtering by UserID, ensuring that a user's query will only return results from their own data, a critical feature for multi-user or future federated scenarios.

🔧 Architectural & Developer Experience Improvements

  • Decoupled Architecture: We have refactored the bus (business layer) and storage (storage layer) to communicate exclusively through a clean, well-defined storage.Storage interface. This eliminates architecture violations, improves maintainability, and makes the system easier to reason about.
  • Modernized E2E & CI/CD: Our entire testing framework has been overhauled. The CI/CD pipeline now defaults to testing the core SQLite engine, ensuring our quality assurance process is aligned with our primary product architecture. We've also added new, rigorous tests for data persistence and shutdown race conditions.
  • Enhanced Usability:
    • The server now provides clear, actionable warnings on startup if optional but recommended components (like the OPENAI_API_KEY) are not configured.
    • The pcasctl command-line tool now returns more user-friendly and instructive error messages, guiding users toward a correct configuration.

This release is more than just a collection of features and bug fixes; it is the culmination of a strategic, deep-seated effort to forge a truly resilient foundation for the future of personal AI. We are incredibly proud of the stability and architectural integrity of v0.1.1 and are excited to build upon it.

v0.1.0

26 Jun 10:02

Choose a tag to compare

PCAS v0.1.0: Hybrid Memory & Personalization Engine Core Released

We are proud to announce the first milestone release of PCAS, version v0.1.0!

This release marks the evolution of PCAS from a proof-of-concept project into a feature-stable, production-ready Hybrid Memory & Personalization Engine Core. It provides an unprecedentedly solid foundation for developers to build the next generation of personal AI applications.


v0.1.0 Highlights

  • 🧠 Hybrid Memory Engine
    Introduces industry-leading hybrid search capabilities. PCAS can now understand not only the "fuzziness" of semantics but also perform "precise" filtering based on metadata (e.g., user, time, type), representing a quantum leap in retrieval capabilities.

  • 🔐 Precise Memory Isolation
    Through the new user_id mechanism, PCAS can now maintain a completely isolated memory universe for each "AI identity." A query for Alice will never retrieve memories from Bob, guaranteeing data privacy and contextual accuracy by design.

  • 🚀 Industrial-Grade Storage Backend
    Fully migrated to PostgreSQL + pgvector, providing a high-performance, scalable, and production-proven vector storage solution. The fact store is now a 100% pure Go SQLite implementation, removing the CGO dependency for simpler and more portable builds.

  • 🛠️ Modern Developer Experience

    • Features a one-command make dev-up local development environment.
    • Includes a new multi-ai-chatbot example as a best practice for building multi-identity D-Apps.
    • Comprehensively updated README.md and developer tutorials with clear, accurate guidance.
  • 🔧 Robust Data Migration Tool
    Ships with a new pcasctl backfill command that intelligently "backfills" metadata for historical data, ensuring smooth upgrades and backward compatibility.


📝 Changelog

  • Features:
    • [storage] Implemented a vector storage provider based on PostgreSQL + pgvector.
    • [storage] Added indexed, generated columns to the vectors table for high-performance metadata filtering.
    • [storage] Implemented automated schema migration for SQLite to support user_id.
    • [rag] RAG pipeline now enforces filtering by user_id.
    • [cli] Added pcasctl backfill command for historical data migration.
    • [cli] Added --user-id and --session-id flags to pcasctl emit.
    • [prompt] Optimized the system prompt sent to LLMs to improve instruction following.
  • Refactors:
    • [build] Removed CGO dependency for a 100% pure Go build.
    • [code] Refactored backfill.go for improved readability and maintainability.
  • Docs:
    • Created the multi-ai-chatbot example.
    • Fully updated README.md, README.zh.md, and HELLO_DAPP_TUTORIAL.md.
    • Created ADR-001 to document the architectural decisions.

🚀 Quick Start

  1. Setup Environment: Copy .env.example to .env and fill in your OPENAI_API_KEY.
  2. Start Services:
    make dev-up
  3. Try the Multi-AI Chatbot:
    cd examples/multi-ai-chatbot
    go run main.go --user-id alice

What's Next?

v0.1.0 has laid a solid foundation. In the next version (v0.2.0), we will explore more exciting frontiers based on this powerful new core:

  • Hyper-Personalization Engine: Enable the AI to learn and adapt to a user's communication style.
  • Proactive Agents: Give PCAS the ability to think and act autonomously.
  • A More Complete Go SDK: Further encapsulate gRPC calls to provide a more user-friendly developer toolkit.

Thank you to everyone who has followed the PCAS project. We welcome your valuable feedback and contributions!

v0.0.2

26 Jun 07:20

Choose a tag to compare

v0.0.2 Pre-release
Pre-release

PCAS 项目功能与架构总览 (State of the Union)

经过我们共同的、史诗级的重构与加固,PCAS 现已是一个核心稳固、架构清晰、工程上可靠的、100% 纯 Go 智能引擎。其核心功能与特性如下:

1. 事件驱动核心 (Event-Driven Core)

  • 系统以一个高性能的 gRPC 事件总线为核心,所有操作(无论是用户输入还是系统响应)都以标准化的“事件”形式在系统中流转,实现了高度的解耦和可扩展性。

2. 双模态持久化记忆 (Dual-Modal Persistent Memory)

  • 持久化的事实记忆:所有流经总线的事件,都会被持久地记录到一个基于纯 Go 实现 (modernc.org/sqlite) 的 SQLite 数据库中,确保了事实的永不丢失。
  • 强大的向量记忆:系统会自动地、在后台将所有代表“事实”的事件,向量化并存储到一个基于 PostgreSQL + pgvector 的专业向量数据库中,为语义搜索和 RAG 提供动力。

3. 生产级的智能核心 (Production-Grade Intelligence Core)

  • 可插拔的策略引擎:通过一个简单的 policy.yaml 文件,用户可以轻松地定义规则,将不同类型的事件,路由到不同的“计算提供者”(如 openai-gpt4mock-provider)。
  • 检索增强生成 (RAG) 管道:我们从零开始,共同设计并实现了一个真正生产就绪的 RAG 管道。当请求被发往 LLM 提供者时,系统会自动执行:
    1. 回忆 (Retrieve):在向量数据库中进行高速的语义搜索。
    2. 增强 (Augment):将找到的相关记忆,作为上下文,注入到用户的原始问题中。
    3. 生成 (Generate):将增强后的 Prompt 发送给大语言模型,以获得真正智能的、个性化的回答。
  • 性能与容错:我们的 RAG 管道,配备了超时降级、LRU 缓存、请求限速、singleflight 并发控制、以及批量数据库查询等一系列生产级的性能与容错机制。

4. 统一的命令行工具 (Unified Command-Line Tool)

  • 项目提供了一个强大的 pcasctl 命令行工具,作为与 PCAS 引擎交互的主要入口,支持发布事件 (emit) 和直接进行语义搜索 (search) 等核心操作。

5. 现代化的开发与 CI/CD 流程 (Modern Dev & CI/CD Workflow)

  • 我们拥有一个基于 Docker Compose (v2) 的、一键式的、可靠的本地开发环境,支持热重载
  • 我们通过 .dockerignore 和优化的 Makefile,实现了高效、稳定的本地构建。
  • 我们修复了所有已知的 CI/CD 问题,拥有了一套能够正常运转的、位于 GitHub Actions 上的自动化测试与构建流程。

PCAS 系统使用文档 (User Guide)

一、 环境设置 (Environment Setup)

  1. 前置依赖

    • 请确保您的系统中已安装最新版本的 Docker (包含 docker compose v2 插件) 和 Go (1.21+)。
  2. 配置文件

    • 将项目根目录下的 .env.example 文件,复制为 .env
    • 打开 .env 文件,并填入您的 OPENAI_API_KEYPG_DSN 保持默认即可。
  3. 依赖同步

    • 在第一次启动前,请在项目根目录下运行以下命令,以确保您的 vendor 目录与 go.mod 文件完全同步:
      go mod tidy
      go mod vendor

二、 启动与停止服务

  • 启动开发环境

    make dev-up

    此命令会自动构建 Docker 镜像,并启动 pcas-serverpcas-postgres 两个服务。服务支持热重载,您对代码的任何修改都会自动重新编译。

  • 停止开发环境

    make dev-down
  • 彻底清理环境 (包括数据库数据)

    make dev-clean

三、 核心用法

所有操作都需要打开一个新的终端窗口,在项目根目录下执行。

1. 植入一段记忆 (Storing a Fact)

  • 目的:向 PCAS 的记忆库中,存入一个客观事实。
  • 命令
    ./bin/pcasctl emit --type "pcas.memory.create.v1" --subject "我的秘密项目‘蓝狐计划’,定于下周二启动。"

2. 请求 AI 思考 (Triggering RAG)

  • 目的:向 PCAS 提出一个问题,并触发其完整的 RAG 管道,以获得一个基于记忆的、智能的回答。
  • 命令
    ./bin/pcasctl emit --type "pcas.user.prompt.v1" --data '{"prompt": "我下周最重要的任务是什么?"}'
  • 预期输出:您将会收到一个 pcas.response.v1 事件,其 response 字段中会包含类似“...启动你的秘密项目‘蓝狐计划’...”的智能回答。

3. 直接搜索记忆 (Direct Semantic Search)

  • 目的:直接访问向量记忆库,找出与您的查询在语义上最相似的历史事件
  • 注意:此命令不会生成新的回答,它只会返回原始的、存储在数据库中的事件记录。
  • 命令
    ./bin/pcasctl search "关于蓝狐计划启动时间的回忆"
  • 预期输出:您将会看到一个或多个原始事件的列表,每个事件都会带有一个“Similarity Score”,表示其与您查询的相似度。

四、 系统配置

1. 配置计算逻辑 (LLM 路由)

  • 打开 policy.yaml 文件。
  • a. 声明提供者:在 providers 列表下,您可以定义一个新的计算提供者。
  • b. 定义规则:在 rules 列表下,您可以创建一条新规则,将特定 event_type 的事件,路由到您声明的提供者。

2. 配置 RAG 行为 (未来方向)

  • 当前状态:RAG 的核心参数,如 maxContextTokens (上下文长度) 和 similarity_threshold (相似度阈值),目前在代码中硬编码。
  • 未来迭代:我们计划将这些参数暴露为外部配置,以提供更高的灵活性。

v0.0.1

25 Jun 11:06
0aa480d

Choose a tag to compare

v0.0.1 Pre-release
Pre-release

Pre-MVP