> ## Documentation Index
> Fetch the complete documentation index at: https://smithers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# <MemoryTrellis>

> Apply one bounded memory policy to every task generated by Trellis.

`<MemoryTrellis>` is `<Trellis>` wrapped in `<Memory>`. Initial and continuation
authors, validation, workers, settlement, and the final task all inherit the
same normalized memory policy.

```tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
/** @jsxImportSource smthrs */
import { MemoryTrellis } from "smthrs";

<MemoryTrellis
  memory={{
    bank: "project-checkout",
    tags: ["experiment:learn"],
    recall: "auto",
    budget: "mid",
    maxTokens: 2048,
    retain: "on-complete",
    tools: true,
  }}
  prompt="Build the requested result and prove it works."
  agents={{ sol, fable, terra, luna }}
  outputs={outputs}
  maxConcurrency={4}
/>
```

The component accepts every [`TrellisProps`](/components/trellis#props) field
plus one required `memory` field containing [`MemoryProps`](/components/memory#props)
without `children`:

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type MemoryTrellisProps = TrellisProps & {
  memory: Omit<MemoryProps, "children">;
};
```

## Runtime guarantees

Each generated task receives the policy in `TaskDescriptor.memoryConfig`, so
scorers and eval reports can segment results by bank, tags, recall mode,
retention mode, or tool access. Give experiment arms stable tags when they
must remain isolated.

The standard memory runtime supplies the execution guarantees:

* recalled context and primers share the `maxTokens` bound
* recall failures run the original task prompt instead of failing the task
* one task execution keeps its recalled snapshot frozen across retries
* `retain="on-complete"` writes asynchronously after successful completion

See [`<Memory>`](/components/memory) for bank filtering, backend selection,
and retention details. Trellis still requires the run's pinned concurrency to
match `maxConcurrency`.

## Experiment arms

Keep all non-memory Trellis props identical when comparing arms.

### Baseline

```tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
<Trellis {...trellisProps} />
```

### Recall only

```tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
<MemoryTrellis
  {...trellisProps}
  memory={{
    bank: "project-checkout",
    tags: ["experiment:recall-only"],
    recall: "auto",
    retain: "off",
    tools: false,
  }}
/>
```

### Recall and learn

```tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
<MemoryTrellis
  {...trellisProps}
  memory={{
    bank: "project-checkout",
    tags: ["experiment:learn"],
    recall: "auto",
    retain: "on-complete",
    tools: true,
  }}
/>
```
