Files
memory-gateway/config.example.yaml

69 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Memory Gateway 配置示例。
# 复制为 config.yaml 并根据实际服务器路径、端口和密钥修改。
# 不要提交 config.yaml它应包含本机/服务器密钥。
# Memory Gateway 服务配置
server:
# 本机测试可用 127.0.0.1;需要远程调用时使用 0.0.0.0 并配置防火墙/反向代理。
host: "127.0.0.1"
# REST API、MCP RPC 和 SSE 共用端口。
port: 1934
# 强烈建议生产/远程调用时设置;客户端通过 X-API-Key 传入。
api_key: ""
# OpenViking 后端配置
openviking:
# OpenViking 服务器地址。Memory Gateway 通过它检索 context/resource/memory。
url: "http://127.0.0.1:1933"
# OpenViking API Key。按 OpenViking 实际配置填写。
api_key: ""
timeout: 30
# EverOS / EverCore 后台长期记忆整理服务
everos:
enabled: true
mode: "real"
# 指向 /home/tom/EverOS/methods/EverCore 启动的 API。
url: "http://127.0.0.1:1995"
api_key: ""
timeout: 30
health_path: "/health"
ingest_path: "/api/v1/memories"
search_path: "/api/v1/memories/search"
flush_path: "/api/v1/memories/flush"
retrieve_method: "keyword"
# 记忆配置
memory:
# 旧 /api/* 接口使用的默认命名空间。v1 API 会按 user/agent/workspace/session 自动展开 namespace。
default_namespace: "memory-gateway"
search_limit: 10
# 日志配置
logging:
level: "INFO"
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
# LLM 配置:用于 /api/summary 和 /api/knowledge/upload
# 兼容 OpenAI Chat Completions API也可指向本地 vLLM / Ollama OpenAI-compatible endpoint。
llm:
base_url: "https://api.openai.com/v1"
api_key: ""
model: ""
timeout: 60
max_input_chars: 24000
# Obsidian Vault 配置。
# 服务端不要求安装 Obsidian 桌面应用;这里本质上是一个 Markdown vault 目录。
obsidian:
vault_path: "/opt/memory-gateway/obsidian-vault"
knowledge_dir: "01_Knowledge/Uploaded"
review_dir: "Reviews/Queue"
# v1 metadata storage。
# SQLite 保存 users、memories、episodes、profiles、audit是用户隔离和 ACL 判断的主要 metadata store。
# Use "memory" only for isolated unit tests.
storage:
backend: "sqlite"
sqlite_path: "/opt/memory-gateway/data/memory_gateway.sqlite3"