> This page is for Server SDKs.

> 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.

# datasphere

> Search documents uploaded to SignalWire DataSphere.

Search documents uploaded to SignalWire DataSphere. This skill executes the search
via a webhook call from the agent process.

**Tools:** `search_knowledge`

**Requirements:** SignalWire DataSphere credentials

**Multi-instance:** Yes

**`space_name`** `str` — required

SignalWire space name (e.g., `"mycompany"` from `mycompany.signalwire.com`).

---

**`project_id`** `str` — required

SignalWire project ID.

---

**`token`** `str` — required

SignalWire API token.

---

**`document_id`** `str` — required

DataSphere document ID to search.

---

**`tool_name`** `str` — default: search_knowledge

Custom tool name for this instance. Required when using multiple instances.

---

**`count`** `int` — default: 1

Number of results to return.

---

**`distance`** `float` — default: 3.0

Maximum distance threshold for results.

---

**`tags`** `list[str]`

Tags to filter search results.

---

**`language`** `str`

Language code for query expansion (e.g., `"en"`, `"es"`).

---

**`pos_to_expand`** `list[str]`

Parts of speech to expand with synonyms: `"NOUN"`, `"VERB"`, `"ADJ"`, `"ADV"`.

---

**`max_synonyms`** `int`

Maximum number of synonyms for query expansion (1–10).

---

**`no_results_message`** `str`

Message returned when no results are found. Supports `{query}` placeholder.

---

```python
from signalwire import AgentBase

class MyAgent(AgentBase):
    def __init__(self):
        super().__init__(name="assistant", route="/assistant")
        self.set_prompt_text("You are a helpful assistant.")
        self.add_skill("datasphere", {
            "space_name": "your-space",
            "project_id": "YOUR_PROJECT_ID",
            "token": "YOUR_API_TOKEN",
            "document_id": "YOUR_DOCUMENT_ID"
        })

agent = MyAgent()
agent.serve()
```