Complete query pipeline: search + format
Takes a user query, searches for similar chunks, and returns formatted context. This is the main entry point for most use cases.
Natural language query
Search options
Formatted agent context
const context = await queryForContext( "How do I connect to the database?", { limit: 5, threshold: 0.6 });console.log(contextToMarkdown(context)); Copy
const context = await queryForContext( "How do I connect to the database?", { limit: 5, threshold: 0.6 });console.log(contextToMarkdown(context));
Complete query pipeline: search + format
Takes a user query, searches for similar chunks, and returns formatted context. This is the main entry point for most use cases.