cd /news/ai-agents/knowledge-and-memory-management-v0-0… · home topics ai-agents article
[ARTICLE · art-50641] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Knowledge-and-Memory-Management v0.0.2: Portable Memory for AI Agents

Knowledge-and-Management (KMM) v0.0.2 introduces portable memory for AI agents by replacing hardcoded paths with the $AGENT_HOME environment variable. The release supports knowledge ingestion from web pages, video transcripts, and structured articles, with a memory backend that resolves storage directories dynamically. This enables seamless deployment across machines, containers, and CI environments.

read3 min views1 publishedJul 8, 2026

The latest release of Knowledge-and-Memory-Management (KMM) v0.0.2 delivers a clean, production-ready iteration of its knowledge collection and memory management subsystems. This version strips away all hardcoded, environment-specific paths and replaces them with the $AGENT_HOME

variable, offering true portability across deployment targets. For developers building long-running agents or personal knowledge tools, this release tightens the feedback loop between ingestion, storage, and retrieval without sacrificing clarity or control.

The core thrust of this release is twofold: making knowledge ingestion from disparate sources straightforward and ensuring that stored data is easy to locate and organize. The collection module now supports three primary sources—web pages, video transcripts (e.g., from YouTube or local media), and structured articles (Atom/RSS feeds or Markdown files). Each source is handled by a dedicated extractor that normalizes content into a common document schema, which then flows into a memory backend. The big change in v0.0.2 is that the memory backend no longer assumes a fixed filesystem layout. Instead, it relies on the $AGENT_HOME

environment variable to resolve the root storage directory. This eliminates the friction of moving agent data between machines, containers, or CI environments.

Here is a short example that demonstrates setting up a collector and storing knowledge from a web page and an article feed:

from kmm import Collector, MemoryStore

memory = MemoryStore(base_path="$AGENT_HOME/data")

collector = Collector(
    sources=["web", "article"],
    storage=memory
)

collector.ingest(
    source="web",
    uri="https://example.com/large-language-models"
)

collector.ingest(
    source="article",
    uri="https://blog.example.com/feed.xml"
)

In the code, MemoryStore

resolves $AGENT_HOME

at initialization, so moving the agent to a new machine only requires that variable to be set appropriately. The collector accepts a source type—"web"

, "video"

, or "article"

—and a URI. For video sources, KMM extracts transcripts using subtitle files or speech-to-text outputs, while web and article sources parse HTML or XML into clean text. The normalisation step strips formatting and metadata, keeping only the body content and a few salient fields like title, date, and source URL.

Under the hood, the memory manager indexes each ingested document by its content hash and timestamps, ensuring idempotency if the same URL is collected twice. The storage layout is straightforward: $AGENT_HOME/data/web/YYYY-MM-DD/

, $AGENT_HOME/data/video/

, and similarly for articles. This makes it trivial to inspect collected knowledge with standard filesystem tools or to build custom indexing pipelines on top.

One subtle but important improvement in v0.0.2 is the handling of relative paths inside the collector configuration. Previously, auxiliary files such as user‑agent rules or scraping patterns had to be referenced with absolute paths. This release moves all such dependencies under $AGENT_HOME

, so a configuration file like agent.yml

can simply refer to $AGENT_HOME/config/scraping_rules.json

without knowing the absolute location. This change alone reduces setup time for teams deploying agents across staging, testing, and production environments.

For experienced developers, the most immediate value lies in the separation of concerns: the collector only cares about extraction, the memory manager only about persistence, and $AGENT_HOME

bridges the two without coupling them to the filesystem. You can swap the backend to a database or cloud storage by implementing a thin adapter against the same interface. The current release focuses on local file storage for simplicity, but the architecture is ready for extension.

This release also deprecates the old --data-dir

and --cache-dir

command‑line flags. Any setup that relied on those will need to migrate to the environment variable. The migration path is simple: declare AGENT_HOME

and move your agent’s data folder to that location. The library will emit a warning if $AGENT_HOME

is unset, pointing to the documentation.

KMM v0.0.2 is not a flashy release. It is a boring, necessary cleanup that makes knowledge management infrastructure predicatable. For developers who have been stitching together scrapers, transcript downs, and ad‑hoc storage scripts, this release provides a unified workflow that respects the portability demands of modern agent development. The next planned feature set (semantic search over collected articles and videos) will build directly on this foundation.

── more in #ai-agents 4 stories · sorted by recency
── more on @knowledge-and-management 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/knowledge-and-memory…] indexed:0 read:3min 2026-07-08 ·