惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
Webroot Blog
Webroot Blog
MongoDB | Blog
MongoDB | Blog
AI
AI
WordPress大学
WordPress大学
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
T
Troy Hunt's Blog
J
Java Code Geeks
F
Fortinet All Blogs
The Cloudflare Blog
Cisco Talos Blog
Cisco Talos Blog
S
SegmentFault 最新的问题
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
M
MIT News - Artificial intelligence
The Hacker News
The Hacker News
G
GRAHAM CLULEY
H
Hacker News: Front Page
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
P
Privacy International News Feed
N
News and Events Feed by Topic
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cyberwarzone
Cyberwarzone
T
Threatpost
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Securelist
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
Project Zero
Project Zero
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tailwind CSS Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
A
About on SuperTechFans
Simon Willison's Weblog
Simon Willison's Weblog

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages GitHub - alejandrobalderas/claude-code-from-source: Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps AI and Tech brief: Ireland ascendant GitHub - Titovilal/context0: Context0 - Never Surrender Training for a Marathon with an AI Coach: What Worked and What Didn't Cyber Pulse: Agentic Intel - Apps on Google Play I Built an AI PR Reviewer That Catches Bugs by Not Looking for Bugs Gen Z workers are so fearful AI will take their job they’re intentionally sabotaging their company’s AI rollout | Fortune How AI Is Reimagining the Game of Golf–For Both Players and Courses GitHub - nattergabriel/reseed: A CLI tool for managing and distributing agent skills across projects Is SVG the final frontier? My AI workflow evolved from prompts to a near-autonomous workflow MLSharp Help - 3DGS Viewer & Generator I put my cognitive field based AI's runtime on GitHub Is Numble the first AI-proof game? A3: Kubernetes for autonomous AI agent fleets | Emergent Principles Deepali Vyas ("The Elite Recruiter") GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Unionized ProPublica staff are on strike over AI, layoffs, and wages Unleashing the Advantage of Quantum AI We're heading for an AI-fueled 'dementia crisis,' brain scientist warns The AI-Assisted Breach of Mexico's Government Infrastructure [pdf] GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. MSN GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs AI Code is Hollowing Out Open Source, and Maintainers are Looking the Other Way What leaked "SteamGPT" files could mean for the PC gaming platform's use of AI AI is the boss at this retail store. What could go wrong? GitHub - Wuzu11517/agentic-proxy: Local proxy meant to help reduce With Drones, Geophysics and ArtificiaI Intelligence, Researchers Prepare to Do Battle Against Land Mines A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - inevolin/resume-cli: Hit Claude usage limits? Resume any AI coding session elsewhere. Switch tools at zero friction. GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript This Startup Wants You to Pay Up to Talk With AI Versions of Human Experts Intel Arc Pro B70 Brings 32GB VRAM to Local AI for $949 WordPress 7.0: The Good, the AI, and the Still Missing AI on the couch: Anthropic gives Claude 20 hours of psychiatry IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures AI Agents Know About Supabase. They Don't Always Use It Right. The history and future of AI at Google, with Sundar Pichai Inside an AI‑enabled device code phishing campaign How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines AI for Systems: Using LLMs to Optimize Database Query Execution Forecasting the Economic Effects of AI Introducing Tinker: Play with AI, bring your ideas to life AI sheds light on an ancient gaming mystery People really hate AI but not as much as Iran—or Democrats | Fortune What is an AI Product Engineer? Phoebe Gates wants her $185 million AI startup to succeed with 'no ties to my privilege or my last name': 'I have a chip on my shoulder' | Fortune
GitHub - tuuhe99-del/ARN-Adaptive-Reasoning-Network: ARN — Adaptive Reasoning Network: persistent episodic memory for AI agents. One-command setup, works with OpenClaw, Codex, Claude. PolyForm Small Business license.
MrKali26 · 2026-05-28 · via Hacker News - Newest: "AI"

Beta v0.10.0 — active development branch. Previous stable code is on beta-v9.

Persistent memory for AI agents that runs on a Raspberry Pi.


The Problem

Every time a conversation ends, the agent forgets everything. I got tired of re-explaining my setup, preferences, and what we were working on at the start of every session. Existing solutions either require a cloud service, charge per API call, or implement memory as a flat list of strings that gets searched with cosine similarity alone — which reliably fails for exact terms, version numbers, and proper nouns.

ARN stores memories locally in a single SQLite file and retrieves them using three signals at once: vector similarity, full-text keyword search, and entity matching. All three are fused before ranking. The result is a system that can recall "that Redis timeout issue from two weeks ago" as well as "what framework the user prefers."


How It Works

graph LR
    A[Agent / OpenClaw] -->|perceive| B[ARN Core]
    B -->|encode| C[all-MiniLM-L6-v2\n384-dim embedding]
    C -->|store| D[(SQLite\narn_metadata.db)]
    D -->|vec0| E[KNN search]
    D -->|FTS5| F[BM25 keyword]
    D -->|entities table| G[Entity match]
    E --> H[RRF Fusion]
    F --> H
    G --> H
    H -->|recency + importance\n+ frequency + pins| I[Composite score]
    I -->|MMR| J[Diversity rerank]
    J -->|score-gap cutoff| K[Results]
Loading

Retrieval pipeline

Every recall() call:

  1. Vector KNN — top-K nearest neighbors via sqlite-vec (approximate, indexed)
  2. FTS5 — BM25 keyword search with Porter stemming. Catches exact terms that get compressed in the vector space.
  3. Entity matching — extracts proper nouns, code identifiers, file paths, and numbers+units from the query. Boosts results that share named entities.
  4. Reciprocal Rank Fusion — fuses all three ranked lists without hand-tuning weights. An episode ranked #1 in all three lists gets the maximum possible RRF score.
  5. Composite scorerrf + recency×0.3 + importance×0.15 + log(1+access_count)×0.05 + pin_boost
  6. MMR reranking — Maximal Marginal Relevance eliminates near-duplicate results so diverse information surfaces
  7. Score-gap cutoff — instead of a fixed threshold, finds the largest relative gap in the score distribution and cuts there. Adapts to each query.

Why SQLite over a vector DB

Everything lives in one file. No separate vector store, no sync issues, no process to manage. sqlite-vec adds indexed KNN via a virtual table — it's C, not Python, so it's fast enough. The single-file constraint matters for Raspberry Pi deployments where I don't want another process eating RAM.

Why RRF over single-signal retrieval

Cosine similarity alone misses exact terms ("JWT", "Redis", v2.3.1). BM25 alone misses paraphrases. Neither handles proper nouns well. RRF combines all three without requiring me to tune weights across query types — it just works by averaging rank positions.

Why adaptive thresholds over fixed

A fixed threshold of 0.3 cuts relevant results for niche topics (where even the best match has moderate similarity) and includes noise for general queries (where results drop off a cliff after rank 2). The gap method adapts: it looks at each query's own score distribution and cuts at the largest relative drop.

Why procedural memory

Other systems (Hermes, MemGPT) store individual facts and events. ARN also synthesizes procedures — "here's how to debug this type of problem" — after sessions complex enough to be worth remembering. A session that involved 4+ tool calls, multiple tools, and at least one error correction gets synthesized into a GOAL/STEPS/FAILURES/VERIFICATION memory with role='procedural' and importance=0.85. It surfaces through the same retrieval pipeline, auto-injected before the next relevant session.

This was inspired by studying how Hermes handles SKILL.md files — but Hermes requires the agent to decide when to write a skill. ARN extracts them automatically, without the agent's involvement.


Architecture

arn_v9/
├── core/
│   ├── cognitive.py      # ARNv9 class — perceive, recall, reflect, deep_reflect
│   ├── embeddings.py     # EmbeddingEngine (all-MiniLM-L6-v2 or custom fn)
│   ├── retrieval.py      # fuse_rrf, recency_score, mmr_rerank, score_gap_cutoff
│   ├── entities.py       # extract_entities (proper nouns, code, URLs, numbers)
│   ├── reflect.py        # scan_contradictions, recalibrate_importance, detect_ambiguity
│   └── procedural.py     # compute_task_complexity, extract_procedure, deep_reflect_procedures
├── storage/
│   └── persistence.py    # SQLite + sqlite-vec + FTS5, schema v7, all storage ops
├── api/
│   └── server.py         # FastAPI REST server + plugin endpoints (port 7900) + daemon
└── scripts/
    └── arn_cli.py        # arn CLI

Schema v7 tables: episodes · episode_embeddings (vec0) · episodes_fts (FTS5) · entities · sessions · semantic_nodes · memory_review_queue · memory_links · system_state · schema_version


Quick Start

Prerequisites: Python 3.10+, Mac or Linux (including Raspberry Pi)

git clone https://github.com/tuuhe99-del/ARN-Adaptive-Reasoning-Network.git
cd ARN-Adaptive-Reasoning-Network
./install.sh

Store and recall:

arn server --daemon
arn store -c "User prefers Python for scripting" -i 0.8
arn recall -q "what language does the user code in?"
# → returns the Python fact even though "language" and "code" weren't in the stored text

Python API:

from arn_v9.core.cognitive import ARNv9

arn = ARNv9(data_dir="./memory")
arn.perceive("Deployed on Raspberry Pi 5 with 8GB RAM", importance=0.7)

results = arn.recall("what hardware does the user run?", top_k=3)
for r in results:
    print(r['content'], r['score'])

arn.pin(results[0]['id'])   # survives consolidation + decay
stats = arn.reflect()       # post-session analysis
arn.close()

OpenClaw Integration

arn server --daemon --port 7900
arn connect

arn connect installs the TypeScript plugin from integrations/openclaw/, wires it into OpenClaw, and disables OpenClaw's built-in markdown memory. After that:

  • Memories are auto-injected before every LLM call via before_prompt_build (priority 40)
  • All messages, tool calls, and outputs are captured automatically
  • Post-session reflection runs when the conversation ends
  • The agent gets 5 tools: arn_recall, arn_pin, arn_forget, arn_sessions, arn_review
arn disconnect   # restore OpenClaw's built-in memory (ARN data preserved)
arn status       # daemon status + episode/session counts

Session and Role Tracking

Every memory is tagged with role (user / assistant / tool_call / tool_result / procedural / user_identity) and linked to a session_id. This enables filtering and post-session analysis.

storage = arn.storage
storage.create_session("sess-001", reason_start="user opened chat")

vec = arn.embedder.encode("What's the Redis timeout setting?")
storage.store_episode(
    content="What's the Redis timeout setting?",
    vector=vec,
    role="user",
    session_id="sess-001",
)

storage.end_session("sess-001", reason_end="user closed chat")
stats = arn.reflect(session_id="sess-001")
# → also extracts a procedure if session complexity >= 8.0

Post-Session Reflection

arn reflect
arn review
arn resolve <id> keep_both   # or: update / delete / pin / defer

reflect() runs three analysis passes:

  1. Contradiction scan — pairs with sim > 0.85 + word overlap < 40% go to review queue
  2. Importance recalibration — episodes accessed 5+ times get a proportional importance boost
  3. Procedure extraction — sessions with complexity ≥ 8.0 synthesize a role='procedural' memory

deep_reflect() adds periodic curation:

  • Stale detection: zero-access procedures older than 30 days → importance = 0.1
  • Duplicate merging: sim > 0.9 procedure pairs → keep higher effectiveness, supersede other
  • Archival: importance < 0.15 + age > 60 days → set valid_until (archived, not deleted)

Procedural Memory

A session that debugged an import error by searching the web, installing a missing package, and re-running the script gets synthesized into:

GOAL: Fix the import error in my Python script

STEPS:
  1. web_search(python install requests module)
  2. exec(pip install requests)
  3. exec(python3 script.py)

FAILURES:
  - Tried: exec(python3 script.py)
    Result: ImportError: No module named requests

VERIFICATION: Script ran successfully. Output: OK

CONTEXT: Python

This surfaces the next time a similar problem comes up — automatically, without the agent asking for it. Procedures self-improve: when a session matches an existing procedure and finds a better approach, the old procedure is archived and the new one takes over. arn.restore_procedure(id) reverses any supersession.

Effectiveness is tracked: after each session, procedures that were injected and associated with a low-error session get a +0.1 boost; procedures that precede a high-error session get a -0.2 reduction. Procedures that drop below 0.3 effectiveness are flagged in the review queue.


CLI Reference

# Memory operations
arn store -c "..." -i 0.8            # store a memory (importance 0–1)
arn recall -q "..."                  # retrieve by meaning
arn context -q "..."                 # formatted block for prompt injection
arn forget <id>                      # soft-delete
arn pin <id>                         # pin (survives decay + consolidation)
arn unpin <id>                       # unpin
arn history <id>                     # supersession chain

# Post-session workflow
arn reflect                          # reflection + review queue
arn review                           # list pending items
arn resolve <id> <action>            # update / delete / pin / keep_both / defer
arn consolidate                      # explicit consolidation

# Data
arn stats                            # episode counts, queue depth
arn export                           # export to JSON
arn import                           # import from JSON

# Server
arn server                           # start HTTP server (foreground)
arn server --daemon --port 7900      # background daemon
arn server --stop                    # stop daemon
arn status                           # daemon status + stats

# OpenClaw
arn connect                          # install plugin, start daemon
arn disconnect                       # remove plugin, restore built-in memory

Plugin API (port 7900)

No auth required. No agent_id — uses ARN_AGENT_ID env var (default: "default").

Method Path What it does
POST /perceive Store with role + session context
POST /recall Recall with optional role_filter
POST /session/start Start session record
POST /session/end End session, trigger reflect()
GET /sessions/recent List recent sessions
GET /session/{id} Session detail
POST /pin / /unpin Pin management
POST /forget Soft-delete
GET /reviews/pending Review queue
POST /reviews/resolve Resolve review item
GET /v1/health Health + episode/session counts

Tests

3 skipped tests require the real embedding model (all-MiniLM-L6-v2) — they test semantic quality and are skipped in offline environments automatically.

python -m pytest tests/ -v

See docs/test-results.md for full breakdown by test class.


Configuration

Variable Default What it does
ARN_DATA_DIR ~/.arn_data Database location
ARN_AGENT_ID default Default agent ID
ARN_API_KEY (none) If set, write endpoints require X-Api-Key
ARN_RATE_LIMIT_RPS 60 Max requests/second per IP
ARN_DECAY_INTERVAL_SECONDS 3600 How often recency decay runs

One file per agent: ~/.arn_data/{agent_id}/arn_metadata.db


Design Decisions

Why no auto-consolidation? The old system ran clustering mid-session at 256 episodes. It could corrupt memories that were still being actively referenced. Consolidation is now explicit: call arn consolidate when you want it.

Why supersedes chains instead of destructive updates? Because the old version is often correct. The user says "I switched from Redis to Postgres" — but maybe they switch back next month. Soft invalidation with valid_until keeps history; arn.get_history(id) walks the full chain.

Why working memory as a 7-slot ring buffer? Inspired by Miller's law (cognitive science). It keeps the current session's context always available at the top of recall results without needing to re-query it. The slots decay over time, not by count.

Why procedural memory extraction vs. manual SKILL.md files? Manual skill creation requires the agent to decide when a skill is worth capturing. Complexity scoring + automatic extraction after sufficiently complex sessions captures hard-won knowledge without agent overhead. The GOAL/STEPS/FAILURES structure is built from the actual tool call sequence — no summarization, no LLM cost.


Known Limitations

  • No inter-agent memory sharing — each agent_id is isolated. Sharing knowledge between agents requires a sync layer.
  • Contradiction detection is heuristic — cosine similarity > 0.85 + word overlap < 40% isn't NLI. It fires false positives on paraphrases. An NLI cross-encoder would fix this (see CONTRIBUTING.md).
  • Text only — no images, audio, or structured data.
  • English-tuned by defaultall-MiniLM-L6-v2 is English-optimized. Pass embedding_fn for multilingual support.
  • workers=1 recommended — sentence-transformers loads ~500MB of PyTorch per process. Scale horizontally, not vertically.

License

PolyForm Small Business 1.0.0 — see LICENSE.md and COMMERCIAL.md.

Free if you're an individual, researcher, hobbyist, or at a company with fewer than 100 people and under $1M revenue. Paid license required above that threshold. Open an issue titled "Commercial licensing inquiry" to discuss.