PluginBench
Skill
Pass
Audit score 90

agentmemory-config

rohitg00/agentmemory

Configure agentmemory environment variables, ports, API keys, and feature flags.

What is agentmemory-config?

agentmemory reads configuration from environment variables and ~/.agentmemory/.env to control features, authentication, and server ports. Use this skill when enabling memory compression, setting API keys, configuring auth, changing ports, or understanding why features are disabled by default.

  • Set API keys (Anthropic, etc.) for LLM-powered features
  • Enable token-spending features like auto-compression and context injection
  • Configure authentication with AGENTMEMORY_SECRET for REST API bearer tokens
  • Adjust server ports (REST, streams, viewer, engine) individually or as a block
  • Choose tool visibility between full set (all) and lean core set
  • Run zero-LLM mode with BM25 and local embeddings without an API key

How to install agentmemory-config

npx skills add https://github.com/rohitg00/agentmemory --skill agentmemory-config
Prerequisites
  • agentmemory installed and running
  • Access to ~/.agentmemory/.env file or environment variable export capability
  • API key (optional; required only for LLM-powered features)
Claude Code
Cursor
Windsurf
Cline

How to use agentmemory-config

  1. 1.Create or edit ~/.agentmemory/.env with KEY=value pairs (one per line, no export prefix)
  2. 2.Set ANTHROPIC_API_KEY=sk-ant-... if using LLM features
  3. 3.Enable AGENTMEMORY_AUTO_COMPRESS=true and/or AGENTMEMORY_INJECT_CONTEXT=true as needed
  4. 4.Optionally set AGENTMEMORY_SECRET=<token> to require Authorization: Bearer on REST API
  5. 5.Optionally set AGENTMEMORY_TOOLS=core to use lean toolset instead of all
  6. 6.Restart the agentmemory server for changes to take effect

Use cases

Good for
  • Enabling auto-compression to summarize memory with LLM summaries
  • Setting up bearer token authentication for REST API access
  • Relocating all four server ports to a different base port number
  • Switching from full toolset to core-only tools for reduced complexity
  • Configuring Anthropic API key to unlock richer memory features
Who it's for
  • DevOps engineers configuring agentmemory deployments
  • Developers enabling or disabling memory features
  • System administrators setting up authentication and port mappings
  • Teams running agentmemory in constrained or offline environments

agentmemory-config FAQ

Do I need an API key to use agentmemory?

No. Without an API key, agentmemory runs in zero-LLM mode using BM25 and local embeddings. API keys are only required for LLM-powered features like auto-compression and context injection.

Why are AGENTMEMORY_AUTO_COMPRESS and AGENTMEMORY_INJECT_CONTEXT disabled by default?

Both features cost tokens proportional to tool-use frequency. They are disabled by default to avoid unexpected token spending; enable them explicitly only if you want LLM-powered memory summaries and auto context injection.

How do I change the server ports?

REST runs on port 3111 by default. Streams, viewer, and engine use N+1, N+2, and N+46023 respectively. Use --port <N> to relocate the entire block or configure individual ports in .env. See agentmemory-architecture for details.

How do I secure the REST API?

Set AGENTMEMORY_SECRET=<your-token> in ~/.agentmemory/.env. Clients must then include Authorization: Bearer <token> in REST API requests.

What does AGENTMEMORY_TOOLS=core do?

Sets tool visibility to the lean core set instead of all available tools, reducing complexity and surface area.

Full instructions (SKILL.md)

Source of truth, from rohitg00/agentmemory.


name: agentmemory-config description: agentmemory configuration, environment variables, ports, and feature flags. Use when enabling a feature, changing ports, setting an API key, configuring auth, or explaining why a feature is off by default. user-invocable: false

agentmemory reads configuration from the environment and from ~/.agentmemory/.env (one KEY=value per line, no export prefix). Restart the server after changing it.

Quick start

Enable richer memory and set a provider key in ~/.agentmemory/.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.

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>.

See also

  • agentmemory-rest-api for how the secret is used.
  • agentmemory-architecture for the port quartet rationale.

Reference

The full recognized-variable list lives in REFERENCE.md, generated by scanning src/.