Skip to content

fix(search): auto-discover local venv python and strip PYTHONPATH#3

Merged
agentic-organization merged 1 commit into
mainfrom
fix/search-venv-discovery
May 12, 2026
Merged

fix(search): auto-discover local venv python and strip PYTHONPATH#3
agentic-organization merged 1 commit into
mainfrom
fix/search-venv-discovery

Conversation

@agentic-organization
Copy link
Copy Markdown
Owner

Problem

Vector search ( or hybrid mode) shells out to to embed the query string. On machines where is an external runtime python (e.g. Hermes venv, CI containers), may not be installed there, causing vector search to silently fall back to BM25.

Fix

  • now auto-discovers the local venv python (, ) before falling back to .
  • It also strips in the child process to avoid package conflicts with external venvs.

Impact

  • Vector search works out of the box after (or equivalent) in a local venv.
  • No change for machines where already has the dependencies.

Tested

  • Verified on the AOS mini-agi repo with embeddings. Hybrid, vector-only, and BM25-only modes all return correct results.

search.js now prefers repo-root/.venv/bin/python when embedding queries,
so vector search works on machines where the system python3 lacks
sentence-transformers. Also clears PYTHONPATH in the child process to
avoid conflicts with external venvs (e.g. Hermes runtime).
@agentic-organization agentic-organization merged commit 2a87d5a into main May 12, 2026
2 checks passed
@agentic-organization agentic-organization deleted the fix/search-venv-discovery branch May 12, 2026 04:39
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.

1 participant