***

title: DataSphereSkill
slug: /reference/typescript/agents/skills/datasphere
description: Search documents uploaded to SignalWire DataSphere using semantic search.
---------------------

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

[add-skill]: /docs/server-sdks/reference/typescript/agents/agent-base/add-skill

Search documents uploaded to SignalWire DataSphere using semantic search.
Executes the search via a webhook call from the agent process.

**Class:** `DataSphereSkill`

**Tools:** `search_datasphere`

**Env vars:** `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, `SIGNALWIRE_SPACE`

**Multi-instance:** Yes

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

<ParamField path="space_name" type="string" toc={true}>
  SignalWire space name. Falls back to the `SIGNALWIRE_SPACE` environment variable.
</ParamField>

<ParamField path="project_id" type="string" toc={true}>
  SignalWire project ID. Falls back to the `SIGNALWIRE_PROJECT_ID` environment variable.
</ParamField>

<ParamField path="token" type="string" toc={true}>
  SignalWire auth token. Falls back to the `SIGNALWIRE_TOKEN` environment variable.
</ParamField>

<ParamField path="document_id" type="string" toc={true}>
  Restrict search to a specific document ID.
</ParamField>

<ParamField path="max_results" type="number" default="5" toc={true}>
  Maximum number of results to return.
</ParamField>

<ParamField path="distance_threshold" type="number" default="0.7" toc={true}>
  Maximum distance threshold for results (0-1, lower is more similar).
</ParamField>

```typescript {6-9}
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({
  max_results: 3,
  distance_threshold: 0.5,
}));

agent.run();
```