agentmemory-config

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
agentmemory reads configuration from the environment and from
~/.agentmemory/.env
(one
KEY=value
per line, no
export
prefix). Restart the server after changing it.
agentmemory从环境变量和
~/.agentmemory/.env
文件读取配置(每行一个
KEY=value
格式,无需
export
前缀)。修改配置后需重启服务器。

Quick start

快速开始

Enable richer memory and set a provider key in
~/.agentmemory/.env
:
env
ANTHROPIC_API_KEY=sk-ant-...
AGENTMEMORY_AUTO_COMPRESS=true
AGENTMEMORY_INJECT_CONTEXT=true
~/.agentmemory/.env
中启用增强记忆功能并设置提供商密钥:
env
ANTHROPIC_API_KEY=sk-ant-...
AGENTMEMORY_AUTO_COMPRESS=true
AGENTMEMORY_INJECT_CONTEXT=true

Defaults worth knowing

值得了解的默认设置

  • No API key is required. Without one, agentmemory runs zero-LLM with BM25 plus local embeddings.
  • Token-spending features ship OFF on purpose:
    AGENTMEMORY_AUTO_COMPRESS
    (LLM summaries) and
    AGENTMEMORY_INJECT_CONTEXT
    (auto context injection) both cost tokens proportional to tool-use frequency.
  • Tool visibility:
    AGENTMEMORY_TOOLS=all
    (default) or
    core
    for the lean set.
  • Auth: set
    AGENTMEMORY_SECRET
    to require
    Authorization: Bearer
    on the REST API.
  • 无需API密钥。没有API密钥时,agentmemory将以零大语言模型(zero-LLM)模式运行,结合BM25算法与本地嵌入。
  • 消耗令牌的功能默认关闭:
    AGENTMEMORY_AUTO_COMPRESS
    (大语言模型摘要)和
    AGENTMEMORY_INJECT_CONTEXT
    (自动上下文注入)的令牌消耗与工具使用频率成正比。
  • 工具可见性:默认值为
    AGENTMEMORY_TOOLS=all
    ,或设置为
    core
    以使用精简工具集。
  • 认证:设置
    AGENTMEMORY_SECRET
    可要求REST API携带
    Authorization: Bearer
    认证头。

Ports

端口设置

REST is the anchor at 3111. Streams = N+1 (3112), viewer = N+2 (3113), engine = N+46023 (49134). Relocate the whole block with
--port <N>
or
--instance <N>
.
REST服务默认端口为3111。流服务端口为N+1(即3112),查看器端口为N+2(即3113),引擎端口为N+46023(即49134)。可通过
--port <N>
--instance <N>
参数调整整个端口块的起始值。

See also

另请参阅

  • agentmemory-rest-api for how the secret is used.
  • agentmemory-architecture for the port quartet rationale.
  • agentmemory-rest-api:了解密钥的使用方式。
  • agentmemory-architecture:了解端口四元组的设计原理。

Reference

参考资料

The full recognized-variable list lives in REFERENCE.md, generated by scanning
src/
.
完整的可识别变量列表位于REFERENCE.md文件中,该文件通过扫描
src/
目录生成。