Skip to content

docs: clarify env file setup#321

Merged
rohitg00 merged 1 commit into
rohitg00:mainfrom
aqilaziz:docs/env-file-setup
May 20, 2026
Merged

docs: clarify env file setup#321
rohitg00 merged 1 commit into
rohitg00:mainfrom
aqilaziz:docs/env-file-setup

Conversation

@aqilaziz
Copy link
Copy Markdown
Contributor

@aqilaziz aqilaziz commented May 13, 2026

Summary

  • clarify that agentmemory runtime config can live in ~/.agentmemory/.env
  • explain how to copy viewer export ... hints into the env file and note process env precedence
  • add the Windows path plus a minimal Claude Code subscription fallback example

Fixes #293

Tests

  • git diff --check

Summary by CodeRabbit

  • Documentation
    • Clarified how LLM providers are auto-detected and when Claude subscription fallback is available
    • Added "Config File" section documenting how to configure runtime settings via environment file (~/.agentmemory/.env or Windows equivalent)
    • Documented configuration options for enabling Claude subscription fallback and graph/consolidation features

Review Change Stack

Signed-off-by: aqilaziz <gonzes7@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

@aqilaziz is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b0004c8-854c-4a33-a846-8bac87497a90

📥 Commits

Reviewing files that changed from the base of the PR and between 25dddc4 and f1c082c.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

The README is updated to clarify that agentmemory disables LLM calls by default and adds a new Config File section documenting how to place runtime settings in ~/.agentmemory/.env (or the Windows equivalent), including environment variable precedence and example configurations for Claude subscription fallback and feature toggles.

Changes

Documentation – Configuration and LLM Provider Defaults

Layer / File(s) Summary
Config file and LLM provider clarification
README.md
LLM Providers intro is clarified to state LLM calls are disabled by default unless a provider is configured or AGENTMEMORY_ALLOW_AGENT_SDK is explicitly set. A new Config File subsection documents placing runtime settings in ~/.agentmemory/.env (or Windows %USERPROFILE%\.agentmemory\.env), explains environment variable precedence, and provides example entries for Claude subscription opt-in and enabling graph extraction and consolidation features.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • rohitg00/agentmemory#190: Both PRs update README.md's LLM provider defaults and explicitly document the opt-in behavior of Claude subscription fallback via AGENTMEMORY_ALLOW_AGENT_SDK=true instead of making it the default.

Poem

🐰 A config file so neat, so divine,
No more scattered env vars to align,
Just ~/.agentmemory/.env with care,
And features wake up without a flare!
Thanks for clarity, your docs declare—
Configuration's now a hoppy affair! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: clarify env file setup' is concise and directly related to the main change: clarifying environment file configuration in the README documentation.
Linked Issues check ✅ Passed The PR fully addresses the requirements in issue #293 by documenting the config file location (~/.agentmemory/.env), explaining how to place environment variables there, and providing Claude subscription fallback setup guidance.
Out of Scope Changes check ✅ Passed All changes are in-scope: the README updates directly address the linked issue's request for config file documentation and Claude subscription setup instructions without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rohitg00 rohitg00 merged commit ec62823 into rohitg00:main May 20, 2026
1 of 2 checks passed
@rohitg00
Copy link
Copy Markdown
Owner

Thanks @aqilaziz — clear addition. The Windows note + Claude subscription opt-in example were missing from the existing env section. Merged. Closes #293.

rohitg00 added a commit that referenced this pull request May 21, 2026
…uard (#588)

Three concerns surfaced when auditing PRs merged since v0.9.21:

1) Graph parser regex from #494 was correct for self-closing tags ONLY
   when they're the only entity in the document. With a self-closing
   entity followed by an explicit-close entity, the greedy `[^>]*` ate
   the trailing `/` of the self-close, the alternation fell through to
   the explicit-close branch, and `[\s\S]*?` ran ahead to the *next*
   `</entity>` — merging two entity declarations into one match and
   silently dropping a node. Switch to lazy `[^>]*?` so the
   self-closing alternation gets first chance. Test from #494 (which
   was failing on main but I didn't notice) now passes.

2) #386 shipped `${AGENTMEMORY_URL}` / `${AGENTMEMORY_SECRET}`
   placeholders in plugin/.mcp.json. Claude Code and Cursor expand
   those at MCP launch time; some hosts pass the literal string
   through. A truthy literal `"${AGENTMEMORY_URL}"` defeats the
   existing `|| DEFAULT_URL` fallback and would have the shim POST to
   `${AGENTMEMORY_URL}/agentmemory/...` (DNS failure). Add a
   defensive guard in src/mcp/rest-proxy.ts that strips any value of
   the form `${...}` so the fallback engages. Mirror in
   src/mcp/standalone.ts's mode-announce log line.

3) CHANGELOG entries for all PRs landed since v0.9.21 (#321, #325,
   #386, #454, #494, #526, #542, #560, #561, #562, #564, #567) plus
   the regex + env-guard hardening here.

Validation:
- npm test → 98 files, 1091 tests pass
- npm pack → 142 files, fresh install clean, iii-sdk@0.11.2 pinned,
  plugin/ shipped with hooks/scripts/skills/opencode/
- New test file covers 8 placeholder cases (unset, empty,
  `${VAR}` literal, mismatched braces, real values with $,
  unclosed `${`, no-braces `$VAR`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is there a config file to specify all environment variables at once?

2 participants