diff --git a/docs/DeleteData.md b/docs/DeleteData.md index 130e2ae..a29ad03 100644 --- a/docs/DeleteData.md +++ b/docs/DeleteData.md @@ -1,6 +1,6 @@ # DeleteData -Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were applied + how many mongo records were deleted across all memory types. +Which scope filters were applied and how many memory records were deleted across all memory types. ## Properties diff --git a/docs/MemoryApi.md b/docs/MemoryApi.md index 2dda06b..b39e27f 100644 --- a/docs/MemoryApi.md +++ b/docs/MemoryApi.md @@ -282,7 +282,7 @@ Name | Type | Description | Notes 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. +Permanently 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. Pass `app_id` and/or `project_id` the same way to delete only inside that app or project: an id outside it is skipped like a missing one. A stale profile, session summary or skill left behind is reported in `rebuild_required` / `targets`; /api/v2/memory/rebuild regenerates it. To remove memories by owner or session rather than by id, use /api/v2/memory/delete. ### Example @@ -366,7 +366,7 @@ Name | Type | Description | Notes Delete memories [Cloud-only] -Soft-delete memories within a scope. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. The response echoes which scope filters were applied and how many records were removed across all memory types. +Permanently delete memories within a scope. There is no undo. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. - A delete by `session_id` alone also removes that session's source messages. The response echoes which scope filters were applied and how many records were removed across all memory types. Derived memories that only an LLM can regenerate (profile, session summaries, agent skills) are kept and marked stale: `rebuild_required` and `targets` say so, and /api/v2/memory/rebuild regenerates them. ### Example @@ -785,6 +785,8 @@ Name | Type | Description | Notes Status of a rebuild job [Cloud-only] +Read a rebuild job started by /api/v2/memory/rebuild: its `status` (`queued`, `running`, `succeeded`, `failed`), `progress`, and `error` when it failed. An unknown `job_id` is a 404. + ### Example * Bearer Authentication (BearerAuth): @@ -855,6 +857,11 @@ Name | Type | Description | Notes |-------------|-------------|------------------| **200** | Successful Response | - | **422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit or quota exceeded. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | +**404** | No rebuild job with this `job_id` (`not_found`). | - | [[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) @@ -863,7 +870,7 @@ Name | Type | Description | Notes 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. +Regenerate the derived memories that deletes left stale. A delete never spends LLM calls. Derived memories that only an LLM can regenerate (the user profile, session summaries, agent skills) are kept and marked stale instead: the delete response has `rebuild_required` and `targets`, and the profile has `stale`. This call starts one background job that regenerates them from the remaining memories. Nothing is regenerated until you call it, so batch your deletes first. - Pass `user_id` (profile, session summaries) or `agent_id` (skills). `targets` narrows the rebuild; by default everything marked stale is rebuilt. - `dry_run` reports what would be rebuilt (`estimated_episodes` sizes a profile rebuild) and spends nothing. `force` rebuilds the profile or skills even when nothing is marked; an owner with no profile yet has none to rebuild. - One job per owner at a time: a second call returns the running job with `status: already_running`. - The call is free; the extraction it runs is metered like any extraction, so it is refused with 429 once the account's usage quota is exhausted. While a profile rebuild runs, the profile holds only its manually edited items plus what has been re-extracted so far, and `stale` stays `true` until the job finishes. Poll /api/v2/memory/rebuild/status with the returned `job_id`. ### Example @@ -935,6 +942,10 @@ Name | Type | Description | Notes |-------------|-------------|------------------| **200** | Successful Response | - | **422** | Validation Error | - | +**401** | Missing or invalid bearer token. | - | +**403** | Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). | - | +**429** | Rate limit exceeded, or the account's usage quota is exhausted: the rebuild's extraction is metered, so it is refused until the quota is topped up. | - | +**503** | The gateway could not reach the authentication service. Transient — retry with backoff. | - | [[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) @@ -1447,7 +1458,7 @@ Name | Type | Description | Notes Edit one memory record [Cloud-only] -Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - No `app_id` / `project_id`: the record already knows its scope. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. +Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - `app_id` / `project_id` are optional guards, not a scope: the record already knows its scope. When set, a record in any other app or project is a 404, like a missing one. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. ### Example diff --git a/everos_cloud/__init__.py b/everos_cloud/__init__.py index aab0114..441e88a 100644 --- a/everos_cloud/__init__.py +++ b/everos_cloud/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.3.0-rc4" +__version__ = "1.3.0" # import apis into sdk package from everos_cloud.api.knowledge_api import KnowledgeApi diff --git a/everos_cloud/api/memory_api.py b/everos_cloud/api/memory_api.py index 55db503..c19d612 100644 --- a/everos_cloud/api/memory_api.py +++ b/everos_cloud/api/memory_api.py @@ -959,7 +959,7 @@ def delete_memories_by_ids( ) -> SuccessEnvelopeDeleteByIdsData: """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. + Permanently 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. Pass `app_id` and/or `project_id` the same way to delete only inside that app or project: an id outside it is skipped like a missing one. A stale profile, session summary or skill left behind is reported in `rebuild_required` / `targets`; /api/v2/memory/rebuild regenerates it. To remove memories by owner or session rather than by id, use /api/v2/memory/delete. :param delete_by_ids_input: (required) :type delete_by_ids_input: DeleteByIdsInput @@ -1031,7 +1031,7 @@ def delete_memories_by_ids_with_http_info( ) -> ApiResponse[SuccessEnvelopeDeleteByIdsData]: """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. + Permanently 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. Pass `app_id` and/or `project_id` the same way to delete only inside that app or project: an id outside it is skipped like a missing one. A stale profile, session summary or skill left behind is reported in `rebuild_required` / `targets`; /api/v2/memory/rebuild regenerates it. To remove memories by owner or session rather than by id, use /api/v2/memory/delete. :param delete_by_ids_input: (required) :type delete_by_ids_input: DeleteByIdsInput @@ -1103,7 +1103,7 @@ def delete_memories_by_ids_without_preload_content( ) -> RESTResponseType: """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. + Permanently 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. Pass `app_id` and/or `project_id` the same way to delete only inside that app or project: an id outside it is skipped like a missing one. A stale profile, session summary or skill left behind is reported in `rebuild_required` / `targets`; /api/v2/memory/rebuild regenerates it. To remove memories by owner or session rather than by id, use /api/v2/memory/delete. :param delete_by_ids_input: (required) :type delete_by_ids_input: DeleteByIdsInput @@ -1248,7 +1248,7 @@ def delete_memory( ) -> SuccessEnvelopeDeleteData: """Delete memories [Cloud-only] - Soft-delete memories within a scope. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. The response echoes which scope filters were applied and how many records were removed across all memory types. + Permanently delete memories within a scope. There is no undo. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. - A delete by `session_id` alone also removes that session's source messages. The response echoes which scope filters were applied and how many records were removed across all memory types. Derived memories that only an LLM can regenerate (profile, session summaries, agent skills) are kept and marked stale: `rebuild_required` and `targets` say so, and /api/v2/memory/rebuild regenerates them. :param delete_input: (required) :type delete_input: DeleteInput @@ -1320,7 +1320,7 @@ def delete_memory_with_http_info( ) -> ApiResponse[SuccessEnvelopeDeleteData]: """Delete memories [Cloud-only] - Soft-delete memories within a scope. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. The response echoes which scope filters were applied and how many records were removed across all memory types. + Permanently delete memories within a scope. There is no undo. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. - A delete by `session_id` alone also removes that session's source messages. The response echoes which scope filters were applied and how many records were removed across all memory types. Derived memories that only an LLM can regenerate (profile, session summaries, agent skills) are kept and marked stale: `rebuild_required` and `targets` say so, and /api/v2/memory/rebuild regenerates them. :param delete_input: (required) :type delete_input: DeleteInput @@ -1392,7 +1392,7 @@ def delete_memory_without_preload_content( ) -> RESTResponseType: """Delete memories [Cloud-only] - Soft-delete memories within a scope. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. The response echoes which scope filters were applied and how many records were removed across all memory types. + Permanently delete memories within a scope. There is no undo. - At least one of `user_id`, `agent_id` or `session_id` is required — an empty body is rejected with 422. - `user_id` and `agent_id` are mutually exclusive. - A delete by `session_id` alone also removes that session's source messages. The response echoes which scope filters were applied and how many records were removed across all memory types. Derived memories that only an LLM can regenerate (profile, session summaries, agent skills) are kept and marked stale: `rebuild_required` and `targets` say so, and /api/v2/memory/rebuild regenerates them. :param delete_input: (required) :type delete_input: DeleteInput @@ -2680,6 +2680,7 @@ def get_rebuild_status( ) -> SuccessEnvelopeRebuildStatusData: """Status of a rebuild job [Cloud-only] + Read a rebuild job started by /api/v2/memory/rebuild: its `status` (`queued`, `running`, `succeeded`, `failed`), `progress`, and `error` when it failed. An unknown `job_id` is a 404. :param rebuild_status_input: (required) :type rebuild_status_input: RebuildStatusInput @@ -2716,6 +2717,11 @@ def get_rebuild_status( _response_types_map: Dict[str, Optional[str]] = { '200': "SuccessEnvelopeRebuildStatusData", '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + '404': "ErrorEnvelope", } response_data = self.api_client.call_api( *_param, @@ -2747,6 +2753,7 @@ def get_rebuild_status_with_http_info( ) -> ApiResponse[SuccessEnvelopeRebuildStatusData]: """Status of a rebuild job [Cloud-only] + Read a rebuild job started by /api/v2/memory/rebuild: its `status` (`queued`, `running`, `succeeded`, `failed`), `progress`, and `error` when it failed. An unknown `job_id` is a 404. :param rebuild_status_input: (required) :type rebuild_status_input: RebuildStatusInput @@ -2783,6 +2790,11 @@ def get_rebuild_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SuccessEnvelopeRebuildStatusData", '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + '404': "ErrorEnvelope", } response_data = self.api_client.call_api( *_param, @@ -2814,6 +2826,7 @@ def get_rebuild_status_without_preload_content( ) -> RESTResponseType: """Status of a rebuild job [Cloud-only] + Read a rebuild job started by /api/v2/memory/rebuild: its `status` (`queued`, `running`, `succeeded`, `failed`), `progress`, and `error` when it failed. An unknown `job_id` is a 404. :param rebuild_status_input: (required) :type rebuild_status_input: RebuildStatusInput @@ -2850,6 +2863,11 @@ def get_rebuild_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SuccessEnvelopeRebuildStatusData", '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", + '404': "ErrorEnvelope", } response_data = self.api_client.call_api( *_param, @@ -2954,7 +2972,7 @@ def rebuild_memory( ) -> SuccessEnvelopeRebuildData: """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. + Regenerate the derived memories that deletes left stale. A delete never spends LLM calls. Derived memories that only an LLM can regenerate (the user profile, session summaries, agent skills) are kept and marked stale instead: the delete response has `rebuild_required` and `targets`, and the profile has `stale`. This call starts one background job that regenerates them from the remaining memories. Nothing is regenerated until you call it, so batch your deletes first. - Pass `user_id` (profile, session summaries) or `agent_id` (skills). `targets` narrows the rebuild; by default everything marked stale is rebuilt. - `dry_run` reports what would be rebuilt (`estimated_episodes` sizes a profile rebuild) and spends nothing. `force` rebuilds the profile or skills even when nothing is marked; an owner with no profile yet has none to rebuild. - One job per owner at a time: a second call returns the running job with `status: already_running`. - The call is free; the extraction it runs is metered like any extraction, so it is refused with 429 once the account's usage quota is exhausted. While a profile rebuild runs, the profile holds only its manually edited items plus what has been re-extracted so far, and `stale` stays `true` until the job finishes. Poll /api/v2/memory/rebuild/status with the returned `job_id`. :param rebuild_input: (required) :type rebuild_input: RebuildInput @@ -2991,6 +3009,10 @@ def rebuild_memory( _response_types_map: Dict[str, Optional[str]] = { '200': "SuccessEnvelopeRebuildData", '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", } response_data = self.api_client.call_api( *_param, @@ -3022,7 +3044,7 @@ def rebuild_memory_with_http_info( ) -> ApiResponse[SuccessEnvelopeRebuildData]: """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. + Regenerate the derived memories that deletes left stale. A delete never spends LLM calls. Derived memories that only an LLM can regenerate (the user profile, session summaries, agent skills) are kept and marked stale instead: the delete response has `rebuild_required` and `targets`, and the profile has `stale`. This call starts one background job that regenerates them from the remaining memories. Nothing is regenerated until you call it, so batch your deletes first. - Pass `user_id` (profile, session summaries) or `agent_id` (skills). `targets` narrows the rebuild; by default everything marked stale is rebuilt. - `dry_run` reports what would be rebuilt (`estimated_episodes` sizes a profile rebuild) and spends nothing. `force` rebuilds the profile or skills even when nothing is marked; an owner with no profile yet has none to rebuild. - One job per owner at a time: a second call returns the running job with `status: already_running`. - The call is free; the extraction it runs is metered like any extraction, so it is refused with 429 once the account's usage quota is exhausted. While a profile rebuild runs, the profile holds only its manually edited items plus what has been re-extracted so far, and `stale` stays `true` until the job finishes. Poll /api/v2/memory/rebuild/status with the returned `job_id`. :param rebuild_input: (required) :type rebuild_input: RebuildInput @@ -3059,6 +3081,10 @@ def rebuild_memory_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SuccessEnvelopeRebuildData", '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", } response_data = self.api_client.call_api( *_param, @@ -3090,7 +3116,7 @@ def rebuild_memory_without_preload_content( ) -> RESTResponseType: """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. + Regenerate the derived memories that deletes left stale. A delete never spends LLM calls. Derived memories that only an LLM can regenerate (the user profile, session summaries, agent skills) are kept and marked stale instead: the delete response has `rebuild_required` and `targets`, and the profile has `stale`. This call starts one background job that regenerates them from the remaining memories. Nothing is regenerated until you call it, so batch your deletes first. - Pass `user_id` (profile, session summaries) or `agent_id` (skills). `targets` narrows the rebuild; by default everything marked stale is rebuilt. - `dry_run` reports what would be rebuilt (`estimated_episodes` sizes a profile rebuild) and spends nothing. `force` rebuilds the profile or skills even when nothing is marked; an owner with no profile yet has none to rebuild. - One job per owner at a time: a second call returns the running job with `status: already_running`. - The call is free; the extraction it runs is metered like any extraction, so it is refused with 429 once the account's usage quota is exhausted. While a profile rebuild runs, the profile holds only its manually edited items plus what has been re-extracted so far, and `stale` stays `true` until the job finishes. Poll /api/v2/memory/rebuild/status with the returned `job_id`. :param rebuild_input: (required) :type rebuild_input: RebuildInput @@ -3127,6 +3153,10 @@ def rebuild_memory_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SuccessEnvelopeRebuildData", '422': "HTTPValidationError", + '401': "Dict[str, object]", + '403': "Dict[str, object]", + '429': "Dict[str, object]", + '503': "Dict[str, object]", } response_data = self.api_client.call_api( *_param, @@ -4965,7 +4995,7 @@ def update_memory( ) -> SuccessEnvelopeUpdateData: """Edit one memory record [Cloud-only] - Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - No `app_id` / `project_id`: the record already knows its scope. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. + Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - `app_id` / `project_id` are optional guards, not a scope: the record already knows its scope. When set, a record in any other app or project is a 404, like a missing one. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. :param update_input: (required) :type update_input: UpdateInput @@ -5037,7 +5067,7 @@ def update_memory_with_http_info( ) -> ApiResponse[SuccessEnvelopeUpdateData]: """Edit one memory record [Cloud-only] - Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - No `app_id` / `project_id`: the record already knows its scope. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. + Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - `app_id` / `project_id` are optional guards, not a scope: the record already knows its scope. When set, a record in any other app or project is a 404, like a missing one. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. :param update_input: (required) :type update_input: UpdateInput @@ -5109,7 +5139,7 @@ def update_memory_without_preload_content( ) -> RESTResponseType: """Edit one memory record [Cloud-only] - Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - No `app_id` / `project_id`: the record already knows its scope. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. + Rewrite the editable fields of one memory. Only \"episode\" can be edited today. - `patch` uses the episode's own field names — `episode`, `summary`, `subject` — and needs at least one of them. Fields left out keep their current value. - A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated. - `app_id` / `project_id` are optional guards, not a scope: the record already knows its scope. When set, a record in any other app or project is a 404, like a missing one. There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set. A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404. Pass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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. Profile items are edited through /api/v2/memory/edit, not here. :param update_input: (required) :type update_input: UpdateInput diff --git a/everos_cloud/api_client.py b/everos_cloud/api_client.py index 33ad561..328dab6 100644 --- a/everos_cloud/api_client.py +++ b/everos_cloud/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.3.0-rc4/python' + self.user_agent = 'OpenAPI-Generator/1.3.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/everos_cloud/configuration.py b/everos_cloud/configuration.py index 730f888..97d94ed 100644 --- a/everos_cloud/configuration.py +++ b/everos_cloud/configuration.py @@ -504,7 +504,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.0.0\n"\ - "SDK Package Version: 1.3.0-rc4".\ + "SDK Package Version: 1.3.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/everos_cloud/models/delete_data.py b/everos_cloud/models/delete_data.py index 697fb13..a7803d7 100644 --- a/everos_cloud/models/delete_data.py +++ b/everos_cloud/models/delete_data.py @@ -25,7 +25,7 @@ class DeleteData(BaseModel): """ - Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were applied + how many mongo records were deleted across all memory types. + Which scope filters were applied and how many memory records were deleted across all memory types. """ # noqa: E501 filters: Optional[List[StrictStr]] = Field(default=None, description="Scope filters used, e.g. ['user_id'] or ['user_id', 'session_id']") count: Optional[StrictInt] = Field(default=0, description="Total memory records deleted") diff --git a/openapi.json b/openapi.json index 9159ce6..b4b720c 100644 --- a/openapi.json +++ b/openapi.json @@ -268,7 +268,7 @@ } } }, - "description": "Soft-delete memories within a scope.\n\n- At least one of `user_id`, `agent_id` or `session_id` is required \u2014 an empty body is rejected with 422.\n- `user_id` and `agent_id` are mutually exclusive.\n\nThe response echoes which scope filters were applied and how many records were removed across all memory types." + "description": "Permanently delete memories within a scope. There is no undo.\n\n- At least one of `user_id`, `agent_id` or `session_id` is required \u2014 an empty body is rejected with 422.\n- `user_id` and `agent_id` are mutually exclusive.\n- A delete by `session_id` alone also removes that session's source messages.\n\nThe response echoes which scope filters were applied and how many records were removed across all memory types. Derived memories that only an LLM can regenerate (profile, session summaries, agent skills) are kept and marked stale: `rebuild_required` and `targets` say so, and /api/v2/memory/rebuild regenerates them." } }, "/api/v2/memory/delete_by_ids": { @@ -350,7 +350,7 @@ } } }, - "description": "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.\n\n- Every id must be well-formed; one malformed id rejects the whole request with 422 and nothing is deleted.\n- Ids that do not exist, are already deleted, or belong to another tenant are skipped \u2014 the rest of the batch is still deleted, so re-sending a batch is safe. Duplicates are collapsed.\n- `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.\n\nPass `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.\n\nTo remove memories by owner or session rather than by id, use /api/v2/memory/delete." + "description": "Permanently 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.\n\n- Every id must be well-formed; one malformed id rejects the whole request with 422 and nothing is deleted.\n- Ids that do not exist, are already deleted, or belong to another tenant are skipped \u2014 the rest of the batch is still deleted, so re-sending a batch is safe. Duplicates are collapsed.\n- `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.\n\nPass `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. Pass `app_id` and/or `project_id` the same way to delete only inside that app or project: an id outside it is skipped like a missing one.\n\nA stale profile, session summary or skill left behind is reported in `rebuild_required` / `targets`; /api/v2/memory/rebuild regenerates it.\n\nTo remove memories by owner or session rather than by id, use /api/v2/memory/delete." } }, "/api/v2/memory/edit": { @@ -934,7 +934,7 @@ "Memory" ], "summary": "Rebuild derived memories a delete left stale [Cloud-only]", - "description": "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`.\n\nWhile 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.", + "description": "Regenerate the derived memories that deletes left stale.\n\nA delete never spends LLM calls. Derived memories that only an LLM can regenerate (the user profile, session summaries, agent skills) are kept and marked stale instead: the delete response has `rebuild_required` and `targets`, and the profile has `stale`. This call starts one background job that regenerates them from the remaining memories. Nothing is regenerated until you call it, so batch your deletes first.\n\n- Pass `user_id` (profile, session summaries) or `agent_id` (skills). `targets` narrows the rebuild; by default everything marked stale is rebuilt.\n- `dry_run` reports what would be rebuilt (`estimated_episodes` sizes a profile rebuild) and spends nothing. `force` rebuilds the profile or skills even when nothing is marked; an owner with no profile yet has none to rebuild.\n- One job per owner at a time: a second call returns the running job with `status: already_running`.\n- The call is free; the extraction it runs is metered like any extraction, so it is refused with 429 once the account's usage quota is exhausted.\n\nWhile a profile rebuild runs, the profile holds only its manually edited items plus what has been re-extracted so far, and `stale` stays `true` until the job finishes. Poll /api/v2/memory/rebuild/status with the returned `job_id`.", "operationId": "rebuildMemory", "requestBody": { "content": { @@ -966,6 +966,46 @@ } } } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit exceeded, or the account's usage quota is exhausted: the rebuild's extraction is metered, so it is refused until the quota is topped up.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } } } } @@ -1007,8 +1047,59 @@ } } } + }, + "401": { + "description": "Missing or invalid bearer token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "403": { + "description": "Authenticated but not permitted \u2014 either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "429": { + "description": "Rate limit or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "503": { + "description": "The gateway could not reach the authentication service. Transient \u2014 retry with backoff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayError" + } + } + } + }, + "404": { + "description": "No rebuild job with this `job_id` (`not_found`).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorEnvelope" + } + } + } } - } + }, + "description": "Read a rebuild job started by /api/v2/memory/rebuild: its `status` (`queued`, `running`, `succeeded`, `failed`), `progress`, and `error` when it failed. An unknown `job_id` is a 404." } }, "/api/v2/memory/search": { @@ -1418,7 +1509,7 @@ } } }, - "description": "Rewrite the editable fields of one memory. Only \"episode\" can be edited today.\n\n- `patch` uses the episode's own field names \u2014 `episode`, `summary`, `subject` \u2014 and needs at least one of them. Fields left out keep their current value.\n- A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated.\n- No `app_id` / `project_id`: the record already knows its scope.\n\nThere is no version check \u2014 the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set.\n\nA record that does not exist, is already deleted, or belongs to another tenant is rejected with 404.\n\nPass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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.\n\nProfile items are edited through /api/v2/memory/edit, not here." + "description": "Rewrite the editable fields of one memory. Only \"episode\" can be edited today.\n\n- `patch` uses the episode's own field names \u2014 `episode`, `summary`, `subject` \u2014 and needs at least one of them. Fields left out keep their current value.\n- A patch that changes only `episode` makes the server regenerate `summary` from the new text; `subject` is never regenerated.\n- `app_id` / `project_id` are optional guards, not a scope: the record already knows its scope. When set, a record in any other app or project is a 404, like a missing one.\n\nThere is no version check \u2014 the last write wins. Re-sending content equal to what is stored answers 200 with `unchanged: true` and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with `edited_at` and `reflect_state` set.\n\nA record that does not exist, is already deleted, or belongs to another tenant is rejected with 404.\n\nPass `user_id` to limit the edit to that user's memory: a record owned by anyone else is rejected with the same 404. 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.\n\nProfile items are edited through /api/v2/memory/edit, not here." } }, "/api/v2/knowledge_bases/{kb_id}/categories": { @@ -4723,7 +4814,7 @@ }, "type": "object", "title": "DeleteData", - "description": "Delete result (mirrors v1 ``DeleteMemoriesResult``): which scope filters were\napplied + how many mongo records were deleted across all memory types." + "description": "Which scope filters were applied and how many memory records were deleted across all memory types." }, "DeleteInput": { "properties": { diff --git a/pyproject.toml b/pyproject.toml index 66a008b..1324f73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "everos_cloud" -version = "1.3.0-rc4" +version = "1.3.0" description = "EverOS Cloud Memory API" authors = ["EverMind AI "] license = "Apache-2.0" diff --git a/setup.py b/setup.py index eafb467..a5088e8 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "everos-cloud" -VERSION = "1.3.0-rc4" +VERSION = "1.3.0" # Floor = the oldest interpreter CI actually runs (see .github/workflows/ci.yml in # the public repo). Nothing in the generated code needs it this high — the tree # parses as 3.8 — so this is a support policy, not a technical bound, and it is set