Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion hindsight-docs/docs/developer/api/recall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ The `tags_match` parameter controls the filtering logic:
| `any_strict` | Excluded | Memory has **at least one** of the specified tags |
| `all` | Included | Memory has **all** of the specified tags |
| `all_strict` | Excluded | Memory has **all** of the specified tags |
| `exact` | Excluded | Memory has **exactly** the specified tag set |

#### Scenario setup

Expand Down Expand Up @@ -271,6 +272,12 @@ Use this for strict scope enforcement where a memory must explicitly belong to *
A memory with tags `["user:alice", "team", "project:x"]` will still match a filter of `["user:alice", "team"]` under `all_strict` — extra tags on the memory are not a problem. The filter only requires the memory to contain **at least** the specified tags.
:::

#### `exact` — set equality, excludes untagged

Returns memories whose tag set is exactly equal to the specified tags, regardless of tag order. Unlike `all_strict`, memories with extra tags do not match.

Use this when filtering a precise observation scope returned by `GET /v1/default/banks/{bank_id}/observations/scopes`, where `["user:alice"]` should not also match observations scoped to `["user:alice", "project:x"]`.

### tag_groups

`tag_groups` is a list of compound boolean tag filters. The groups in the list are AND-ed together at the top level. Each group is a recursive boolean expression: a **leaf** node `{tags, match}`, or a **compound** node `{and: [...]}`, `{or: [...]}`, or `{not: ...}`.
Expand All @@ -283,7 +290,7 @@ A memory with tags `["user:alice", "team", "project:x"]` will still match a filt
{ "tags": ["step:5", "step:8"], "match": "any_strict" }
```

`match` accepts the same values as `tags_match`: `any`, `all`, `any_strict`, `all_strict`. Defaults to `any_strict`.
`match` accepts the same values as `tags_match`: `any`, `all`, `any_strict`, `all_strict`, `exact`. Defaults to `any_strict`.

#### Compound nodes

Expand Down
2 changes: 1 addition & 1 deletion hindsight-docs/docs/developer/api/reflect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ An optional JSON Schema object. When provided, the LLM generates a response that

### tags

Filters which memories the agent can access during reflection. Works identically to [recall tags](./recall#tags) — only memories matching the specified tags are considered. The `tags_match` parameter controls the matching logic (`any`, `all`, `any_strict`, `all_strict`) with the same semantics as recall.
Filters which memories the agent can access during reflection. Works identically to [recall tags](./recall#tags) — only memories matching the specified tags are considered. The `tags_match` parameter controls the matching logic (`any`, `all`, `any_strict`, `all_strict`, `exact`) with the same semantics as recall.

<Tabs>
<TabItem value="python" label="Python">
Expand Down
2 changes: 2 additions & 0 deletions hindsight-docs/docs/developer/observations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ By default, observations are scoped to all of a memory's tags combined. The `obs

See [`observation_scopes` in the Retain API](./api/retain#observation_scopes) for the full explanation and options.

To inspect the scopes that already exist in a bank, call `GET /v1/default/banks/{bank_id}/observations/scopes`. The response lists each exact tag set with its observation count; the empty tag list is the global scope. Use a returned scope as `tags` with `tags_match: "exact"` when you need to filter to that precise observation scope without also matching observations that carry extra tags.

---

## Observations Mission
Expand Down
9 changes: 8 additions & 1 deletion skills/hindsight-docs/references/developer/api/recall.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ The `tags_match` parameter controls the filtering logic:
| `any_strict` | Excluded | Memory has **at least one** of the specified tags |
| `all` | Included | Memory has **all** of the specified tags |
| `all_strict` | Excluded | Memory has **all** of the specified tags |
| `exact` | Excluded | Memory has **exactly** the specified tag set |

#### Scenario setup

Expand Down Expand Up @@ -515,6 +516,12 @@ Use this for strict scope enforcement where a memory must explicitly belong to *
> **💡 Extra tags are fine**
>
A memory with tags `["user:alice", "team", "project:x"]` will still match a filter of `["user:alice", "team"]` under `all_strict` — extra tags on the memory are not a problem. The filter only requires the memory to contain **at least** the specified tags.
#### `exact` — set equality, excludes untagged

Returns memories whose tag set is exactly equal to the specified tags, regardless of tag order. Unlike `all_strict`, memories with extra tags do not match.

Use this when filtering a precise observation scope returned by `GET /v1/default/banks/{bank_id}/observations/scopes`, where `["user:alice"]` should not also match observations scoped to `["user:alice", "project:x"]`.

### tag_groups

`tag_groups` is a list of compound boolean tag filters. The groups in the list are AND-ed together at the top level. Each group is a recursive boolean expression: a **leaf** node `{tags, match}`, or a **compound** node `{and: [...]}`, `{or: [...]}`, or `{not: ...}`.
Expand All @@ -527,7 +534,7 @@ A memory with tags `["user:alice", "team", "project:x"]` will still match a filt
{ "tags": ["step:5", "step:8"], "match": "any_strict" }
```

`match` accepts the same values as `tags_match`: `any`, `all`, `any_strict`, `all_strict`. Defaults to `any_strict`.
`match` accepts the same values as `tags_match`: `any`, `all`, `any_strict`, `all_strict`, `exact`. Defaults to `any_strict`.

#### Compound nodes

Expand Down
2 changes: 1 addition & 1 deletion skills/hindsight-docs/references/developer/api/reflect.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ rm -f schema.json

### tags

Filters which memories the agent can access during reflection. Works identically to [recall tags](./recall#tags) — only memories matching the specified tags are considered. The `tags_match` parameter controls the matching logic (`any`, `all`, `any_strict`, `all_strict`) with the same semantics as recall.
Filters which memories the agent can access during reflection. Works identically to [recall tags](./recall#tags) — only memories matching the specified tags are considered. The `tags_match` parameter controls the matching logic (`any`, `all`, `any_strict`, `all_strict`, `exact`) with the same semantics as recall.

### Python

Expand Down
2 changes: 2 additions & 0 deletions skills/hindsight-docs/references/developer/observations.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ By default, observations are scoped to all of a memory's tags combined. The `obs

See [`observation_scopes` in the Retain API](./api/retain#observation_scopes) for the full explanation and options.

To inspect the scopes that already exist in a bank, call `GET /v1/default/banks/{bank_id}/observations/scopes`. The response lists each exact tag set with its observation count; the empty tag list is the global scope. Use a returned scope as `tags` with `tags_match: "exact"` when you need to filter to that precise observation scope without also matching observations that carry extra tags.

---

## Observations Mission
Expand Down