Skip to content

feat(facade): context() for POST /api/v2/memory/context (1.3.0) - #25

Draft
dani1005 wants to merge 1 commit into
v1from
feat/facade-context
Draft

dani1005 wants to merge 1 commit into
v1from
feat/facade-context

Conversation

@dani1005

Copy link
Copy Markdown
Member

Adds client.context() for Context Retrieval, the multi-round LLM retrieval endpoint added in contract 2.0.0 at engine release-20261008_v15.

  • context(query, *, user_id, top_k=None, include_profile=None, filters=None, app_id=None, project_id=None) → SearchData, same shape as search(). episodes[].cited marks what the model's answer rested on.
  • user_id is required: the loop returns episodes for user owners only, so agent_id is left out.
  • The request body carries none of the fields /context rejects with 422 (min_score, radius, enable_llm_rerank, with_readable_episode). A test covers this.
  • retrieve_context → context in the AttributeError hint table. Quickstart and README list the method.

Draft until the generated 1.3.0-rc1 lands on v1 (factory MR !14). ContextInput and MemoryApi.retrieve_context come from that generation, so CI here fails until then. Tested locally against that generated tree: 60 passed.

🤖 Generated with Claude Code

Wrap Context Retrieval on the facade as `context(query, *, user_id, top_k,
include_profile, filters, app_id, project_id)`, the last segment of its
route like the other memory methods. user_id is required: the loop returns
episodes for user owners only. The body carries none of the fields the
endpoint rejects with 422 (min_score, radius, enable_llm_rerank,
with_readable_episode). Quickstart and README list the method.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: the generated context model and endpoint artifacts must be included so the package imports again.

I found one blocker, marked inline. In a fresh virtual environment with the declared runtime and test dependencies, pytest -q stops during collection with 1 error because EverOS is no longer exported; both Python CI jobs reproduce the same import failure.

I covered the full diff, surrounding facade/model/API callers, recent facade and generated-SDK history, public backward compatibility, test strength, and the facade/generated-client architecture. I found no AGENTS.md, CLAUDE.md, or CONTEXT*.md repository guidance to apply. The new tests were not weakened, but they cannot collect against the artifacts in this revision. The facade signature, default preservation, scoping, and docs otherwise look consistent with nearby memory methods.

Comment thread everos_cloud/client.py
AddOperation,
Content,
ContentItem,
ContextInput,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: include the generated context endpoint and model before this facade lands.

ContextInput is absent from the package, and MemoryApi does not define retrieve_context. Importing everos_cloud.client therefore raises ImportError; because the top-level __init__.py swallows that error, from everos_cloud import EverOS fails too, breaking the entire existing facade rather than only context(). The clean-environment test run stops during collection on this import, and both CI versions reproduce it. Please add or regenerate the 1.3.0 model, API, exports, and contract artifacts alongside this wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants