Most AI agents have excellent recall and terrible judgment about what deserves to be recalled. They can ingest thousands of pages, yet drown in their own context because nobody taught them to forget the irrelevant parts. Knowledge and Memory Management version 0.0.2 was built to solve exactly that. It is not a minor patch. It rethinks how an agent stores, transports, and prioritizes what it knows.
The Memory Problem
Agents routinely treat every scrap of text as sacred. A raw web page gets dumped into storage alongside its navigation menus, cookie banners, and footer links. A video transcript arrives with every “um,” timestamp, and sponsor read intact. An article might carry more ad-copy markup than actual insight. When retrieval happens, the system sifts through all of this noise to find the signal. That waste shows up in two places: your context window shrinks with junk, and your infrastructure bill grows because you are paying to process and embed meaningless text.
The scaling problem is equally frustrating. Most early-stage agents are lashed to a single machine through hardcoded paths. Move the project from your laptop to a server, or from one VPS to another, and you spend an afternoon grepping through configuration files to fix broken references. The agent stops being software and starts being a fragile art installation that can only exist in one room.
What Changed in V0.0.2
This release tackles both issues head-on. It introduces a portable pathing scheme and a unified summarization pipeline that cleans knowledge before it ever reaches memory. The result is an agent that is easier to move and cheaper to run.
You stop fighting your infrastructure. You stop stuffing bloated documents into limited context. The agent simply remembers better.
Portable by Design with $AGENT_HOME
The single most practical change is the introduction of the $AGENT_HOME environment variable. Every path the system touches—knowledge bases, working memory, cached summaries, session logs—resolves relative to this root. That means you can move your entire agent directory anywhere without touching a line of code.
Consider the typical migration. Yesterday your agent lived on a DigitalOcean droplet at /srv/ai-agent. Today you want to run it locally or hand it off to a teammate. In the past, you would discover hardcoded absolute paths scattered across JSON configs, Python scripts, and shell wrappers. You would sed your way through a dozen files, cross your fingers, and hope you caught every reference. With version 0.0.2, you skip that entirely. You copy the folder, set export AGENT_HOME=/your/path, and run. The ingestion scripts, the memory index, and the retrieval layer all align automatically because they ask the operating system where home is instead of assuming they already know.
This portability matters beyond convenience. It makes your setup reproducible. You can track your knowledge directory in version control without poisoning the repository with paths that only make sense on your machine. A teammate clones the repo, points $AGENT_HOME at their own filesystem, and ingests their own data. Your CI pipeline can spin up a fresh agent, set one variable, and validate the behavior without rewriting configs for every environment.
If you run the agent as a systemd service, add the variable to the service unit. If you containerize it, pass it in your Dockerfile or compose file. If you work across multiple shells, drop it into your .bashrc or .zshrc so it persists. The setup is intentionally boring because infrastructure should be boring.
Three Sources, One Cleanup Pipeline
The system ingests knowledge from three specific channels:
- Web pages. These arrive swaddled in HTML boilerplate. The real content might be three hundred words hiding inside three thousand words of markup, navigation, and comment sections.
- Video transcripts. Speech-to-text output is notoriously verbose. Fillers, repetitions, timestamps, and off-topic banter create a low-density stream that consumes tokens without delivering insight.
- Articles. Formats vary wildly. Some publish clean text. Others fracture the reading experience with advertisements, newsletter signup boxes, and social embeds.
Version 0.0.2 ไม่ได้มองสิ่งเหล่านี้เป็นไซโล (silos) แยกจากกันที่ต้องคอยดูแลเป็นพิเศษ แต่จะส่งทั้งสามอย่างผ่านเลเยอร์การสรุปความ (summarization layer) เดียวกันก่อนที่จะเข้าสู่หน่วยความจำขณะทำงาน (working memory) เลเยอร์นี้จะดึงข้อมูลข้อกล่าวอ้าง (claims), ขั้นตอนการทำงาน (procedures), จุดข้อมูล (data points) และความสัมพันธ์ (relationships) ออกมา พร้อมทั้งกำจัดสัญญาณรบกวน (noise) ที่มนุษย์มักจะมองข้ามไปโดยธรรมชาติ
ทำไมการสรุปความจึงเป็นกลยุทธ์ในการขยายขีดความสามารถ (Scaling Strategy)
มักมีความเข้าใจผิดว่าการสรุปความคือฟีเจอร์เสริมที่หรูหรา เป็นสิ่งที่ "มีก็ดีแต่ไม่จำเป็น" ซึ่งนั่นไม่ถูกต้อง สำหรับเอเจนต์โมเดลภาษา (language-model agent) การสรุปความคือข้อกำหนดที่จำเป็นสำหรับการขยายขีดความสามารถ (scaling requirement)
หน้าต่างบริบท (Context windows) มีขีดจำกัด งบประมาณในการดึงข้อมูล (Retrieval budgets) ก็มีต้นทุน ทุกๆ โทเคน (token) ที่เสียไปกับแบนเนอร์คุกกี้หรือการอ่านสปอนเซอร์ในวิดีโอ คือโทเคนที่คุณไม่สามารถนำไปใช้ในการใช้เหตุผล (reasoning) ได้ เมื่อเอเจนต์ของคุณเตรียมคำตอบ มันไม่ได้ฉลาดขึ้นเพราะมีข้อความล้อมรอบมากขึ้น แต่มันฉลาดขึ้นเพราะมี "ข้อความที่ถูกต้อง" ล้อมรอบต่างหาก
ด้วยการกำจัดสัญญาณรบกวนออกตั้งแต่ขั้นตอนการนำเข้าข้อมูล (ingestion time) ระบบจะทำการบีบอัดสัญญาณ (signal) ให้เข้มข้นขึ้น เอเจนต์ของคุณจะสามารถอ้างอิงแหล่งข้อมูลที่หลากหลายขึ้นได้ภายใต้งบประมาณบริบทเดิม เอกสารที่ผ่านการกลั่นกรองแล้ว 10 ฉบับ สามารถบรรจุลงในพื้นที่ที่เอกสารดิบเพียง 2 ฉบับเคยใช้จนเต็ม ความหนาแน่นนี้เองที่ช่วยให้เอเจนต์สามารถขยายขีดความสามารถจากต้นแบบ (toy prototype) ที่จัดการแหล่งข้อมูลเพียง 5 แห่ง ไปสู่ระบบที่ใช้งานจริง (production system) ที่จัดการแหล่งข้อมูลได้เป็นร้อยๆ แห่ง ขนาดของหน่วยความจำ (memory footprint) ยังคงอยู่ในระดับที่จัดการได้ คุณภาพการดึงข้อมูลดีขึ้นเพราะความซ้ำซ้อนที่ไม่เกี่ยวข้องหายไป และต้นทุนโทเคนลดลงเพราะคุณไม่ต้องจ่ายเงินเพื่อทำ embedding และ query ข้อมูลที่เป็นส่วนเกิน (boilerplate) อีกต่อไป
นี่ไม่ใช่การบีบอัดข้อมูลแบบสูญเสียรายละเอียด (lossy compression) อย่างรุนแรงที่ทิ้งความหมายที่ละเอียดอ่อนไป แต่มันคือการใส่ "การตัดสินใจเชิงบรรณาธิการ" (editorial judgment) ลงไปในกระบวนการ (pipeline) การสรุปความจะยังคงรักษาข้อมูลทางเทคนิคเฉพาะเจาะจง, เอนทิตีที่ระบุชื่อได้ (named entities), ความเชื่อมโยงเชิงเหตุและผล (causal links) และขั้นตอนการปฏิบัติงานเอาไว้ ในขณะที่กำจัดเศษซากของการจัดรูปแบบ (formatting debris) และคำพูดฟุ่มเฟือยในการสนทนาออกไป
เริ่มต้นใช้งาน
การตั้งค่าถูกออกแบบมาให้เรียบง่ายที่สุดเท่าที่จะเป็นไปได้ เพราะระบบถูกสร้างมาเพื่อไม่ให้ขัดจังหวะการทำงานของคุณ
เปิดเทอร์มินัลของคุณและตั้งค่า root path:
export AGENT_HOME=/your/path
ทำให้การตั้งค่านี้ถาวรโดยการเพิ่มบรรทัดดังกล่าวลงใน shell profile ของคุณ หรือใส่เข้าไปใน orchestration layer ใดก็ตามที่รันเอเจนต์ของคุณ รักษาโครงสร้างไดเรกทอรีให้สอดคล้องกัน เอเจนต์จะคาดหวังให้โฟลเดอร์ต่างๆ ของมัน—ไม่ว่าคุณจะตั้งชื่อว่า knowledge/, memory/, summaries/ หรือชื่ออื่น—อยู่ภายใต้ root path นั้น เมื่อตัวแปรพร้อมใช้งานแล้ว ให้ชี้เอเจนต์ไปยังหน้าเว็บ, บทถอดความ (transcripts) และบทความของคุณ จากนั้นกระบวนการนำเข้าข้อมูลและสรุปความจะจัดการส่วนที่เหลือเอง
หากคุณกำลังย้ายมาจากเวอร์ชันก่อนหน้า กระบวนการก็ง่ายดายเช่นกัน เพียงย้ายข้อมูลที่มีอยู่ไปยังลำดับชั้น $AGENT_HOME ใหม่ อัปเดตตัวแปร และตรวจสอบว่าเอเจนต์สามารถระบุเส้นทาง (paths) ได้อย่างถูกต้อง ไม่ต้องมีสคริปต์การย้ายข้อมูล (migration scripts) ไม่ต้องอัปเดตโครงสร้างฐานข้อมูล (database schema bumps) มีเพียงแหล่งข้อมูลอ้างอิงหนึ่งเดียว (single source of truth) สำหรับตำแหน่งที่เอเจนต์จัดเก็บอยู่ในดิสก์
บทสรุปที่สำคัญ
การจัดการหน่วยความจำที่ดีกว่าไม่ใช่การสะสมข้อมูลให้มากขึ้น แต่คือการคัดสรรข้อมูลที่คุณมีอยู่แล้ว เวอร์ชัน 0.0.2 ให้ความสำคัญกับความสามารถในการเคลื่อนย้าย (portability) และการสรุปความในฐานะฟีเจอร์หลัก ไม่ใช่แค่สิ่งที่คิดขึ้นมาทีหลัง คุณจะได้รับอิสระในการย้ายเอเจนต์ไปมาระหว่างเครื่องต่างๆ โดยไม่ทำให้ระบบพัง และคุณจะได้รับประสิทธิภาพจากหน้าต่างบริบทที่มี "บริบท" อยู่จริงๆ
ตั้งค่า home directory ของคุณ ป้อนแหล่งข้อมูลจริงให้เอเจนต์ และปล่อยให้ระบบกำจัดขยะออกไป คุณจะใช้เวลาในการแก้ปัญหาข้อผิดพลาดของเส้นทาง (path errors) น้อยลง เสียเงินไปกับการประมวลผลสัญญาณรบกวนน้อยลง และมีเวลามากขึ้นในการใช้ประโยชน์จากสิ่งที่เอเจนต์ได้เรียนรู้จริงๆ
แหล่งที่มา: https://dev.to/mage0535/thinking-1-analyze-the-request-12go
ชุมชน: https://t.me/GyaanSetuAi
