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

# Memories

> Give Struct Agent durable context about your services and team.

Give Struct Agent durable context it can reuse, such as service ownership, operating conventions and verified findings. Read existing memory before editing it, and preserve unrelated facts.

## Read before editing

```bash theme={null}
struct memory struct-md show --json > struct-md.json
jq -j .body struct-md.json > STRUCT.md
```

Read the existing content and version together. Edit the local copy to add the requested facts without replacing unrelated context. Workspace admins can save changes:

```bash theme={null}
struct memory struct-md edit --file STRUCT.md --expected-version "$(jq .version struct-md.json)" --reason "Updated service ownership"
struct memory struct-md show --json
```

If the version changed, read the new body and reconcile the edit. Do not retry by dropping the version check. The body limit is 4,000 tokens. `struct memory struct-md generate --wait` asks Struct to generate company context while it is empty or after a failed generation; it needs an admin and runs an agent.

These commands manage the named STRUCT.md memory. Other scoped memories use the Struct app or teammate conversation and their own access rules. Memories are available to every workspace; an older server can still report `memories_not_enabled`.

Verify the saved content, and exclude credentials or material the workspace should not share.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.