knowhere
knowhere copied to clipboard
Improve agentic navigation asset-search reconciliation
Background
Agentic retrieval navigation had several residual issues around asset-search coordination, discovery hint integration, budget overdraft handling, and prompt/state verbosity. SEARCH_IMAGES/SEARCH_TABLES results could be repeated or poorly reconciled with collected owner sections, and legacy discovery selection code still shaped parts of the flow.
Scope
- Integrate discovery hints into legal navigation actions instead of a separate discovery-select fallback.
- Reconcile COLLECT + SEARCH tool results so invalid collects can be rejected before the next navigation decision.
- Simplify asset sub-agent prompts and hide internal owner/path/chunk IDs from candidate selection.
- Preserve production VLM URL handling while mapping short row IDs back to chunk IDs internally.
- Compact Agent State and Navigation Trace to avoid duplicated prompt content.
- Allow budget overdraft to complete current actions and report it to the main agent.
- Update contract coverage for the new discovery/action behavior.
Verification
- make lint
- make typecheck
- uv run python apps/api/scripts/ensure_test_environment.py --install
- uv run pytest apps/api/tests apps/worker/tests/contract -q
Target
Open PR to staging after this issue is created.