Skip to main content

Additional features: Context window configuration

Always on. This setting controls how SimplAI packs conversation history into the model’s context (token) window while leaving room for tool/KB outputs. You can edit it but not disable it.

Why it matters

LLMs have a fixed token budget. Good packing improves answer quality and reduces truncation. We keep ~80% of the window for history and reserve the rest for tool calls, KB snippets, and the model’s response.

Strategies (choose one)

1. Recent Messages (default)

  • Keeps the system prompt and as many of the most recent turns as will fit.
  • Best for: back-and-forth support, short tasks, tool-heavy runs.

2. First & Recent

  • Keeps the system prompt, the very first user message (original goal), plus the latest turns.
  • Best for: long sessions where the initial brief/spec should never be lost (onboarding flows, long research tasks).

3. Chat Summary

  • Keeps the system prompt and replaces older turns with a running summary (final two messages stay verbatim).
  • Best for: very long conversations, complex projects, or verbose artifacts where you need more room for tools/KB.

Configure it in the UI

  1. Open your agent → Edit.
  2. In Additional features, click the gear icon on Context window configuration.
  3. Pick Recent Messages, First & Recent, or Chat Summary and close the drawer.
  4. Publish to apply the change to production.

Recommendations

  • Start with Recent Messages.
  • Switch to First & Recent if the original brief keeps getting forgotten.
  • Use Chat Summary for long-running chats or heavy KB/tool usage.

Tips & best practices

  • Keep the Base instruction concise; large prompts eat budget quickly.
  • Prefer artifacts for long drafts—history can then focus on decisions, not raw text.
  • For KB-heavy agents, Chat Summary usually yields better grounding (more space for retrieved chunks).
  • If you still hit limits, shorten tool outputs or ask the agent to summarize intermediate results.

What happens when history won’t fit?

  • Recent / First & Recent: earliest turns are trimmed under the chosen policy.
  • Chat Summary: older content is compressed further into the summary before trimming verbatim turns.

This setting helps your agent remember the right parts of the conversation while keeping enough headroom for reliable tool/KB reasoning.