Zing Forum

Reading

Graphorin: A TypeScript Framework for Long-Lived Personal AI Assistants

Graphorin is a TypeScript framework designed specifically for building long-running personal AI assistants, featuring a six-layer memory system, persistent workflows, streaming APIs, and native observability, with an emphasis on local-first and privacy protection.

GraphorinTypeScriptAI助手框架记忆系统持久化工作流本地优先隐私保护开源项目
Published 2026-06-13 17:16Recent activity 2026-06-13 17:19Estimated read 7 min
Graphorin: A TypeScript Framework for Long-Lived Personal AI Assistants
1

Section 01

Graphorin Framework Introduction: A TypeScript Foundation for Long-Lived Personal AI Assistants

Graphorin is a TypeScript framework designed specifically for building long-lived personal AI assistants. Its core philosophy is to enable assistants to "remember, persist, and truly belong to you", distinguishing it from most single-conversation AI applications. The framework features a six-layer memory system, persistent workflows, streaming APIs, and native observability, with an emphasis on local-first and privacy protection. It is open-source under the MIT license and positioned as a foundational layer, allowing developers to build vertical domain assistants such as fitness coaches and private tutors on top of it.

2

Section 02

Project Background and Basic Information of Graphorin

Project Background

Most current AI applications focus on single conversations and lack long-term memory and persistent states. Graphorin aims to solve this problem, enabling assistants to retain memory and work states across sessions and even after process restarts.

Basic Information

  • Original Author/Maintainer: o-stepper
  • Source Platform: GitHub
  • Version: v0.4.0 pre-release
  • License: MIT
  • Original Link: https://github.com/o-stepper/graphorin
  • Release Time: 2026-06-13T09:16:34Z
3

Section 03

Core Architecture Design: Six-Layer Memory System and Persistent Workflow

Six-Layer Memory System

Simulates human memory layers:

  • Working Memory: Current active context
  • Session Memory: Single conversation history
  • Episodic Memory: Specific events/experiences
  • Semantic Memory: Factual knowledge (preferences, habits)
  • Procedural Memory: Skills/processes (e.g., user's learning style)
  • Shared Memory: Public knowledge base synchronized across multiple assistants Information migration from short-term to long-term memory is achieved through an integration pipeline.

Persistent Workflow Runtime

Based on step graph engine:

  • Checkpoint mechanism: Persist key steps
  • Cross-process recovery: Resume execution after restart
  • Human-machine collaboration primitives: Pause at decision points waiting for confirmation
  • State migration: Execute across machines Suitable for long-term tasks (e.g., three-month fitness plan).
4

Section 04

Technical Feature Highlights: Privacy, Flexibility, and Security

Local-First and Privacy Protection

  • Default local retrieval with SQLite+sqlite-vec/FTS5
  • Multilingual embedding models run locally
  • Zero implicit network calls (no version checks, analytics, auto-updates)

Vendor-Neutral LLM Integration

Supports cloud APIs (OpenAI/Anthropic), local Ollama, OpenAI protocol-compatible servers, in-process GGUF models, switchable with a single line of configuration.

Streaming-First API

All operations return AsyncIterable, including token streams, tool calls, memory writes, etc., enabling real-time UI responses.

Security Primitives

  • SecretValue type: Prevents sensitive data from leaking in logs
  • OS keychain integration
  • OAuth2.1 with PKCE authentication
  • SHA-256 chain audit logs: Traceable and tamper-proof operations
5

Section 05

Application Scenarios and Deployment Modes

Application Scenarios

  • Personal fitness coach: Track training plans, physical changes
  • Private learning tutor: Maintain learner profiles, spaced repetition scheduling
  • Business assistant: Meeting follow-up, contact memory
  • Financial advisor: Bi-temporal records, sensitive data protection

Deployment Modes

  • Embedded library mode: Integrated as a Node.js library into existing applications
  • Standalone daemon mode: Runs REST+WebSocket+SSE services, supports persistent triggers and multi-client
6

Section 06

Project Status and Roadmap

Currently in the v0.4.0 pre-release phase, using lockstep version management (all package versions are consistent before v1.0). The documentation website (graphorin.com) and detailed docs (docs.graphorin.com) are online. The npm package has not been officially released yet; you can clone the GitHub repository to use it. The framework uses strict TypeScript configuration, with zero 'any' types in public APIs, and events implement type safety via discriminated unions.

7

Section 07

Summary: Value and Future Outlook of Graphorin

Graphorin focuses on the long-term relationship between AI assistants and users. Through its six-layer memory system, persistent workflows, local-first architecture, and security primitives, it provides a foundation for building truly "understanding" personal AI assistants. In today's era of powerful LLMs, it offers a noteworthy solution to the core challenges of long-term AI assistant companionship.