agentmemory-config
rohitg00/agentmemory
Configure agentmemory environment variables, ports, API keys, and feature flags.
What is agentmemory-config?
agentmemory-config manages all configuration for the agentmemory system via environment variables and ~/.agentmemory/.env file. Use this skill when enabling features like auto-compression or context injection, changing ports, setting API keys, configuring authentication, or understanding why certain features are disabled by default.
- Set API keys (Anthropic and others) for LLM-powered features
- Enable/disable token-spending features like auto-compression and context injection
- Configure tool visibility (all vs. core toolset)
- Set up REST API authentication with bearer tokens
- Adjust port assignments for REST, streams, viewer, and engine services
- Run agentmemory in zero-LLM mode with local embeddings and BM25 search
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 configuration
- API key (optional; required only for LLM-powered features)
How to use agentmemory-config
- 1.Create or edit ~/.agentmemory/.env with your configuration variables
- 2.Set ANTHROPIC_API_KEY if using LLM features, or leave unset for zero-LLM mode
- 3.Enable desired features: AGENTMEMORY_AUTO_COMPRESS=true and/or AGENTMEMORY_INJECT_CONTEXT=true
- 4.Optionally set AGENTMEMORY_SECRET for REST API authentication
- 5.Optionally adjust ports with --port or --instance flags
- 6.Restart the agentmemory server for changes to take effect
Use cases
- Enabling LLM-powered memory summarization to reduce token usage over time
- Configuring authentication for a shared agentmemory instance
- Moving agentmemory services to non-default ports in a multi-instance setup
- Setting up a cost-conscious deployment that uses only local embeddings without API calls
- Switching between full and minimal tool sets based on agent requirements
- DevOps engineers deploying agentmemory
- Developers integrating agentmemory into agent systems
- System administrators managing multi-instance or shared deployments
- Teams optimizing token spend and API costs
agentmemory-config FAQ
No. agentmemory runs in zero-LLM mode by default using BM25 and local embeddings. API keys are only needed if you enable token-spending features like AGENTMEMORY_AUTO_COMPRESS or AGENTMEMORY_INJECT_CONTEXT.
Both features consume tokens proportional to tool-use frequency. They are opt-in to let you control costs and only enable them when the benefit justifies the expense.
Set AGENTMEMORY_SECRET to a strong value in ~/.agentmemory/.env. Clients must then include Authorization: Bearer <secret> in their requests.
Yes. Use --instance <N> to shift the entire port block (REST at 3111+N, streams at 3112+N, viewer at 3113+N, engine at 49134+N), or use --port <N> to set the base port manually.
'all' includes the full toolset; 'core' provides a lean set of essential tools. Use 'core' for simpler deployments or to reduce agent complexity.
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 for memory capture, retrieval, and knowledge management.

agentmemory-rest-api
HTTP REST API for agentmemory memory server; use when MCP is unavailable or integration requires 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 memories from agentmemory with explicit user confirmation.