Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ docs/PurgeRequestInput.md
docs/PurgeStepData.md
docs/PurgeSummary.md
docs/Reason.md
docs/RebuildData.md
docs/RebuildInput.md
docs/RebuildProgress.md
docs/RebuildStatusData.md
docs/RebuildStatusInput.md
docs/RelatedTagUsageBody.md
docs/RelatedTagUsageItem.md
docs/RelatedTagUsageListData.md
Expand Down Expand Up @@ -112,6 +117,8 @@ docs/SuccessEnvelopeKbListData.md
docs/SuccessEnvelopeKbSearchData.md
docs/SuccessEnvelopePurgeJobData.md
docs/SuccessEnvelopePurgeRequestData.md
docs/SuccessEnvelopeRebuildData.md
docs/SuccessEnvelopeRebuildStatusData.md
docs/SuccessEnvelopeRelatedTagUsageListData.md
docs/SuccessEnvelopeSearchData.md
docs/SuccessEnvelopeTagBindData.md
Expand Down Expand Up @@ -233,6 +240,11 @@ everos_cloud/models/purge_request_input.py
everos_cloud/models/purge_step_data.py
everos_cloud/models/purge_summary.py
everos_cloud/models/reason.py
everos_cloud/models/rebuild_data.py
everos_cloud/models/rebuild_input.py
everos_cloud/models/rebuild_progress.py
everos_cloud/models/rebuild_status_data.py
everos_cloud/models/rebuild_status_input.py
everos_cloud/models/related_tag_usage_body.py
everos_cloud/models/related_tag_usage_item.py
everos_cloud/models/related_tag_usage_list_data.py
Expand Down Expand Up @@ -274,6 +286,8 @@ everos_cloud/models/success_envelope_kb_list_data.py
everos_cloud/models/success_envelope_kb_search_data.py
everos_cloud/models/success_envelope_purge_job_data.py
everos_cloud/models/success_envelope_purge_request_data.py
everos_cloud/models/success_envelope_rebuild_data.py
everos_cloud/models/success_envelope_rebuild_status_data.py
everos_cloud/models/success_envelope_related_tag_usage_list_data.py
everos_cloud/models/success_envelope_search_data.py
everos_cloud/models/success_envelope_tag_bind_data.py
Expand Down Expand Up @@ -393,6 +407,11 @@ test/test_purge_request_input.py
test/test_purge_step_data.py
test/test_purge_summary.py
test/test_reason.py
test/test_rebuild_data.py
test/test_rebuild_input.py
test/test_rebuild_progress.py
test/test_rebuild_status_data.py
test/test_rebuild_status_input.py
test/test_related_tag_usage_body.py
test/test_related_tag_usage_item.py
test/test_related_tag_usage_list_data.py
Expand Down Expand Up @@ -435,6 +454,8 @@ test/test_success_envelope_kb_list_data.py
test/test_success_envelope_kb_search_data.py
test/test_success_envelope_purge_job_data.py
test/test_success_envelope_purge_request_data.py
test/test_success_envelope_rebuild_data.py
test/test_success_envelope_rebuild_status_data.py
test/test_success_envelope_related_tag_usage_list_data.py
test/test_success_envelope_search_data.py
test/test_success_envelope_tag_bind_data.py
Expand Down
4 changes: 3 additions & 1 deletion docs/DeleteByIdsData.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DeleteByIdsData

Result of a by-ids soft delete. A 200 means the request was applied; ids that were already gone are a no-op, not a failure, so a re-sent batch is safe.
Result of a by-ids delete. A 200 means the request was applied; ids that were already gone are a no-op, not a failure, so a re-sent batch is safe.

## Properties

Expand All @@ -9,6 +9,8 @@ Name | Type | Description | Notes
**memory_type** | **str** | The memory type the request named. |
**success** | **bool** | Always true on a 200 — the batch was applied. Failures use the error envelope instead. |
**deleted** | **int** | Records this request removed. Ids that were absent, already deleted, another tenant's or (with `user_id`) another user's are skipped and count 0 alike. |
**rebuild_required** | **bool** | True when derived memories built from the deleted ones were kept and may still contain their content; call /memory/rebuild to regenerate them. | [optional] [default to False]
**targets** | **List[str]** | What /memory/rebuild would regenerate; empty when nothing. | [optional]

## Example

Expand Down
4 changes: 3 additions & 1 deletion docs/DeleteByIdsInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DeleteByIdsInput

Soft-delete the named memory records [Cloud-only].
Permanently delete the named memory records [Cloud-only].

## Properties

Expand All @@ -10,6 +10,8 @@ Name | Type | Description | Notes
**memory_ids** | **List[str]** | 1 to 50 memory ids. Every one must be well-formed; duplicates are collapsed. |
**reason** | [**Reason**](Reason.md) | | [optional]
**user_id** | **str** | | [optional]
**app_id** | **str** | | [optional]
**project_id** | **str** | | [optional]

## Example

Expand Down
6 changes: 4 additions & 2 deletions docs/DeleteData.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# DeleteData

Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were applied + how many mongo records were soft-deleted across all memory types.
Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were applied + how many mongo records were deleted across all memory types.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**filters** | **List[str]** | Scope filters used, e.g. ['user_id'] or ['user_id', 'session_id'] | [optional]
**count** | **int** | Total memory records soft-deleted | [optional] [default to 0]
**count** | **int** | Total memory records deleted | [optional] [default to 0]
**rebuild_required** | **bool** | True when derived memories built from the deleted ones were kept and may still contain their content; call /memory/rebuild to regenerate them. | [optional] [default to False]
**targets** | **List[str]** | What /memory/rebuild would regenerate; empty when nothing. | [optional]

## Example

Expand Down
168 changes: 164 additions & 4 deletions docs/MemoryApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ Method | HTTP request | Description
[**add_memory**](MemoryApi.md#add_memory) | **POST** /api/v2/memory/add | Add messages [OSS + Cloud]
[**bind_tags**](MemoryApi.md#bind_tags) | **POST** /api/v2/memory/tag/bind | Bind tags to memories [Cloud]
[**confirm_purge**](MemoryApi.md#confirm_purge) | **POST** /api/v2/memory/purge/confirm | Confirm a memory-space purge (step 2 of 2) [Cloud-only]
[**delete_memories_by_ids**](MemoryApi.md#delete_memories_by_ids) | **POST** /api/v2/memory/delete_by_ids | Soft-delete memory records by id [Cloud-only]
[**delete_memories_by_ids**](MemoryApi.md#delete_memories_by_ids) | **POST** /api/v2/memory/delete_by_ids | Delete memory records by id [Cloud-only]
[**delete_memory**](MemoryApi.md#delete_memory) | **POST** /api/v2/memory/delete | Delete memories [Cloud-only]
[**edit_profile**](MemoryApi.md#edit_profile) | **POST** /api/v2/memory/edit | Edit profile items [Cloud-only]
[**flush_memory**](MemoryApi.md#flush_memory) | **POST** /api/v2/memory/flush | Force memory extraction [OSS + Cloud]
[**get_memory**](MemoryApi.md#get_memory) | **POST** /api/v2/memory/get | Get memories [OSS + Cloud]
[**get_purge_job**](MemoryApi.md#get_purge_job) | **GET** /api/v2/memory/purge/{job_id} | Get a memory-space purge job [Cloud-only]
[**get_rebuild_status**](MemoryApi.md#get_rebuild_status) | **POST** /api/v2/memory/rebuild/status | Status of a rebuild job [Cloud-only]
[**rebuild_memory**](MemoryApi.md#rebuild_memory) | **POST** /api/v2/memory/rebuild | Rebuild derived memories a delete left stale [Cloud-only]
[**replace_tags**](MemoryApi.md#replace_tags) | **POST** /api/v2/memory/tag/replace | Replace tags on memories [Cloud]
[**request_purge**](MemoryApi.md#request_purge) | **POST** /api/v2/memory/purge | Request a memory-space purge (step 1 of 2) [Cloud-only]
[**retrieve_context**](MemoryApi.md#retrieve_context) | **POST** /api/v2/memory/context | Context Retrieval [Cloud-only]
Expand Down Expand Up @@ -278,7 +280,7 @@ Name | Type | Description | Notes
# **delete_memories_by_ids**
> SuccessEnvelopeDeleteByIdsData delete_memories_by_ids(delete_by_ids_input)

Soft-delete memory records by id [Cloud-only]
Delete memory records by id [Cloud-only]

Soft-delete up to 50 memories chosen by id, together with what was derived from them (extracted facts, cluster membership and search-index copies). Only \"episode\" is supported today. - Every id must be well-formed; one malformed id rejects the whole request with 422 and nothing is deleted. - Ids that do not exist, are already deleted, or belong to another tenant are skipped — the rest of the batch is still deleted, so re-sending a batch is safe. Duplicates are collapsed. - `deleted` in the response counts the records this request removed. Every skipped id counts 0 alike, so the count does not reveal which ids exist. Pass `user_id` to delete only that user's memories: an id owned by anyone else is skipped like a missing one. Set it from your own session (the signed-in user), never from model output, so that an agent tool cannot touch another user's memory with a wrong or invented id. To remove memories by owner or session rather than by id, use /api/v2/memory/delete.

Expand Down Expand Up @@ -316,7 +318,7 @@ with everos_cloud.ApiClient(configuration) as api_client:
delete_by_ids_input = everos_cloud.DeleteByIdsInput() # DeleteByIdsInput |

try:
# Soft-delete memory records by id [Cloud-only]
# Delete memory records by id [Cloud-only]
api_response = api_instance.delete_memories_by_ids(delete_by_ids_input)
print("The response of MemoryApi->delete_memories_by_ids:\n")
pprint(api_response)
Expand Down Expand Up @@ -778,6 +780,164 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_rebuild_status**
> SuccessEnvelopeRebuildStatusData get_rebuild_status(rebuild_status_input)

Status of a rebuild job [Cloud-only]

### Example

* Bearer Authentication (BearerAuth):

```python
import everos_cloud
from everos_cloud.models.rebuild_status_input import RebuildStatusInput
from everos_cloud.models.success_envelope_rebuild_status_data import SuccessEnvelopeRebuildStatusData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
host = "https://api.evermind.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = everos_cloud.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = everos_cloud.MemoryApi(api_client)
rebuild_status_input = everos_cloud.RebuildStatusInput() # RebuildStatusInput |

try:
# Status of a rebuild job [Cloud-only]
api_response = api_instance.get_rebuild_status(rebuild_status_input)
print("The response of MemoryApi->get_rebuild_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->get_rebuild_status: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**rebuild_status_input** | [**RebuildStatusInput**](RebuildStatusInput.md)| |

### Return type

[**SuccessEnvelopeRebuildStatusData**](SuccessEnvelopeRebuildStatusData.md)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **rebuild_memory**
> SuccessEnvelopeRebuildData rebuild_memory(rebuild_input)

Rebuild derived memories a delete left stale [Cloud-only]

Deletes never spend LLM calls: a derived memory that can only be regenerated by an LLM (the profile, session summaries, agent skills) is kept and marked stale (`rebuild_required` / `targets` on the delete response, `stale` on the profile). This call starts one background job that regenerates the marked ones from the remaining memories. Free; the extraction it runs is metered like any extraction, so like `add` it is refused with 429 once the account's mcu balance is exhausted. One active job per owner: a second call returns the running job. Poll `/memory/rebuild/status` with the returned `job_id`. While a profile rebuild runs, the profile holds only its manually edited items plus what has been re-extracted so far: the LLM-generated items are cleared when the job starts and come back batch by batch. `stale` stays `true` until the job finishes.

### Example

* Bearer Authentication (BearerAuth):

```python
import everos_cloud
from everos_cloud.models.rebuild_input import RebuildInput
from everos_cloud.models.success_envelope_rebuild_data import SuccessEnvelopeRebuildData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
host = "https://api.evermind.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = everos_cloud.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = everos_cloud.MemoryApi(api_client)
rebuild_input = everos_cloud.RebuildInput() # RebuildInput |

try:
# Rebuild derived memories a delete left stale [Cloud-only]
api_response = api_instance.rebuild_memory(rebuild_input)
print("The response of MemoryApi->rebuild_memory:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->rebuild_memory: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**rebuild_input** | [**RebuildInput**](RebuildInput.md)| |

### Return type

[**SuccessEnvelopeRebuildData**](SuccessEnvelopeRebuildData.md)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **replace_tags**
> SuccessEnvelopeTagReplaceData replace_tags(tag_replace_input)

Expand Down Expand Up @@ -951,7 +1111,7 @@ Name | Type | Description | Notes

Context Retrieval [Cloud-only]

Retrieve memories with a multi-round, LLM-driven search loop. An LLM plans and runs several searches over the owner's memories — keyword, semantic, hybrid, topic-cluster, and reading the surrounding conversation or a whole session — and keeps searching until it judges the evidence sufficient to answer `query`. The memories it found are returned. **The response contains memories, not an answer**: the model's own answer is discarded. Use it for questions a single search answers poorly: multi-hop, temporal, or spread across several conversations. For simple lookups, `/search` is faster and cheaper. **Request** — the same body as `/search`, except: - `user_id` is required and `agent_id` is not accepted (422): the loop searches a user's memories only. Use `/search` for agent memories. - `method` is fixed to `\"context\"`. It can be omitted; any other value is a 422. - `min_score` is not supported (422): results are ranked by rank fusion, not by a similarity score. - `radius`, `enable_llm_rerank` and `with_readable_episode` are not accepted (422): the loop does not use them. **Response** — the same `SearchData` shape as `/search`: - The loop returns its memories in `episodes`. `profiles` (`include_profile`) and `unprocessed_messages` (a top-level `session_id` filter) are filled exactly as on `/search`. - `episodes[].cited` is `true` for memories the model named as the ones its answer rested on. - `episodes[].score` is a rank-fusion score, not a similarity: roughly 0.01–0.05, plus 1.0 for a cited memory, so cited memories come first. It is not comparable with `/search` scores. **Limits** — by default at most 5 LLM rounds and 45 seconds per request. Reaching a limit is not an error: the memories found so far are returned. **Latency** — several LLM calls per request, so noticeably slower than `/search`.
Retrieve memories with a multi-round, LLM-driven search loop. An LLM plans and runs several searches over the owner's memories — keyword, semantic, hybrid, topic-cluster, and reading the surrounding conversation or a whole session — and keeps searching until it judges the evidence sufficient to answer `query`. The memories it found are returned. **By default the response contains memories, not an answer**: the model's own answer is discarded. A deployment can enable answer mode, which also returns that answer in `answer`. Use it for questions a single search answers poorly: multi-hop, temporal, or spread across several conversations. For simple lookups, `/search` is faster and cheaper. **Request** — the same body as `/search`, except: - `user_id` is required and `agent_id` is not accepted (422): the loop searches a user's memories only. Use `/search` for agent memories. - `method` is fixed to `\"context\"`. It can be omitted; any other value is a 422. - `min_score` is not supported (422): results are ranked by rank fusion, not by a similarity score. - `radius`, `enable_llm_rerank` and `with_readable_episode` are not accepted (422): the loop does not use them. **Response** — the same `SearchData` shape as `/search`: - The loop returns its memories in `episodes`. `profiles` (`include_profile`) and `unprocessed_messages` (a top-level `session_id` filter) are filled exactly as on `/search`. - `episodes[].cited` is `true` for memories the model named as the ones its answer rested on. - `episodes[].score` is a rank-fusion score, not a similarity: roughly 0.01–0.05, plus 1.0 for a cited memory, so cited memories come first. It is not comparable with `/search` scores. - In answer mode, `answer` holds the model's answer (\"\" if it gave none), cited memories come first **in the order the model cited them**, and each cited score is above every uncited one. Without answer mode, `answer` is absent. **Limits** — by default at most 5 LLM rounds and 45 seconds per request. Reaching a limit is not an error: the memories found so far are returned. **Latency** — several LLM calls per request, so noticeably slower than `/search`.

### Example

Expand Down
1 change: 1 addition & 0 deletions docs/ProfileItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**profile_data** | **Dict[str, object]** | The profile itself — the explicit_info and implicit_traits items maintained by extraction and by /api/v2/memory/edit. Each item's id is what an edit operation targets. | [optional]
**created_at** | **datetime** | | [optional]
**updated_at** | **datetime** | | [optional]
**stale** | **bool** | True when memories this profile was built from have been deleted; it may still contain information from them until /memory/rebuild is called. During a rebuild it stays true, and the profile holds only its manually edited items plus what has been re-extracted so far. | [optional] [default to False]

## Example

Expand Down
Loading