DataSphereSkill

View as MarkdownOpen in Claude

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

tool_name
string

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

space_name
string

SignalWire space name. Falls back to the SIGNALWIRE_SPACE environment variable.

project_id
string

SignalWire project ID. Falls back to the SIGNALWIRE_PROJECT_ID environment variable.

token
string

SignalWire auth token. Falls back to the SIGNALWIRE_TOKEN environment variable.

document_id
string

Restrict search to a specific document ID.

max_results
numberDefaults to 5

Maximum number of results to return.

distance_threshold
numberDefaults to 0.7

Maximum distance threshold for results (0-1, lower is more similar).

1import { AgentBase, DataSphereSkill } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
4agent.setPromptText('You are a helpful assistant.');
5
6await agent.addSkill(new DataSphereSkill({
7 max_results: 3,
8 distance_threshold: 0.5,
9}));
10
11agent.run();