Agent Brain – AI 에이전트를 위한 7계층 인지 메모리(오픈 소스)

hackernews | | 📦 오픈소스
#ai 아키텍처 #ai 에이전트 #tip #생산성 팁 #오픈소스 #인지 메모리
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

Valtis(스위스 AI 기반 부동산 관리 회사)의 실제 운영 환경에서 구축된 'Agent Brain'은 LLM 없이도 작동하는 7계층의 독립적인 인지 아키텍처입니다. 단순한 RAG 방식의 한계를 넘어, 감정·긴급도 등 5가지 기준으로 데이터를 평가하고 지속적인 기억, 추론, 예측 기능을 수행하여 에이전트가 과거 경험을 학습하고 미리 대응할 수 있게 합니다. 임베딩부터 지식 그래프 구축까지 모든 메모리 작업이 로컬 환경(PostgreSQL, spaCy 등 활용)에서 처리되므로 외부 API 의존도와 지연 시간을 획기적으로 줄였습니다. 현재 이 시스템은 실제 임대인, 계약, 유지보수 리스크 등을 예측하고 관리하는 상용 서비스로 성공적으로 운영되고 있습니다.

본문

A 7-layer cognitive architecture for AI agents. No LLM required. Built in production at Valtis — a real AI-native property management company running on agents with actual memory, reasoning, and prediction. Every AI agent you build today is stateless and amnesiac. It forgets conversations. It forgets decisions. It forgets what worked and what didn't. You patch this with RAG. You patch it with long context windows. You patch it with prompt stuffing. None of it is cognition. It's duct tape. Agent Brain is not a patch. It's the missing infrastructure layer between your LLM and reality. Agent Brain is a persistent cognitive architecture — the memory, reasoning, and prediction layer that runs underneath your LLM. It does not replace your LLM. It makes it dramatically smarter by giving it a mind that persists across sessions, learns from experience, and anticipates what happens next. ┌─────────────────────────────────────┐ │ Your LLM (any model) │ ├─────────────────────────────────────┤ │ AGENT BRAIN │ ← This is what's missing │ Memory · Reasoning · Prediction │ ├─────────────────────────────────────┤ │ Your Application / Business │ └─────────────────────────────────────┘ Layer 1 ── Perception Gate 5-score filter. Only meaningful signals enter. Layer 2 ── Working Memory Buffer Active context. What the agent is "thinking about" right now. Layer 3 ── Episodic Memory What happened. Persistent, timestamped, reconsolidated on recall. Layer 4 ── Semantic Memory What it knows. A live knowledge graph, not a static vector store. Layer 5 ── Procedural Memory How to act. Learned patterns from past decisions. Layer 6 ── Predictive Engine What comes next. Anticipates states before they occur. Layer 7 ── Dream Cycle Nightly consolidation. The agent processes, prunes, and learns while idle. Each layer is independent. You can adopt one layer or all seven. Most "memory" solutions for agents are just LLM calls with a fancy wrapper. That means: - Latency on every memory operation - Token cost on every recall - Availability tied to an external API - No true persistent state — just regenerated state Agent Brain runs entirely locally: | Component | Technology | |---|---| | Embeddings | sentence-transformers (384d, local, offline) | | NLP / NER | spaCy (de_core_news_md) | | Knowledge Graph | PostgreSQL-based entity graph | | Vector Storage | pgvector on PostgreSQL | | API Layer | FastAPI (Python 3.12) | | Scheduling | APScheduler | Zero LLM calls for memory operations. Sub-millisecond recall. Fully air-gappable. | Without Agent Brain | With Agent Brain | |---|---| | Agent forgets between sessions | Agent remembers every interaction | | Same mistakes repeated | Agent learns from past decisions | | Static responses | Responses informed by history + prediction | | RAG retrieval only | Full episodic + semantic + procedural recall | | No context about the user | Deep behavioral model of every entity | | Reactive only | Predictive — anticipates before asked | Agent Brain runs in production at Valtis — an AI-native property management company in Switzerland. Our agents manage real properties, real tenants, real contracts — with memory that persists across months, a knowledge graph of entities and relationships, and a predictive engine that anticipates maintenance, payment risk, and tenant behavior before it happens. This is not a demo. This is a production system. curl -X POST https://api.agentbrain.ch/memory/store \ -H "Content-Type: application/json" \ -H "X-API-Key: your-key" \ -d '{ "workspace_id": "your-workspace", "content": "Tenant Müller always pays late in Q4", "agent_id": "property-agent", "source_trust": 0.8 }' curl -X POST https://api.agentbrain.ch/memory/recall \ -H "Content-Type: application/json" \ -H "X-API-Key: your-key" \ -d '{ "workspace_id": "your-workspace", "query": "payment behavior Müller", "limit": 5 }' Returns structured memory with confidence scores, related entities, and temporal context. curl https://api.agentbrain.ch/predict/your-workspace \ -H "X-API-Key: your-key" Every input gets scored across 5 dimensions before entering memory: - Emotion — How emotionally significant? 3 intensity tiers (critical=3x, complaint=2x, issue=1x) - Novelty — Is this new? Uses real cosine similarity against existing memories - Urgency — Does this need immediate attention? Domain-aware tiers (emergency=0.4, urgent=0.3, soon=0.2) - Trust — How reliable is the source? (0.0–1.0, set per input) - Relevance — Does this match the agent's domain? Scored against agent-specific keywords Final weight formula: 25% Emotion + 20% Novelty + 25% Urgency + 15% Trust + 15% Relevance Low-scoring inputs get downranked. High-scoring inputs get fast-tracked to long-term memory. 35 unit tests cover all scoring paths. Unlike static vector stores, episodic memories in Agent Brain change on recall — exactly like human memory. When an agent recalls a memory, the system: - Retrieves the original event via vector search - Applies current context as a lens - Rec

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →