Token LabSearch

AGENTIC / EXPERIENCE SYSTEMS

Agentic frontiers: from experience to memory, workflows and training environments

A November 2026 synthesis of adaptation, ReTrace, RepoFactory and auditable improvement: mechanisms, evidence, trade-offs and a local workflow fixture.

Sources & version details
In this article

1. The frontier: make experience change the next execution

An agent entering a repository must discover interfaces, constraints and failure modes. Replanning from scratch on its twentieth visit wastes effort; replaying its entire first visit preserves stale facts and bad shortcuts. The useful question is where experience belongs, what scope it covers, and what still needs checking now.

This article for developers and SREs connects November 2026 work on context/weight adaptation, trajectory compilation, verifiable environments and auditable improvement. It complements the site's RSI and harness articles. Paper submission dates and this article's publication are distinct. Paper results are author-reported; the business case, design, arithmetic and Python fixture are original teaching work, not reproductions.

2. Four different places to put experience

A conventional agent chooses actions from its task and observation history. Context adaptation changes its input; parameter adaptation changes weights; compilation moves recurring decisions into code; environment evolution changes training tasks and feedback. These mechanisms require different identities and rollback procedures.

Carrier Changes Useful when Failure boundary
Context / memory History, notes, retrieved knowledge Repeated tasks share an environment Stale facts, context budget, tenant leakage
Weights / adapters Learned behavior Verifiable feedback and training resources exist Cost, shift, capability regression
Compiled workflow Branches and data dependencies Typed, frequent, stable procedures Missing branches, interface change, accidental rules
Training environment Task, runtime, reference, verifier Long-horizon training needs scale Reward loopholes, proxy bias, contamination

Memory is not weight training; program reuse is not a new model capability. Version the model, memory snapshot, workflow, tool schema and environment independently.

Original map: experience can change four different system layers. The arrows are conceptual choices, not a vendor architecture or a reproduced training pipeline.
Original map: experience can change four different system layers. The arrows are conceptual choices, not a vendor architecture or a reproduced training pipeline. Open full-size diagram

3. What the selected papers establish

Sources were checked November 17, 2026. Dates below are first arXiv submissions, not indexing dates. This is a selective synthesis rather than an exhaustive ranking.

Study and date Object Finding and scope
ReTrace · November 10 [S1] Compile SOPs and traces into workflows Large simulated-tool latency reduction does not imply uniformly faster enterprise execution
Can You Trust Your Finance Agent? · November 13 [S2] Repeated runs and interventions on one shipped agent Held-out cost gains survived; development accuracy gains did not establish a test gain; small case study
Where Should LLM Agents Adapt at Test Time? · November 15 [S3] Context versus weight adaptation on matched streams Context helps but can accompany skipped current-task checks; behavioral association is not causation
RepoFactory · November 16 [S4] Evolve repository-derived training environments Cheap proxies guide environment construction; downstream training must establish usefulness

ReTrace reports enterprise mean duration increasing from 153 to 163 seconds while median falls from 68 to 37; tools can still contain model calls.[S1] The adaptation study reports 28.8% stateless, 49.4% best standalone ICL and 51.6% best ICL+GRPO on Qwen3.5-9B across 109 tasks in four environments. These are protocol-specific means, not commercial guarantees.[S3]

Our editorial inference: experience structure, feedback and execution design deserve evaluation alongside model choice. This does not establish that base-model capabilities are unimportant or make different benchmarks directly comparable.

4. Memory and weights: reuse knowledge, recheck state

In-context learning retains experience without modifying parameters. It can explain where tests live or how an API works, reducing repeated discovery. Yesterday's refundable order is not today's order state; yesterday's passing test is not evidence for today's patch.

The adaptation paper evaluates each incoming task before learning from its feedback. It studies context retention, GRPO with verifiable rewards, and self-distillation with SDPO; effects remain specific to the model and update recipes.[S3] GRPO optimizes behavior using relative rewards from multiple attempts; self-distillation depends on model-produced supervision. Neither removes the need for a reliable verifier.

For an implementation, separate durable environment knowledge, conditional operating rules and transient resource facts. Attach scope, source, version, confirmation state and expiry. Unverified guesses remain candidates even after repeated summarization. Knowing where to check is different from having checked this resource now.

Anthropic's November 6 memory article describes logs, notes, representations and injected context, including offline organization. It is one engineering view, not a universal standard.[S5] Teams without training budgets can improve this layer first; deterministic state checks must not be presented as an RL reproduction.

5. Compile recurring decisions instead of repeatedly planning

ReTrace extracts action conditions and argument sources from SOPs and logged runs, merges a rule representation, and synthesizes executable workflows. Code selects runtime steps; a tool may still call an LLM. Planner-free does not mean model-free everywhere.[S1]

Our independent teaching decomposition starts with a task family such as internal renewal-follow-up drafts. Extract observed state, guard, action, input provenance and completion condition. Parameterize customer identifiers rather than copying one customer's ID into generated code. A trace shows an action happened; it does not prove the action's proper condition.

A restricted intermediate representation can contain disputed → hold and active → draft, each linked to approved policy and observed outcomes. Resolve conflicts against that policy. Mark branches mentioned but never successfully exercised as unwitnessed; executable syntax cannot repair missing evidence.

Before release, check guard overlap/coverage, tool allowlists, types, argument provenance, loop limits, exception exits and completion checks. Our fixture uses a closed enum rather than evaluating arbitrary text. Unknown schemas or conditions go to a bounded agent or human investigation path.

This can remove recurring planning latency, tokens and randomness. It can also consistently repeat a compilation error at high volume. Business drift and open-ended semantics limit coverage. Determinism amplifies the correctness or incorrectness already in the program.

6. Environment evolution: verify the exercise and its grader

RepoFactory constructs isolated repository-based environments and revises them using validity, structural coupling and implementation-scope proxies. This changes the training environment rather than retraining a model at every construction step. Downstream evaluation is still needed.[S4]

Ask what the specification demands, what the workspace exposes, whether the reference passes and whether an empty implementation fails. A file-name-only grader rewards empty files; a leaked oracle rewards copying. A runnable grader need not measure the intended ability.

Our proposed counterexample suite tries empty implementations, constants, removed assertions, skipped dependencies, fake exit codes and public-example overfitting. Keep tests outside solver control; pin runtimes and validate isolation. These are editorial engineering proposals, not claims about the paper's exact implementation.

Optimizing complexity alone can add useless dependencies and call edges. Bound construction budgets, track task families, split by repository/time and keep frozen tests away from environment revision. Check licenses and secrets in source repositories. Treat environments as versioned infrastructure artifacts.

7. Running case: renewal drafts from exploration to execution

A multi-tenant service reads current customer state and prepares an internal follow-up draft. The fixture sends no messages, collects no payment and changes no real account.

Use an agent to explore unfamiliar documentation. After review, compile known branches: disputed means hold, settled means close the draft task, eligible outstanding means draft, unknown means investigate. Every invocation still reads current tenant, resource version and policy. Memory explains fields; it cannot replace that read.

Original scenario: reread current tenant, state and policy before a compiled branch; unknown inputs return to investigation. No messages or payments are sent.
Original scenario: reread current tenant, state and policy before a compiled branch; unknown inputs return to investigation. No messages or payments are sent. Open full-size diagram

If old memory says follow-up is allowed but the current account is disputed, hold it. If saving a draft times out, inspect the request's idempotency key and persisted state before retrying; uncertainty means unresolved, not automatic duplication.

Record request, tenant/resource/version, policy, workflow hash, branch evidence and result. Success means the correct draft exists for the correct object. Neither a completion sentence nor HTTP 200 alone establishes this.

8. Cost and latency: when compilation pays back

Original assumptions: fixed construction/review cost B=$600; agent cost c_a=$0.12 per invocation; workflow base c_w=$0.03; fallback fraction % with incremental c_f=$0.10; review/expected-failure allowance c_r=$0.01. Workflow expected cost is $0.03+0.2×$0.10+$0.01=$0.06.

B is fixed build cost in dollars; c_a, c_w, c_f and c_r are dollars per invocation, r is a fallback fraction, N invocation count. c_f is incremental to c_w; c_r is an average allowance. A finite break-even requires positive per-run saving.

Original cost assumptions: agent total 0.12N; compiled total 600 + 0.06N dollars. The lines meet at 10000 invocations, not a measured paper result.
Original cost assumptions: agent total 0.12N; compiled total 600 + 0.06N dollars. The lines meet at 10000 invocations, not a measured paper result. Open full-size diagram

Saving $0.06 per invocation requires 10000 executions to recover $600. Two thousand quarterly executions do not justify this fixed cost under these assumptions. Rebuilds increase it; a nonpositive saving gives no finite break-even.

Measure planning, tools, waiting, retries and acceptance separately. Removing planning cannot remove web latency or human waiting. Report means, p50/p95, successful-task latency and tool outcomes separately from fast failed exits. Returning an error quickly is not completing the work quickly.[S1]

9. Evaluation: improvement versus contamination and noise

Score before adapting; keep frozen tests out of memory, retrieval and compiler repair. Split task families, tenants and time. Repeat under matched budgets and compare stateless, raw replay, manual workflow, compiled workflow and hybrids.

The finance-agent case did not establish a held-out accuracy improvement despite a development gain; its small single-system scope cannot estimate industry-wide failure ownership.[S2] Report paired differences, uncertainty, sample units, order and budget. Several rubric cells for one task are not independent user samples.

To test whether memory causes skipped verification, intervene on checks under the same policy rather than infer causality from traces. Workflows additionally need branch coverage, unknown fallback, schema-change, conflict, pause and duplicate-request tests. Environments need negative controls and transfer to genuinely held-out tasks.

Track bad actions, unnecessary fallback, skipped checks, privacy, review and drift alongside success and cost. A guard never exercised by a failing input has not been validated.

10. Tools: distinguish orchestration from learning

Need Options Responsibility and limit
Durable execution Temporal / existing queue or state machine History and recovery, not automatic SOP correctness [S6]
Stateful agents LangGraph / existing harness Explicit state and pause/resume, not a proof of business semantics [S7]
Weight-adaptation research Paper framework / verl Requires training, reward design and evaluation, not just API scripting [S3][S8]
Small stable SOP Typed code and restricted rules Easy review; unfamiliar conditions need explicit fallback

Start with where uncertainty actually requires inference. Multiple agents can explore independent candidates but add communication, duplicate work and state conflicts. Measure coordination before increasing parallelism.

11. Release boundaries and open questions

SOPs, memory, traces and tool results can carry errors or prompt injection. Compiling them crosses from untrusted text into executable artifacts: use sandboxing, allowlists, review and static checks. Use authorized structured explanations and observations; do not assume access to a model's private internal reasoning.

Enforce current identity, scope, policy, artifact hash, resource version and expiry. Separate read, draft and external-write authority. Correct historical memory grants no perpetual permission. Shadow and canary releases should stop on unknown schemas, inadequate coverage or rising errors; revert artifacts or use human procedures.

Open problems include selecting compilable task families, estimating unseen-branch risk, choosing among memory/weights/environment changes, retaining current verification and preventing the verifier and solver from co-evolving loopholes. This is a testable design direction, not a claim those problems are solved.

12. Local implementation, negative tests and exercises

The Python 3.11+ standard-library fixture compiles restricted rules and executes synthetic draft operations. It uses no model, training, network, mail or payment service. It rejects conflicts, unwitnessed rules and unknown tools, verifies tenant/policy/resource versions, checks current status and uses an idempotency key.

Download and run locally with Python 3.11+. No network, model credentials or external writes.

agentic-workflow-gate.py
python3 agentic-workflow-gate.py

Expected output

checks=26 current_dispute=hold unknown=investigate duplicate=existing_draft
synthetic_break_even=10000 model_calls=0 external_writes=0
Python · agentic-workflow-gate.py
"""Original offline fixture, Python 3.11+. No models or external effects.
Restricted rule compilation, current-state checks and synthetic draft idempotency.
An in-memory demo, not durable/distributed exactly-once or a paper reproduction.
"""
import copy
import hashlib
import json
import math
from dataclasses import dataclass

ALLOWED = {'active': 'draft', 'disputed': 'hold', 'settled': 'close'}


@dataclass(frozen=True)
class Program:
    policy: str
    rules: tuple
    digest: str


def compile_rules(rules, policy):
    if type(policy) is not str or not policy:
        raise ValueError('policy')
    entries = []
    seen = set()
    for r in rules:
        if set(r) != {'status', 'action', 'witnessed', 'evidence'}:
            raise ValueError('schema')
        s, a = r['status'], r['action']
        if not isinstance(s, str) or not isinstance(a, str):
            raise ValueError('type')
        if s not in ALLOWED or ALLOWED[s] != a or s in seen:
            raise ValueError('conflict_or_unsupported_rule')
        if r['witnessed'] is not True or type(r['evidence']) is not str or not r['evidence']:
            raise ValueError('unwitnessed')
        seen.add(s)
        entries.append((s, a, r['evidence']))
    if seen != set(ALLOWED):
        raise ValueError('incomplete_known_coverage')
    packed = json.dumps([policy, sorted(entries)], separators=(',', ':'))
    return Program(policy, tuple(sorted(entries)), hashlib.sha256(packed.encode()).hexdigest())


def run(program, task, current, store):
    """Current is a fresh authorized read supplied by an adapter in production.
    This fixture checks versions, but has no atomic database compare-and-write.
    """
    for key in ('tenant', 'resource', 'version', 'policy', 'request'):
        if type(task.get(key)) is not str or not task[key]:
            raise ValueError('task_schema')
    if task['tenant'] != current['tenant'] or task['resource'] != current['resource']:
        raise ValueError('scope')
    if task['version'] != current['version']:
        raise ValueError('stale_resource')
    if task['policy'] != current['policy'] or task['policy'] != program.policy:
        raise ValueError('stale_policy')
    rebuilt = compile_rules([dict(status=s, action=a, witnessed=True, evidence=e)
                             for s, a, e in program.rules], program.policy)
    if rebuilt.digest != program.digest:
        raise ValueError('artifact_integrity')
    actions = {s: a for s, a, _ in program.rules}
    action = actions.get(current.get('status'), 'investigate')
    if action != 'draft':
        return action
    key = (task['tenant'], task['request'])
    identity = (task['resource'], current['version'], program.digest)
    if key in store:
        if store[key]['identity'] != identity:
            raise ValueError('idempotency_conflict')
        return 'existing_draft'
    store[key] = {'identity': identity, 'draft': 'Internal synthetic draft only'}
    if store[key]['identity'] != identity or not store[key]['draft']:
        raise ValueError('acceptance_failed')
    return 'created_draft'


def break_even(build, agent, workflow, fallback_rate, fallback_extra, review):
    vals = [build, agent, workflow, fallback_rate, fallback_extra, review]
    if any(type(x) not in (int, float) or not math.isfinite(x) or x < 0 for x in vals):
        raise ValueError('cost_domain')
    if fallback_rate > 1:
        raise ValueError('rate')
    saving = agent - (workflow + fallback_rate * fallback_extra + review)
    return None if saving <= 0 else math.ceil(round(build / saving, 10))


def test():
    checks = 0
    def yes(condition):
        nonlocal checks
        assert condition
        checks += 1
    def rejected(fn):
        nonlocal checks
        try:
            fn()
        except ValueError:
            checks += 1
        else:
            raise AssertionError('unsafe input accepted')
    rules = [dict(status=s, action=a, witnessed=True, evidence='approved-policy:3/'+s)
             for s, a in ALLOWED.items()]
    program = compile_rules(rules, 'p1')
    yes(program.digest == compile_rules(list(reversed(rules)), 'p1').digest)
    for patch in ({'action': 'send_email'}, {'witnessed': False}, {'evidence': ''},
                  {'status': 'unknown'}, {'action': 'hold'}, {'extra': 'execute me'}):
        bad = copy.deepcopy(rules)
        bad[0].update(patch)
        rejected(lambda: compile_rules(bad, 'p1'))
    rejected(lambda: compile_rules(rules + [rules[0]], 'p1'))
    rejected(lambda: compile_rules(rules[:-1], 'p1'))
    task = dict(tenant='t1', resource='customer-7', version='v3', policy='p1', request='r1')
    current = dict(tenant='t1', resource='customer-7', version='v3', policy='p1', status='active')
    store = {}
    yes(run(program, task, current, store) == 'created_draft')
    yes(run(program, task, current, store) == 'existing_draft' and len(store) == 1)
    for status, expected in [('disputed', 'hold'), ('settled', 'close'), ('new_status', 'investigate')]:
        yes(run(program, dict(task, request='new-'+status), dict(current, status=status), store) == expected)
    yes(len(store) == 1)
    for patch in ({'tenant': 't2'}, {'resource': 'customer-8'}, {'version': 'v4'}, {'policy': 'p2'}):
        rejected(lambda: run(program, task, dict(current, **patch), store))
    rejected(lambda: run(program, dict(task, request=''), current, store))
    rejected(lambda: run(Program('p1', program.rules, 'tampered'), task, current, store))
    rejected(lambda: run(program, dict(task, resource='customer-8'),
                         dict(current, resource='customer-8'), store))
    yes(break_even(600, .12, .03, .2, .10, .01) == 10000)
    yes(break_even(600, .04, .03, .2, .10, .01) is None)
    rejected(lambda: break_even(600, .12, .03, 1.1, .10, .01))
    rejected(lambda: break_even(float('nan'), .12, .03, .2, .10, .01))
    print(f'checks={checks} current_dispute=hold unknown=investigate duplicate=existing_draft')
    print('synthetic_break_even=10000 model_calls=0 external_writes=0')


if __name__ == '__main__':
    test()

This demonstrates control flow and boundaries, not ReTrace, GRPO or RepoFactory reproduction. Production still needs persistent transactions, cross-process idempotency, locks, timeouts and output acceptance; an in-memory dictionary cannot provide distributed exactly-once execution.

Exercises: add a promised branch with policy and witnessed evidence; specify additional controls before replacing internal drafts with real email, without sending it; inject write-success/response-timeout and require a state read before retry; freeze task families and compare current verification with/without retained experience. Grade semantics/evidence, recovery, negative tests and evaluation/explanation at 25% each.

Predict, test and keep evidence

Before revealing an answer, predict one result. After the exercise, record the discrepancy and a transfer test. Saved locally across language editions.

Open notebook / export / clear →

The mathematical review scope is recorded per lesson. It does not establish empirical paper reproduction; report suspected errors in your notes. Review scope

Primary sources and further reading

Sources checked November 17, 2026. Paper dates: November 10–16; memory engineering source November 6. Results are author-reported; diagrams, scenario, arithmetic and offline fixture are original. No model training or benchmark reproduction.

  1. S1 · ReTrace · first submitted 2026-11-10https://arxiv.org/html/2611.14492v1 · 2026-11-17
  2. S2 · Can You Trust Your Finance Agent? · first submitted 2026-11-13https://arxiv.org/html/2611.17939v1 · 2026-11-17
  3. S3 · Where Should LLM Agents Adapt at Test Time? · first submitted 2026-11-15https://arxiv.org/html/2611.19700v1 · 2026-11-17
  4. S4 · RepoFactory · first submitted 2026-11-16https://arxiv.org/html/2611.21152v1 · 2026-11-17
  5. S5 · Anthropic: The components of agent memory · 2026-11-06https://www.anthropic.com/research/components-of-agent-memory · 2026-11-17
  6. S6 · Temporal workflow executionhttps://docs.temporal.io/workflow-execution · 2026-11-17
  7. S7 · LangGraph persistencehttps://docs.langchain.com/oss/python/langgraph/persistence · 2026-11-17
  8. S8 · verl official repositoryhttps://github.com/verl-project/verl · 2026-11-17

Related learning

RSI · Agent architecture