For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
        • ApiNinjasTriviaSkill
        • AskClaudeSkill
        • ClaudeSkillsSkill
        • CustomSkillsSkill
        • DataSphereServerlessSkill
        • DataSphereSkill
        • DateTimeSkill
        • GoogleMapsSkill
        • InfoGathererSkill
        • JokeSkill
        • MathSkill
        • McpGatewaySkill
        • NativeVectorSearchSkill
        • PlayBackgroundFileSkill
        • SpiderSkill
        • SwmlTransferSkill
        • WeatherApiSkill
        • WebSearchSkill
        • WikipediaSearchSkill
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • tool_name
  • space_name
  • project_id
  • token
  • document_id
  • count
  • distance
  • tags
  • language
  • pos_to_expand
  • max_synonyms
  • no_results_message
  • Example
AgentsSkills

DataSphereSkill

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

DateTimeSkill

Next
Built with

Search a document uploaded to SignalWire DataSphere using the RAG stack. The skill issues the search via a webhook call from the agent process.

Credentials (space_name, project_id, token, document_id) are all required — setup() fails closed if any are missing.

Class: DataSphereSkill

Tools: Custom per instance via tool_name (default search_knowledge)

Env vars: SIGNALWIRE_PROJECT_ID, SIGNALWIRE_TOKEN, SIGNALWIRE_SPACE

Multi-instance: yes

tool_name
stringDefaults to search_knowledge

Custom tool name for this DataSphere instance. Required when registering multiple instances on the same agent.

space_name
stringRequired

SignalWire space name (e.g., "mycompany" from mycompany.signalwire.com). Falls back to SIGNALWIRE_SPACE.

project_id
stringRequired

SignalWire project ID. Falls back to SIGNALWIRE_PROJECT_ID.

token
stringRequired

SignalWire API token. Falls back to SIGNALWIRE_TOKEN.

document_id
stringRequired

DataSphere document ID to search within.

count
integerDefaults to 1

Number of results to return (range 1-10).

distance
numberDefaults to 3.0

Maximum distance threshold (range 0-10; lower is more relevant).

tags
string[]

Tags to filter search results.

language
string

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

pos_to_expand
string[]

Parts of speech to expand with synonyms. Each entry must be one of "NOUN", "VERB", "ADJ", "ADV".

max_synonyms
integer

Maximum number of synonyms used for query expansion (range 1-10).

no_results_message
string

Message returned when no results match the query. Supports a {query} placeholder that is substituted with the user’s query text.

Example

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 document_id: 'doc_1234',
8 count: 3,
9 distance: 2.5,
10 tool_name: 'search_product_docs',
11}));
12
13agent.run();