A run of the group-travel team (M-03) is long: the request, the answers of lieferanten with whole availability lists, the price from rechner, the findings of the pruefer. Every agent that joins could get all of it. That would be expensive, slow and risky: the more text sits in the context window, the more likely something important gets lost, and the more foreign text lies in front of every model. The lesson asks: What does each role get, what stays out, and what happens when the history grows anyway?

Prior knowledge. Memory in the Agent Framework (session, summary): "AI track, lesson T7.5". The three levels of memory and tenant separation are designed in "lesson 1.3"; the memory is built in "lesson 2.4", retrieval in "2.5"; how context is fed in per run is shown in "lesson 2.1"; the failure patterns of context that is too large are diagnosed in "lesson 3.3". Tokens and costs: "AI track, lesson T1.2". None of that is repeated. This lesson manages the flow: accumulate, retrieve, inject, compact.

New in this lesson. (1) The team state of a run is a structured object with fields (mandantId, language, number of people, destination, period, offer text, findings) and lives in the container teamzustand (F-03); the planer holds it and gives each role only an excerpt (hub-and-spoke, F-01). (2) Each role has a context budget as an upper limit of its input (assumptions: planer 6,000, recht 5,000, pruefer 6,000, texter 4,000, unterkunft and transport 3,000 each, kalkulation 1,500 tokens). (3) Compaction runs with chat-klein.

The requirement

All numbers are assumptions of the task.

No. Requirement Type Measure Weight Source
2.3-01 No role gets fields it does not need. R excerpt per role in the test Must Security, cost
2.3-02 The input of a role stays within the budget. Q 100 % of the calls under the budget Must Cost
2.3-03 Number of people, period, destination and prices survive every compaction unchanged. R 0 deviations in the test set Must Quality
2.3-04 Compacting loses no tenant id and mixes up no customers (M-07). R 0 hits Must Data protection
2.3-05 A compaction is visible in the trace. F span with size before and after Should Operations

Cost frame. Cost drivers: input tokens per call (history, retrieval, excerpt), plus the tokens of the compactor. Prices: the pricing page of Foundry.