Skip to main content

search_knowledge

Search across all knowledge in the project (documents, webpages, knowledge items) and return a synthesized answer with source citations. Uses advanced semantic search and LLM synthesis to provide accurate, contextual answers.

Use Cases

  • Answer questions using project knowledge
  • Retrieve information from uploaded documents
  • Search across webpages and knowledge items
  • Get context-aware answers with source attribution

Parameters

string
required
The search query. Use at least 2 words for better results. Be specific about what you’re looking for.
string
Optional conversation context to improve search relevance. Include relevant background information about what you’re trying to accomplish.

Response

boolean
Whether the operation succeeded
string
Synthesized answer to the query, combining information from multiple sources
array
Array of source objects, each containing:
  • id: Source identifier
  • type: Type of source (document, webpage, knowledge_item)
  • title: Title or name of the source
  • content: Relevant excerpt from the source
  • relevance_score: Relevance score (0-1)
string
The original query that was searched

Example Request

Example Response

Behavior

  • Searches across all project knowledge (no agent scoping)
  • Uses semantic search to find relevant content
  • Synthesizes information from multiple sources using LLM
  • Returns sources with relevance scores
  • Handles queries in natural language

Search Quality Tips

  1. Use specific queries: “How to set up authentication” is better than “auth”
  2. Include context: Provide background information in the context parameter
  3. Use multiple words: Queries with 2+ words generally perform better
  4. Be clear about intent: State what you’re trying to accomplish

Error Handling

Knowledge Sources

The search includes:
  • Documents: Uploaded PDFs, text files, markdown files
  • Webpages: Saved web pages and URLs
  • Knowledge Items: Manually added knowledge entries
All sources are indexed and searchable regardless of which agent they were added to.

Best Practices

  1. Be specific: Clear, detailed queries get better results
  2. Provide context: Use the context parameter to improve relevance
  3. Review sources: Check source citations to verify information
  4. Iterate on queries: If results aren’t good, refine your query

Limitations

  • Search is scoped to the project associated with the API key
  • Results depend on the quality and quantity of knowledge in the project
  • Very new knowledge may take a few moments to be indexed