Skip to content

Conversation

timfdev
Copy link
Contributor

@timfdev timfdev commented Oct 9, 2025

This PR closes #1060, closes #1083, closes #1099.

  • Separation between searching and data fetching, it makes much more sense to return only search relevant data, full entity data fetching can be on demand through a graphql call. This massively improves search speed.

  • Saving search queries. Saving the query (pydantic model) with embedding for: pagination, exports, caching, showing agent results in frontend, analysis/query suggestions etc. The removed embedding from the encoded cursor reduces payload size by (~)95% when using 1536 dimensional vectors.

  • Saving agent runs, can be used to reconstruct agent runs for analysis, persisting chats etc. preserving and collecting of all executed queries in a run.

  • agent is now a router on the same level as other API routes , preventing naming conflicts, proper dependency injection

  • Usage of StateDeltaEvents, which is more efficient because it only sends updated parts of the state link

  • Refactored and simplified cursor pagination

  • Agent now has a new export tool that sets a download url in the state, copilotkit then renders this as a button

  • Agent also has a new tool to fetch detailed data if needed, because search results now contain lightweight data like id,score only. For now this is the same format as the export tool, we can change this later, possibly only allowing detailed fetching for single entities and letting the agent choose what data it wants.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 22, 2025

CodSpeed Performance Report

Merging #1118 will not alter performance

Comparing agent-export (5edf8a7) with main (15023b8)

Summary

✅ 13 untouched

@sentry-io
Copy link

sentry-io bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 46.69927% with 218 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.18%. Comparing base (15023b8) to head (5edf8a7).

Files with missing lines Patch % Lines
orchestrator/search/agent/tools.py 24.00% 57 Missing ⚠️
orchestrator/api/api_v1/endpoints/search.py 26.41% 39 Missing ⚠️
orchestrator/search/export.py 30.30% 23 Missing ⚠️
orchestrator/search/retrieval/engine.py 28.57% 15 Missing ⚠️
orchestrator/search/retrieval/pagination.py 30.00% 14 Missing ⚠️
orchestrator/cli/search/resize_embedding.py 13.33% 13 Missing ⚠️
orchestrator/search/retrieval/query_state.py 52.38% 10 Missing ⚠️
orchestrator/search/retrieval/retrievers/base.py 18.18% 9 Missing ⚠️
orchestrator/search/indexing/indexer.py 12.50% 7 Missing ⚠️
orchestrator/search/agent/prompts.py 0.00% 6 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1118      +/-   ##
==========================================
- Coverage   80.41%   80.18%   -0.24%     
==========================================
  Files         262      266       +4     
  Lines       12735    12828      +93     
  Branches     1245     1255      +10     
==========================================
+ Hits        10241    10286      +45     
- Misses       2214     2262      +48     
  Partials      280      280              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[Feature]: Save queries and their embeddings Agent should not stream back records as part of the tool call response Let agent export results

1 participant