> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # DataSphereSkill > Search a SignalWire DataSphere knowledge document via the RAG stack. [add-skill]: /docs/server-sdks/reference/typescript/agents/agent-base/add-skill Search a document uploaded to SignalWire DataSphere using the RAG stack. The skill issues the search via a webhook call from the agent process. Credentials (`space_name`, `project_id`, `token`, `document_id`) are all required — `setup()` fails closed if any are missing. **Class:** `DataSphereSkill` **Tools:** Custom per instance via `tool_name` (default `search_knowledge`) **Env vars:** `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_API_TOKEN`, `SIGNALWIRE_SPACE` **Multi-instance:** yes **`tool_name`** `string` — default: search\_knowledge Custom tool name for this DataSphere instance. Required when registering multiple instances on the same agent. --- **`space_name`** `string` — required SignalWire space name (e.g., `"mycompany"` from `mycompany.signalwire.com`). Falls back to `SIGNALWIRE_SPACE`. --- **`project_id`** `string` — required SignalWire project ID. Falls back to `SIGNALWIRE_PROJECT_ID`. --- **`token`** `string` — required SignalWire API token. Falls back to `SIGNALWIRE_API_TOKEN`. --- **`document_id`** `string` — required DataSphere document ID to search within. --- **`count`** `integer` — default: 1 Number of results to return (range `1-10`). --- **`distance`** `number` — default: 3.0 Maximum distance threshold (range `0-10`; lower is more relevant). --- **`tags`** `string[]` Tags to filter search results. --- **`language`** `string` Language code for query expansion (e.g., `"en"`, `"es"`). --- **`pos_to_expand`** `string[]` Parts of speech to expand with synonyms. Each entry must be one of `"NOUN"`, `"VERB"`, `"ADJ"`, `"ADV"`. --- **`max_synonyms`** `integer` Maximum number of synonyms used for query expansion (range `1-10`). --- **`no_results_message`** `string` Message returned when no results match the query. Supports a `{query}` placeholder that is substituted with the user's query text. --- ## Example ```typescript {6-11} import { AgentBase, DataSphereSkill } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'assistant', route: '/assistant' }); agent.setPromptText('You are a helpful assistant.'); await agent.addSkill(new DataSphereSkill({ document_id: 'doc_1234', count: 3, distance: 2.5, tool_name: 'search_product_docs', })); agent.run(); ``` > Search a SignalWire DataSphere knowledge document via the RAG stack.