Compacting a conversation
Compact a long conversation in Cloudera Agent Studio to summarize the older history and free context, while you keep working in the same conversation.
The /compact command folds the older history of the conversation into a summary and keeps a recent part in its original form. Agent Studio does not delete the original messages, and you can undo the compaction with /restore. See Context, compaction, and token usage.
Compaction asks the model to summarize the history. It can use model resources, and it can fail if the model or the runtime is not available.
- Open a chat with an available agent, and wait until the chat is ready. See Slash commands in chat.
- Make sure that the conversation has enough history for Agent Studio to compact. A conversation that is not empty does not always have enough.
- Make sure that no run is active or paused. The runtime refuses a compaction while a run is active, including a run that waits for your input. Resolve the pause, wait for the run to finish, or stop the run.
The conversation continues with a summary of the earlier history and the recent messages in their original form. If the conversation has no history that Agent Studio can compact, the card shows Nothing to compact yet.
- To check the new occupancy of the context window, see Checking the context and token usage of a conversation.
- To bring back the original history, see Restoring a compacted conversation.
