Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture 投稿は個人の意見です。
Joined May 2026
258 Following    228 Followers
A useful but little-known OpenAI API feature 🗜 Ever had a long-running AI agent crash halfway because it ran out of context window? There's a fix for that. OpenAI's "Compaction" automatically compresses the conversation context of long-running agents, preventing context overflow. It's essential for agents that need to keep going through many steps. 📌 Title: Compaction 🔗 URL: 🧩 Overview When agents take many steps, the conversation history grows until it hits the context window limit. Traditionally, you'd have to manually truncate or summarize history yourself. Compaction automates this: it preserves the important information while compressing older exchanges to free up context space. 🛠 How to use it Enable compaction in your Responses API configuration. When the context approaches the threshold, the model automatically summarizes and compresses past conversation turns. No custom compression logic needed on your side. Just plug it into your agent loop. 🏗 Building it into production ・Coding agents: sessions that read and write dozens of files won't stall out from context overflow. ・Research agents: tasks that traverse many sources to gather information can run to completion instead of dying mid-way. ・Long customer support sessions: complex inquiries with many back-and-forth turns stay stable while retaining past context. ・Data processing pipelines: agents running multi-stage analysis steps within a single session. 💡 Use cases 🤖 Multi-step coding agents 🔬 Extended research and investigation tasks 💬 Complex customer support conversations 📊 Multi-stage data analysis pipelines ⚠️ Watch out Compression can lose fine-grained details and nuances from earlier in the conversation. Put critical instructions and rules in the system prompt where they won't be compressed. Compaction itself also consumes tokens, so it's unnecessary overhead for short tasks. ✨ The agent that's supposed to get smarter the longer it runs shouldn't lose its memory halfway through. Try Compaction on your longest-running agents first. #OpenAI# #LLM#
Show more