***

title: datasphere
slug: /reference/python/agents/skills/datasphere
description: Search documents uploaded to SignalWire DataSphere.
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

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

<ParamField path="space_name" type="str" required={true} toc={true}>
  SignalWire space name (e.g., `"mycompany"` from `mycompany.signalwire.com`).
</ParamField>

<ParamField path="project_id" type="str" required={true} toc={true}>
  SignalWire project ID.
</ParamField>

<ParamField path="token" type="str" required={true} toc={true}>
  SignalWire API token.
</ParamField>

<ParamField path="document_id" type="str" required={true} toc={true}>
  DataSphere document ID to search.
</ParamField>

<ParamField path="tool_name" type="str" default="search_knowledge" toc={true}>
  Custom tool name for this instance. Required when using multiple instances.
</ParamField>

<ParamField path="count" type="int" default="1" toc={true}>
  Number of results to return.
</ParamField>

<ParamField path="distance" type="float" default="3.0" toc={true}>
  Maximum distance threshold for results.
</ParamField>

<ParamField path="tags" type="list[str]" toc={true}>
  Tags to filter search results.
</ParamField>

<ParamField path="language" type="str" toc={true}>
  Language code for query expansion (e.g., `"en"`, `"es"`).
</ParamField>

<ParamField path="pos_to_expand" type="list[str]" toc={true}>
  Parts of speech to expand with synonyms: `"NOUN"`, `"VERB"`, `"ADJ"`, `"ADV"`.
</ParamField>

<ParamField path="max_synonyms" type="int" toc={true}>
  Maximum number of synonyms for query expansion (1–10).
</ParamField>

<ParamField path="no_results_message" type="str" toc={true}>
  Message returned when no results are found. Supports `{query}` placeholder.
</ParamField>

```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()
```