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
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ docs/CategoryPatchBody.md
docs/Content.md
docs/Content1.md
docs/ContentItem.md
docs/ContextInput.md
docs/Data.md
docs/Data1.md
docs/DeleteByIdsData.md
Expand Down Expand Up @@ -169,6 +170,7 @@ everos_cloud/models/category_patch_body.py
everos_cloud/models/content.py
everos_cloud/models/content1.py
everos_cloud/models/content_item.py
everos_cloud/models/context_input.py
everos_cloud/models/data.py
everos_cloud/models/data1.py
everos_cloud/models/delete_by_ids_data.py
Expand Down Expand Up @@ -317,6 +319,7 @@ test/test_category_patch_body.py
test/test_content.py
test/test_content1.py
test/test_content_item.py
test/test_context_input.py
test/test_data.py
test/test_data1.py
test/test_delete_by_ids_data.py
Expand Down
39 changes: 39 additions & 0 deletions docs/ContextInput.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# ContextInput

Request body of `POST /api/v2/memory/context`. The same fields as the `/search` request, except that `method` is fixed to `\"context\"`, `min_score` is not supported, and `radius`, `enable_llm_rerank` and `with_readable_episode` are not accepted.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**app_id** | **str** | Scope to search in, defaulting to \"default\". Must match the pair used on write. | [optional] [default to 'default']
**project_id** | **str** | Second half of the scope, defaulting to \"default\". | [optional] [default to 'default']
**user_id** | **str** | | [optional]
**agent_id** | **str** | | [optional]
**query** | **str** | The question to retrieve for. The loop keeps searching until it judges the evidence sufficient to answer it, so pass the whole question, not keywords. |
**method** | **str** | Fixed to `\"context\"`; may be omitted. Any other value is a 422. | [optional] [default to 'context']
**top_k** | **int** | Maximum number of episodes returned. Either -1 (the default, letting the engine decide) or a value from 1 to 100; anything else is rejected with 422. | [optional] [default to -1]
**min_score** | **float** | | [optional]
**include_profile** | **bool** | Also return the user's profile alongside the episodes, as on /search. | [optional] [default to False]
**filters** | [**FilterNode**](FilterNode.md) | | [optional]

## Example

```python
from everos_cloud.models.context_input import ContextInput

# TODO update the JSON string below
json = "{}"
# create an instance of ContextInput from a JSON string
context_input_instance = ContextInput.from_json(json)
# print the JSON string representation of the object
print(ContextInput.to_json())

# convert the object into a dict
context_input_dict = context_input_instance.to_dict()
# create an instance of ContextInput from a dict
context_input_from_dict = ContextInput.from_dict(context_input_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion docs/EpisodeItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Name | Type | Description | Notes
**summary** | **str** | Short summary of the episode — what a result list should show. |
**subject** | **str** | What the episode is about, in a few words. |
**episode** | **str** | The episode's stored narrative body. This is the indexed, searchable text. |
**readable_episode** | **str** | | [optional]
**type** | **str** | How the episode was produced — \"Conversation\" or \"AgentConversation\". |
**atomic_facts** | [**List[AtomicFactItem]**](AtomicFactItem.md) | The individual facts extracted from this episode, nested rather than returned separately. | [optional]
**tags** | **List[str]** | Tags attached through /api/v2/memory/tag/*. | [optional]
**edited_at** | **datetime** | | [optional]
**reflect_state** | **str** | | [optional]
**readable_episode** | **str** | | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/GetInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name | Type | Description | Notes
**page_size** | **int** | Items per page, 1 to 100 (default 20). | [optional] [default to 20]
**sort_by** | **str** | Order by \"timestamp\" (when the memory happened, default) or \"updated_at\" (when it was last written). Profiles and agent skills have no temporal column and always sort by \"updated_at\". | [optional] [default to 'timestamp']
**sort_order** | **str** | \"desc\" (default, newest first) or \"asc\". | [optional] [default to 'desc']
**with_readable_episode** | **bool** | Attach a human-readable rendering to each returned episode, for display only. Ignored for every non-episode `memory_type` rather than rejected. | [optional] [default to False]
**with_readable_episode** | **bool** | Deprecated and has no effect. Still accepted so existing clients that send it keep working; new code should leave it out. | [optional] [default to False]
**filters** | [**FilterNode**](FilterNode.md) | | [optional]

## Example
Expand Down
85 changes: 85 additions & 0 deletions docs/MemoryApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Method | HTTP request | Description
[**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]
[**replace_tags**](MemoryApi.md#replace_tags) | **POST** /api/v2/memory/tag/replace | Replace tags on memories [Cloud]
[**retrieve_context**](MemoryApi.md#retrieve_context) | **POST** /api/v2/memory/context | Context Retrieval [Cloud-only]
[**search_memory**](MemoryApi.md#search_memory) | **POST** /api/v2/memory/search | Search memories [OSS + Cloud]
[**submit_feedback**](MemoryApi.md#submit_feedback) | **POST** /api/v2/memory/feedback | Submit feedback about one memory [Cloud-only]
[**unbind_tags**](MemoryApi.md#unbind_tags) | **POST** /api/v2/memory/tag/unbind | Unbind tags from memories [Cloud]
Expand Down Expand Up @@ -691,6 +692,90 @@ 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)

# **retrieve_context**
> SuccessEnvelopeSearchData retrieve_context(context_input)

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: - `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`, for a `user_id` owner only; for an `agent_id` owner `episodes`, `agent_cases` and `agent_skills` are empty. `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`.

### Example

* Bearer Authentication (BearerAuth):

```python
import everos_cloud
from everos_cloud.models.context_input import ContextInput
from everos_cloud.models.success_envelope_search_data import SuccessEnvelopeSearchData
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)
context_input = everos_cloud.ContextInput() # ContextInput |

try:
# Context Retrieval [Cloud-only]
api_response = api_instance.retrieve_context(context_input)
print("The response of MemoryApi->retrieve_context:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MemoryApi->retrieve_context: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**context_input** | [**ContextInput**](ContextInput.md)| |

### Return type

[**SuccessEnvelopeSearchData**](SuccessEnvelopeSearchData.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** | The memories the loop found, in `episodes`, using the same `SearchData` shape as `/search`. | - |
**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. | - |

[[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)

# **search_memory**
> SuccessEnvelopeSearchData search_memory(search_input)

Expand Down
2 changes: 1 addition & 1 deletion docs/Reason.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Why the operator made the change. OPTIONAL on both ops: it is recorded on the au

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | What was wrong, from the fixed list — hallucination, wrong_subject, wrong_time, redundant, missing, privacy, style, other. Required whenever a reason is given. Same base list as `FeedbackInput.reason` plus `missing`, which only an edit can express (an operator fixes a record that left something out; a rating always names a memory that exists). On the contract this SDK is generated from (engine release-20260901_v15) `outdated` is not yet accepted here — the engine adds it in its next release; until then record an outdated-type fix as `wrong_time` or `other`. |
**code** | **str** | What was wrong, from the fixed list — hallucination, outdated, wrong_subject, wrong_time, redundant, missing, privacy, style, other. Required whenever a reason is given. Same base list as `FeedbackInput.reason` plus `missing`, which only an edit can express (an operator fixes a record that left something out; a rating always names a memory that exists). |
**note** | **str** | | [optional]

## Example
Expand Down
5 changes: 3 additions & 2 deletions docs/SearchEpisodeItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ Name | Type | Description | Notes
**summary** | **str** | Short summary of the episode — what a result list should show. |
**subject** | **str** | What the episode is about, in a few words. |
**episode** | **str** | The episode's stored narrative body. This is the indexed, searchable text. |
**readable_episode** | **str** | | [optional]
**type** | **str** | How the episode was produced — \"Conversation\" or \"AgentConversation\". |
**atomic_facts** | [**List[SearchAtomicFactItem]**](SearchAtomicFactItem.md) | The facts extracted from this episode, each with its own relevance score. | [optional]
**tags** | **List[str]** | Tags attached through /api/v2/memory/tag/*. | [optional]
**edited_at** | **datetime** | | [optional]
**reflect_state** | **str** | | [optional]
**score** | **float** | Relevance of this episode to the query. What the number means depends on `method`: the hybrid path fuses its two routes into a probability in 0.0–1.0 (which is what `min_score` filters on), while keyword and vector pass the underlying engine's own score through — BM25 has no upper bound and vector similarity depends on the metric. So compare scores within one method, not across methods. |
**score** | **float** | Relevance of this episode to the query. What the number means depends on `method`: the hybrid path fuses its two routes into a probability in 0.0–1.0 (which is what `min_score` filters on), while keyword and vector pass the underlying engine's own score through — BM25 has no upper bound and vector similarity depends on the metric. On /api/v2/memory/context it is a rank-fusion score instead, roughly 0.01–0.05, plus 1.0 for a `cited` episode. So compare scores within one method, not across methods. |
**cited** | **bool** | `/context` only: the retrieval model named this memory as one its answer rested on. Always `false` on `/search`. | [optional] [default to False]
**readable_episode** | **str** | | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/SearchInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**radius** | **float** | | [optional]
**min_score** | **float** | | [optional]
**include_profile** | **bool** | Also return the user's profile alongside the hits, saving a second call. Ignored for an agent owner, whose results carry no profiles. | [optional] [default to False]
**with_readable_episode** | **bool** | Attach a human-readable rendering of each episode to the returned items, for display only — it is not indexed, filterable or scored, and callers fall back to `episode` when it is null. Ignored for an agent owner. | [optional] [default to False]
**with_readable_episode** | **bool** | Deprecated and has no effect. Still accepted so existing clients that send it keep working; new code should leave it out. | [optional] [default to False]
**enable_llm_rerank** | **bool** | Opt-in LLM rerank, and only for hybrid agent_case / agent_skill retrieval. The episode hybrid path has its own fact eviction and ignores this, as do keyword, vector and agentic. | [optional] [default to False]
**filters** | [**FilterNode**](FilterNode.md) | | [optional]

Expand Down
2 changes: 1 addition & 1 deletion docs/UpdateData.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Name | Type | Description | Notes
**summary** | **str** | Short summary of the episode — what a result list should show. |
**subject** | **str** | What the episode is about, in a few words. |
**episode** | **str** | The episode's stored narrative body. This is the indexed, searchable text. |
**readable_episode** | **str** | | [optional]
**type** | **str** | How the episode was produced — \"Conversation\" or \"AgentConversation\". |
**atomic_facts** | [**List[AtomicFactItem]**](AtomicFactItem.md) | The individual facts extracted from this episode, nested rather than returned separately. | [optional]
**tags** | **List[str]** | Tags attached through /api/v2/memory/tag/*. | [optional]
**edited_at** | **datetime** | | [optional]
**reflect_state** | **str** | | [optional]
**unchanged** | **bool** | True when the patch equalled what was already stored — nothing was written and nothing downstream was triggered. | [optional] [default to False]
**readable_episode** | **str** | | [optional]

## Example

Expand Down
3 changes: 2 additions & 1 deletion everos_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "1.2.0"
__version__ = "1.3.0-rc1"

# import apis into sdk package
from everos_cloud.api.knowledge_api import KnowledgeApi
Expand Down Expand Up @@ -49,6 +49,7 @@
from everos_cloud.models.content import Content
from everos_cloud.models.content1 import Content1
from everos_cloud.models.content_item import ContentItem
from everos_cloud.models.context_input import ContextInput
from everos_cloud.models.data import Data
from everos_cloud.models.data1 import Data1
from everos_cloud.models.delete_by_ids_data import DeleteByIdsData
Expand Down
Loading
Loading