DataSphereServerlessSkill

View as MarkdownOpen in Claude

Search SignalWire DataSphere documents using a DataMap for serverless execution. Unlike the standard datasphere skill, this version executes entirely server-side without a webhook round-trip.

Class: DataSphereServerlessSkill

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, DataSphereServerlessSkill } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
4agent.setPromptText('You are a helpful assistant.');
5
6await agent.addSkill(new DataSphereServerlessSkill({
7 document_id: 'YOUR_DOCUMENT_ID',
8 max_results: 3,
9}));
10
11agent.run();