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- agentmemory installed and running
- Access to ~/.agentmemory/.env file or environment variable export capability
- API key (optional; required only for LLM-powered features)
How to use agentmemory-config
- 1.Create or edit ~/.agentmemory/.env with KEY=value pairs (one per line, no export prefix)
- 2.Set ANTHROPIC_API_KEY=sk-ant-... if using LLM features
- 3.Enable AGENTMEMORY_AUTO_COMPRESS=true and/or AGENTMEMORY_INJECT_CONTEXT=true as needed
- 4.Optionally set AGENTMEMORY_SECRET=<token> to require Authorization: Bearer on REST API
- 5.Optionally set AGENTMEMORY_TOOLS=core to use lean toolset instead of all
- 6.Restart the agentmemory server for changes to take effect
Use cases
- 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
- 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
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.
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.
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.
Set AGENTMEMORY_SECRET=<your-token> in ~/.agentmemory/.env. Clients must then include Authorization: Bearer <token> in REST API requests.
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) andAGENTMEMORY_INJECT_CONTEXT(auto context injection) both cost tokens proportional to tool-use frequency. - Tool visibility:
AGENTMEMORY_TOOLS=all(default) orcorefor the lean set. - Auth: set
AGENTMEMORY_SECRETto requireAuthorization: Beareron 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/.
Related skills
More from rohitg00/agentmemory and the wider catalog.

agentmemory-hooks
Automatic memory capture hooks across agent sessions—zero-LLM observation recording.

agentmemory-mcp-tools
Index of agentmemory MCP tools: which tool to call, exact parameters, and when to use each.

agentmemory-rest-api
HTTP REST API for agentmemory memory server—save and recall agent knowledge over HTTP.

commit-context
Trace code back to the agent session that created it—answer 'why is this here' and 'what was the agent doing'.

commit-history
List recent git commits linked to agent sessions, filtered by branch or repo.

forget
Delete specific observations from agentmemory with explicit user confirmation.