Package com.tnsai.context.ephemeral
package com.tnsai.context.ephemeral
Ephemeral context management for tool outputs.
This package provides mechanisms to prevent context explosion from large tool outputs by keeping only the most recent N results.
Quick Start
// Mark action as ephemeral
@ActionSpec(type = ActionType.LLM)
@Ephemeral(keepLast = 3)
public BrowserState getBrowserState() { ... }
// Or programmatically
EphemeralContextManager manager = new EphemeralContextManager();
manager.registerAction("getBrowserState", 3);
manager.trackResult("getBrowserState", result);
- Author:
- TnsAI Team
-
ClassDescriptionManages ephemeral tool outputs to prevent context explosion.Configuration for an ephemeral action.Tracks a single tool result.