बहुतेक AI एजंट्सची स्मरणशक्ती (recall) उत्कृष्ट असते, परंतु काय लक्षात ठेवण्यासारखे आहे याबद्दल त्यांचा निर्णय (judgment) अत्यंत खराब असतो. ते हजारो पाने ग्रहण (ingest) करू शकतात, तरीही स्वतःच्या संदर्भात (context) बुडून जातात कारण त्यांना अनावश्यक भाग विसरण्यास कोणीही शिकवलेले नसते. Knowledge and Memory Management version 0.0.2 नेमकी हीच समस्या सोडवण्यासाठी तयार करण्यात आले आहे. हा केवळ एक छोटा पॅच नाही. एजंट आपल्याकडील माहिती कशी साठवतो, ती कशी वाहून नेतो आणि तिला कशी प्राधान्य देतो, याचा तो पुनर्विचार करतो.

मेमरीची समस्या

एजंट्स सहसा मजकुराचा प्रत्येक तुकडा अत्यंत महत्त्वाचा मानतात. एक कच्चा वेब पेज त्याच्या नेव्हिगेशन मेनू, कुकी बॅनर आणि फूटर लिंक्ससह स्टोरेजमध्ये टाकले जाते. व्हिडिओ ट्रान्सक्रिप्टमध्ये प्रत्येक “um”, टाइमस्टॅम्प आणि स्पॉन्सरची जाहिरात जशीच्या तशी येते. एखाद्या लेखात प्रत्यक्ष माहितीपेक्षा जाहिरातींचे मार्कअप (ad-copy markup) जास्त असू शकते. जेव्हा माहिती शोधली (retrieval) जाते, तेव्हा सिस्टिमला मुख्य माहिती (signal) शोधण्यासाठी या सर्व गोंधळातून (noise) गाळून घ्यावे लागते. ही नासाडी दोन ठिकाणी दिसून येते: कचऱ्यामुळे तुमचे कॉन्टेक्स्ट विंडो (context window) लहान होते आणि अर्थहीन मजकूर प्रोसेस आणि एम्बेड करण्यासाठी तुम्हाला पैसे द्यावे लागत असल्यामुळे तुमचा इन्फ्रास्ट्रक्चर खर्च वाढतो.

स्केलिंगची समस्या देखील तितकीच त्रासदायक आहे. बहुतेक सुरुवातीच्या टप्प्यातील एजंट्स हार्डकोडेड पाथ्समुळे (hardcoded paths) एकाच मशीनशी बांधलेले असतात. प्रकल्प तुमच्या लॅपटॉपवरून सर्व्हरवर किंवा एका VPS वरून दुसऱ्या VPS वर हलवताना, तुटलेले संदर्भ (broken references) दुरुस्त करण्यासाठी तुम्हाला कॉन्फिगरेशन फाइल्स शोधण्यात (grepping) पूर्ण दुपार घालवावी लागते. एजंट सॉफ्टवेअर न राहता एका नाजूक कलाकृतीसारखा (art installation) बनतो, जो केवळ एकाच खोलीत अस्तित्वात राहू शकतो.

V0.0.2 मध्ये काय बदलले आहे

हे रिलीज दोन्ही समस्यांना थेट सामोरे जाते. हे एक पोर्टेबल पाथिंग स्कीम (portable pathing scheme) आणि एक युनिफाइड समरायझेशन पाइपलाइन (unified summarization pipeline) सादर करते, जी माहिती मेमरीमध्ये पोहोचण्यापूर्वीच ती स्वच्छ करते. याचा परिणाम असा होतो की, एजंट हलवणे सोपे होते आणि तो चालवणे स्वस्त पडते.

तुम्ही तुमच्या इन्फ्रास्ट्रक्चरशी लढणे थांबवता. मर्यादित कॉन्टेक्स्टमध्ये फुगलेले दस्तऐवज भरून काढणे थांबवता. एजंट फक्त अधिक चांगल्या प्रकारे लक्षात ठेवतो.

$AGENT_HOME सह डिझाइननुसार पोर्टेबल

सर्वात व्यावहारिक बदल म्हणजे $AGENT_HOME एन्व्हायरनमेंट व्हेरिएबलची (environment variable) ओळख. सिस्टिम स्पर्श करते असा प्रत्येक पाथ—नॉलेज बेस, वर्किंग मेमरी, कॅश्ड समरी, सेशन लॉग्स—या रूटच्या सापेक्ष (relative to this root) ठरवला जातो. याचा अर्थ असा की, तुम्ही कोडच्या एका ओळीला स्पर्श न करता तुमची संपूर्ण एजंट डिरेक्टरी कुठेही हलवू शकता.

एका सामान्य स्थलांतराचा (migration) विचार करा. काल तुमचा एजंट /srv/ai-agent या पाथवर एका DigitalOcean droplet वर होता. आज तुम्हाला तो स्थानिक पातळीवर (locally) चालवायचा आहे किंवा सहकाऱ्याकडे सोपवायचा आहे. पूर्वी, तुम्हाला JSON कॉन्फिग्स, पायथन स्क्रिप्ट्स आणि शेल रॅपर्समध्ये विखुरलेले हार्डकोडेड ॲब्सोल्युट पाथ्स (absolute paths) सापडत असत. तुम्हाला डझनभर फाइल्समध्ये sed वापरून बदल करावे लागायचे आणि प्रत्येक संदर्भ सापडला की नाही या आशेने काम करावे लागायचे. व्हर्जन 0.0.2 सह, तुम्ही हे सर्व टाळू शकता. तुम्ही फक्त फोल्डर कॉपी करा, export AGENT_HOME=/your/path सेट करा आणि रन करा. इन्जेशन स्क्रिप्ट्स, मेमरी इंडेक्स आणि रिट्रिव्हल लेयर हे सर्व आपोआप जुळवून घेतात कारण ते आधीच माहिती आहे असे मानण्याऐवजी ऑपरेटिंग सिस्टमला 'होम' कुठे आहे हे विचारतात.

ही पोर्टेबिलिटी केवळ सोयीसाठी नाही. यामुळे तुमचे सेटअप पुनरुत्पादनीय (reproducible) बनते. तुमच्या मशीनवरच चालणाऱ्या पाथ्समुळे रिपॉझिटरी खराब न करता तुम्ही तुमच्या नॉलेज डिरेक्टरीचा व्हर्जन कंट्रोलमध्ये मागोवा घेऊ शकता. तुमचा सहकारी रिपो क्लोन करतो, $AGENT_HOME त्यांच्या स्वतःच्या फाईलसिस्टमकडे निर्देशित करतो आणि स्वतःचा डेटा इन्जेस्ट करतो. तुमचा CI पाइपलाइन प्रत्येक एन्व्हायरनमेंटसाठी कॉन्फिग्स पुन्हा न लिहिता एक नवीन एजंट सुरू करू शकतो, एक व्हेरिएबल सेट करू शकतो आणि त्याचे वर्तन तपासू शकतो.

जर तुम्ही एजंट systemd सर्व्हिस म्हणून चालवत असाल, तर ते व्हेरिएबल सर्व्हिस युनिटमध्ये जोडा. जर तुम्ही ते कंटेनरायझ (containerize) करत असाल, तर ते तुमच्या Dockerfile किंवा compose फाईलमध्ये पास करा. जर तुम्ही अनेक शेल्समध्ये काम करत असाल, तर ते तुमच्या .bashrc किंवा .zshrc मध्ये टाका जेणेकरून ते कायम राहील. हे सेटअप जाणीवपूर्वक 'बोरिंग' (boring) ठेवण्यात आला आहे कारण इन्फ्रास्ट्रक्चर बोरिंगच असायला हवे.

तीन स्रोत, एक क्लीनअप पाइपलाइन

सिस्टिम तीन विशिष्ट चॅनेलद्वारे ज्ञान ग्रहण करते:

  • वेब पेजेस (Web pages). हे HTML बॉयलरप्लेटमध्ये गुंडाळलेले येतात. प्रत्यक्ष मजकूर तीन हजार शब्दांच्या मार्कअप, नेव्हिगेशन आणि कमेंट सेक्शनमध्ये लपलेले केवळ तीनशे शब्द असू शकतात.
  • व्हिडिओ ट्रान्सक्रिप्ट्स (Video transcripts). स्पीच-टू-टेक्स्ट आउटपुट अत्यंत शब्दबंबाळ असते. फिलर्स (fillers), पुनरावृत्ती, टाइमस्टॅम्प आणि विषयांतरित गप्पांमुळे एक कमी घनतेचा (low-density) प्रवाह तयार होतो जो कोणतीही उपयुक्त माहिती न देता टोकन्सचा वापर करतो.
  • लेख (Articles). फॉरमॅट्समध्ये खूप तफावत असते. काही स्वच्छ मजकूर प्रकाशित करतात. इतर जाहिराती, न्यूजलेटर साइनअप बॉक्स आणि सोशल एम्बेड्समुळे वाचनाचा अनुभव विस्कळीत करतात.

Version 0.0.2 does not treat these as separate silos to babysit. Instead, it routes all three through the same summarization layer before they enter working memory. The layer extracts claims, procedures, data points, and relationships. It discards the noise that humans would naturally skim past.

Why Summarization Is a Scaling Strategy

There is a tendency to view summarization as a luxury feature, something nice to have but nonessential. That is wrong. For a language-model agent, summarization is a scaling requirement.

Context windows have limits. Retrieval budgets have costs. Every token spent on a cookie banner or a video sponsor read is a token you cannot spend on reasoning. When your agent prepares a response, it does not get smarter by having more text around. It gets smarter by having the right text around.

By stripping noise at ingestion time, the system compresses the signal. Your agent can consult a broader set of sources within the same context budget. Ten distilled documents fit where two raw documents once struggled. That density is what allows the agent to scale from a toy prototype managing five sources to a production system managing hundreds. The memory footprint stays manageable. The retrieval quality improves because irrelevant overlap disappears. The token cost drops because you stopped paying to embed and query boilerplate.

This is not about aggressive lossy compression that throws away nuance. It is about editorial judgment encoded into the pipeline. The summary preserves technical specifics, named entities, causal links, and instructional steps. It removes formatting debris and conversational padding.

Getting Started

The setup is deliberately minimal because the system is meant to stay out of your way.

Open your terminal and set the root path:

export AGENT_HOME=/your/path

Make this permanent by adding the line to your shell profile, or inject it into whatever orchestration layer runs your agent. Keep the directory structure consistent underneath. The agent expects its folders—whether you name them knowledge/, memory/, summaries/, or something else—to live relative to that root. Once the variable is live, point the agent at your web pages, transcripts, and articles. The ingestion and summarization pipeline handles the rest.

If you are migrating from an earlier version, the process is equally simple. Move your existing data into the new $AGENT_HOME hierarchy, update the variable, and verify that the agent resolves paths correctly. No migrations scripts. No database schema bumps. Just a single source of truth for where the agent lives on disk.

The Real Takeaway

Better memory management is not about hoarding more data. It is about curating the data you already have. Version 0.0.2 treats portability and summarization as first-class concerns instead of afterthoughts. You gain the freedom to move your agent between machines without breaking anything, and you gain the efficiency of a context window that actually contains context.

Set your home directory. Feed the agent real sources. Let the system strip away the junk. You will spend less time debugging path errors and less money processing noise, and more time using what the agent actually learned.


Source: https://dev.to/mage0535/thinking-1-analyze-the-request-12go

Community: https://t.me/GyaanSetuAi