Assistant Commands
This is the complete set of commands available to AI Assistants (both Chat and Workers) in your Dystr Workspaces. When you interact with an Assistant or create a Worker, these are the actions they can perform in your Workspace or the outside world - from reading files and running computations to sending emails and querying databases.
Each command executes a specific action and provides its results back to the Assistant, allowing them to make decisions and take next steps. This reference lets you understand exactly what your AI Assistants can (and cannot) do within your Workspace.
Available Commands
Category |
Command |
Description |
Compute |
dystr/compute/edit |
Modify an existing compute task in the Workspace |
|
dystr/compute/list |
List compute tasks from the Workspace |
|
dystr/compute/run |
Execute code in the Workspace compute environment |
Files |
dystr/files/exists |
Check if a file exists in the Workspace |
|
dystr/files/tts |
Convert text from a Workspace file into speech |
|
dystr/files/read |
Read content from a file in the Workspace |
|
dystr/files/search |
Search within a specific file in the Workspace for content |
|
dystr/files/write |
Create a new file in the Workspace |
Notes |
dystr/notes/create |
Create a new rich text note in the Workspace |
|
dystr/notes/list |
List rich text notes from the Workspace |
|
dystr/notes/overwrite |
Update an existing rich text note by creating a new revision |
|
dystr/notes/read |
Read the contents of a rich text note from your Workspace |
Database |
dystr/sqlite/query |
Execute a SQL query on a SQLite database file in the Workspace |
Workspace |
dystr/workspace/search |
Search across all files in your Workspace for content and filenames |
System |
system/util/email |
Send an email to specified recipients within your Dystr Organization |
|
system/util/fetch |
Fetches and extracts text content from a webpage |
|
system/util/math |
Evaluate simple mathematical expressions and return the result |
|
system/util/stt |
Converts speech from an audio file to text |
|
system/util/tts |
Converts text to speech and saves it as an audio file |
Vendor |
vendor/google/search |
Performs a Google search and returns relevant web results |
Command Reference
dystr/compute/edit
Modifies an existing compute task in your Workspace. This allows updating the name, code, or runtime of a previously created computation.
Input Required
Argument |
Description |
id |
The ID of the compute task to edit |
name |
A new name for this compute task (1-2 words) |
driver |
The language to use: python or r |
code |
The new code to be executed |
What Happens
- Locates the specified compute task in your Workspace
- Updates the task with the new name, code, and runtime settings
- Preserves the task's relationships and history in the Workspace
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
id |
string | null |
ID of the edited compute task (null if task not found) |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string | null |
Error message if status is "error" |
code |
string |
The new code that was set |
name |
string |
The new name that was set |
language |
string |
The new runtime that was set |
dystr/compute/list
Lists compute tasks from your Workspace, ordered by last updated date. Returns details about each task including its execution history.
Input Required
Argument |
Description |
topK |
Number of most recent tasks to return (max: 25) |
What Happens
- Queries your Workspace for compute tasks
- Retrieves task details and their most recent executions
- Returns up to 25 tasks, ordered by last modified date
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string |
If status is "okay": Message with count of tasks found and total in Workspace
If status is "error": Error message explaining what went wrong |
resultsLength |
number |
Number of tasks returned |
totalTaskCount |
number |
Total number of tasks in Workspace |
results |
array |
Array of task objects (see structure below) |
Structure of each task in the results array:
Field |
Type |
Description |
id |
string |
Task identifier |
name |
string |
Task name |
lastUpdated |
string |
Last modification timestamp |
code |
string |
The task's code |
totalAllocations |
number |
Number of times this task has been executed |
latestAllocation |
object | null |
Details about the most recent execution:
- status: Execution status - duration: Runtime in seconds - output: First 2000 characters of program output (print statements, errors, etc.) |
dystr/compute/run
Executes code in your Workspace's compute environment and creates a permanent record of the computation.
Input Required
Argument |
Description |
name |
A brief name for this compute task (1-2 words) |
driver |
The language to use: python, r, or bash |
code |
The code to be executed |
What Happens
- Creates a new compute task in your Workspace
- Executes the provided code in your Workspace's compute environment (see Compute for details)
- Captures all output (including console output, errors, and display data like plots)
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
id |
string | null |
Unique identifier for the created compute task |
output |
string |
JSON-serialized execution results containing execution reply and output data (console output, errors, and display data) |
code |
string |
The code that was executed |
name |
string |
The name provided for the task |
language |
string |
The runtime used (python/r/bash) |
containsImages |
boolean |
Indicates if the output contains image data |
dystr/files/exists
Checks if a file exists in your Workspace by its filename and returns its details if found.
Input Required
Argument |
Description |
fileName |
Name of the file to look for |
What Happens
- Searches your Workspace for the specified file (case-insensitive)
- If found, retrieves the file's metadata and location information
- Returns whether the file exists and its details if found
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string |
Error message if status is "error" |
exists |
boolean |
Whether the file was found |
id |
string | null |
File identifier (if found) |
fileName |
string | null |
Name of the file (if found) |
filesystemPath |
string | null |
Full path to file in Workspace (if found) |
size |
string | null |
Size of the file (if found) |
mimeType |
string | null |
MIME type of the file (if found) |
dystr/files/tts
Converts text from a Workspace file into speech. The text is extracted from the file, converted to audio using the specified voice, and saved as a new audio file in your Workspace.
Input Required
Argument |
Description |
Required |
id |
ID of the file to convert |
Yes |
offsetType |
How to read the file: "characters" or "pages" |
Yes |
offset |
Where to start reading (0-based for characters, 1-based for pages) |
Yes |
characterLength |
Number of characters to convert (max: 4096) |
Yes |
voice |
Voice to use: alloy, echo, fable, onyx, nova, or shimmer |
No |
outputFileName |
Name for the generated audio file |
No |
outputFileType |
Format of output: mp3, opus, aac, flac, wav, or pcm |
No |
outputFolder |
Workspace folder to save the audio file in |
No |
What Happens
- Locates and reads the specified portion of text from the source file
- Converts the text to speech using the chosen voice
- Saves the audio file to the specified location in your Workspace
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string |
Success confirmation or error details |
inputFileId |
string | null |
ID of the source file |
inputFileName |
string | null |
Name of the source file |
inputMimeType |
string | null |
MIME type of the source file |
offsetType |
string | null |
How the file was read ("characters" or "pages") |
offset |
number | null |
Where the reading started |
characterLength |
number | null |
How many characters were processed |
text |
string | null |
The text that was converted |
fileId |
string | null |
ID of the generated audio file |
fileName |
string | null |
Name of the generated audio file |
folder |
string | null |
Where the audio file was saved |
fileUrl |
string | null |
URL to access the generated audio file |
dystr/files/read
Reads content from a file in your Workspace. Can read either by page numbers or byte ranges, depending on the file type.
Supported File Types
- Text files (
text/*
) - PDFs (
application/pdf
) - JSON files (
application/json
)
Input Required
Argument |
Description |
fileId |
ID of the file to read |
offsetType |
How to read the file: "bytes" or "pages" |
offset |
Where to start reading: - For pages: 1-based page number - For bytes: 0-based byte offset |
length |
How much to read: - For pages: 1-16 pages - For bytes: 1-10000 bytes |
What Happens
- Locates the specified file in your Workspace
- Reads the requested portion of the file
- For text files: Returns the raw text content
- For PDFs: Returns text extracted from the specified pages
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string |
Success confirmation or error details |
id |
string | null |
ID of the file that was read |
fileName |
string | null |
Name of the file |
mimeType |
string | null |
MIME type of the file |
offsetType |
string | null |
How the file was read ("bytes" or "pages") |
offset |
number | null |
Where the reading started |
length |
number | null |
How much was requested to read |
contents |
array | null |
Array of content objects (see structure below) |
Structure of each content object in the array:
Field |
Type |
Description |
numTokens |
number |
Number of tokens in this chunk |
page |
number |
Page number (for page-based reads) |
charIndexInDocument |
number |
Character offset in the document |
text |
string |
The actual text content |
dystr/files/search
Searches within a specific file in your Workspace for content semantically similar to given prompts. Returns ranked excerpts ordered by similarity.
Input Required
Argument |
Description |
id |
ID of the file to search |
fileName |
Name of the file to search |
prompt |
Array of search prompts (each up to 256 characters) |
topk |
Number of results to return (max: 25) |
startPage |
Page number to begin searching from |
numPages |
Number of pages to search (0 = search all pages) |
cost |
Search accuracy (0.0 = faster but less accurate, 1.0 = slower but more accurate) |
What Happens
- Converts search prompts into semantic vectors
- Searches the file for content similar to the combined prompts
- Returns up to 25 most relevant excerpts, ranked by similarity
- Each result includes the location and context of the match
See the Files documentation for more details on how files are stored and indexed.
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string | null |
Error message if status is "error" |
prompt |
string[] |
The search prompts that were used |
results |
array |
Array of search results (see structure below) |
Structure of each result in the array:
Field |
Type |
Description |
id |
string |
Result identifier |
fileName |
string |
Name of the file |
mimeType |
string |
MIME type of the file |
score |
number |
Similarity score (higher = more similar) |
rank |
number |
Position in results (0 = most similar) |
text |
string |
The matching text excerpt |
page |
number |
Page number where match was found |
charIndexInPage |
number |
Character offset within the page |
charIndexInFile |
number |
Character offset within the entire file |
dystr/files/write
Creates a new file in your Workspace. Cannot overwrite or append to existing files.
Input Required
Argument |
Description |
name |
Name for the new file, including extension (e.g., "demo.txt") |
folder |
Folder to create the file in (default: "/files") |
mimeType |
MIME type of the content (e.g., "text/plain") |
contents |
The file contents (max: 100KB) |
What Happens
- Validates the file size (must be under 100KB)
- Creates a new file with the specified name in the given folder
- Writes the contents to the file with the specified MIME type
- Returns the file's ID and status
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string |
Success confirmation or error details |
id |
string | null |
ID of the created file (if successful) |
contents |
string |
The contents that were written |
dystr/notes/create
Creates a new rich text note in your Workspace. Notes support markdown formatting and are stored with version history.
Input Required
Argument |
Description |
title |
Title for the new note |
contents |
Note contents in markdown format |
ArgumentDescriptiontitle
Title for the new notecontents
Note contents in markdown format
What Happens
- Converts the markdown content into a rich text format
- Creates a new note with the specified title
- Stores the content as the first revision of the note
- Associates the note with your Workspace
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
Field |
Type |
Description |
status |
string |
Result status ("okay" or "error") |
statusMessage |
string | null |
Error message if status is "error" |
id |
string | null |
ID of the created note (if successful) |
title |
string |
The title that was set |
contents |
object |
The processed rich text contents |
dystr/notes/list
Lists rich text notes from your Workspace, ordered by last modified date.
Input Required
Argument |
Description |
topk |
Number of most recent notes to return (max: 25) |
What Happens
- Queries your Workspace for non-removed notes
- Orders them by last modification date
- Returns up to 25 most recent notes
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")results
arrayArray of note objects (see structure below)
Structure of each note in the results array:
FieldTypeDescriptionid
string | nullNote identifiertitle
string | nullTitle of the notelastModified
string | nullLast modification timestamp
dystr/notes/overwrite
Updates an existing rich text note in your Workspace by creating a new revision. The previous version is preserved in the note's history.
Input Required
ArgumentDescriptionid
ID of the note to updatecontents
New note contents in markdown format
What Happens
- Converts the new markdown content into rich text format
- Creates a new revision of the note
- Updates the note to point to the new revision
- Preserves the previous version in the note's history
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
string | nullError message if status is "error"id
string | nullID of the updated notetitle
string | nullTitle of the notecontents
objectThe processed rich text contents
See the Notes documentation for more details on the content structure of rich text notes.
dystr/notes/read
Reads the contents of a rich text note from your Workspace. Returns the most recent version of the note.
Input Required
ArgumentDescriptionid
ID of the note to read
What Happens
- Locates the specified note in your Workspace
- Retrieves the most recent revision
- Converts the rich text content to markdown format
- Returns the note's title and contents
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
stringSuccess confirmation or "Note not found" errorid
string | nullID of the note that was readtitle
string | nullTitle of the note (defaults to "Untitled" if not set)contents
string | nullThe note contents in markdown format
dystr/sqlite/query
Executes a SQL query on a SQLite database file in your Workspace. Can create new databases or modify existing ones.
Input Required
ArgumentDescriptionfileId
ID of existing SQLite file (required except for CREATE)fileName
Name of the SQLite file (with .sqlite extension)folder
Folder to store the file in (default: "/files")query
SQL query to execute (max: 1,000,000 chars)queryType
Type of query: CREATE
, ALTER
, SELECT
, INSERT
, UPDATE
, DROP
, DELETE
, or PRAGMA
What Happens
- For existing files: Downloads the SQLite database from your Workspace
- For new files: Creates a new SQLite database
- Executes the provided SQL query
- Saves any changes back to your Workspace
- For SELECT queries: Returns up to 25,000 bytes of results
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
stringSuccess confirmation or error detailsid
string | nullID of the database filepath
string | nullPath to the file in Workspaceresults
array | objectQuery results (for SELECT/PRAGMA) or execution info (for other queries)resultsTruncated
booleanWhether results were truncated due to sizetotalResultsRows
numberTotal number of rows in the resultresultsRowsReturned
numberNumber of rows actually returned
dystr/workspace/search
Searches across all files in your Workspace for both content and filenames that are semantically similar to your search prompts. Also returns Workspace statistics.
Input Required
ArgumentDescriptionquery
Array of search prompts (each up to 256 characters)topk
Number of results to return (max: 25)cost
Search accuracy (0.0 = faster but less accurate, 1.0 = slower but more accurate)
What Happens
- Converts search prompts into semantic vectors and combines them
- Performs two parallel searches:
- Content search: Finds similar text within files
- Name search: Finds files with similar names
- Removes duplicates and ranks results by similarity
- Collects Workspace statistics (file count, storage used, MIME types)
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
string | nullError message if status is "error"query
string[]The search prompts that were usedsimilarContentResults
arrayContent matches (see structure below)similarNameResults
arrayFilename matches (see structure below)workspace
objectWorkspace statistics (see structure below)
Structure of each content result:
FieldTypeDescriptionid
stringResult identifierfileName
stringName of the filemimeType
stringMIME type of the filescore
numberSimilarity score (higher = more similar)rank
numberPosition in results (0 = most similar)text
stringThe matching text excerptpage
numberPage number where match was foundcharIndexInPage
numberCharacter offset within the pagecharIndexInFile
numberCharacter offset within the entire file
Structure of each filename result:
FieldTypeDescriptionid
stringResult identifierfileName
stringName of the filefilesystemPath
stringFull path to the filemimeType
stringMIME type of the filemimeDescription
stringHuman-readable description of the file typesize
numberFile size in bytesscore
numberSimilarity score (higher = more similar)rank
numberPosition in results (0 = most similar)
Structure of workspace statistics:
FieldTypeDescriptionid
stringWorkspace identifiernumFiles
numberTotal number of filesstorageUsedMB
numberTotal storage used in megabytesmimeTypeCount
arrayCount of files by MIME type
system/util/email
Sends an email to specified recipients within your Dystr Organization. Can only send emails to verified organization members.
Input Required
ArgumentDescriptionto
Array of recipient email addressescc
Array of CC recipient email addresses (optional)bcc
Array of BCC recipient email addresses (optional)subject
Subject line of the emailbody
Email content in markdown format
What Happens
- Validates that all recipients are verified members of your organization
- Filters out any invalid email addresses
- Formats the email with a clear footer and sender information
- Queues the email for delivery
- Returns delivery status
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
stringSuccess confirmation or error detailsresult
stringDelivery status message
Important Notes
- The model will only use this command when explicitly requested by the user in the prompt
- All recipients must be verified members of your Dystr Organization
- Invalid email addresses will be filtered out
- The email will appear to come from your the Worker's email address
- Email content supports markdown formatting
system/util/fetch
Fetches and extracts text content from a webpage. Removes styling, scripts, and navigation elements to return clean, readable text.
Input Required
ArgumentDescriptionurl
URL of the webpage to fetch
What Happens
- Fetches the webpage through a proxy service
- Removes non-content elements (styles, scripts, iframes, nav)
- Extracts and cleans the text content:
- Normalizes whitespace
- Removes duplicate punctuation
- Strips special characters
- Returns up to 10,000 characters of the cleaned text
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
string | nullError message if fetch failsresult
stringThe cleaned webpage textlength
numberTotal length of the cleaned textfirst
numberNumber of characters returned (max: 10,000)skip
numberNumber of characters skipped (for pagination)
Important Notes
- Some websites may block automated fetching
- Content is limited to 10,000 characters per request
- JavaScript-rendered content may not be captured
- Returns plain text only (no HTML or formatting)
system/util/math
Evaluates simple mathematical expressions and returns the result. For more complex computations or programming logic, use compute/run
instead.
Input Required
ArgumentDescriptioncalc
Mathematical expression to evaluate
What Happens
- Parses the mathematical expression
- Evaluates the result
- Returns the computed value or error message
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")result
stringCalculated result or error message
Supported Operations
- Basic arithmetic (
+
, -
, *
, /
, ^
) - Parentheses for grouping
- Common functions:
- Trigonometric (sin, cos, tan)
- Logarithmic (log, ln)
- Exponential (exp, sqrt)
- Constants (pi, e)
- Unit conversions (e.g., "2 inch to cm")
Limitations
- No support for calculus operations
- No symbolic algebra
- No complex numbers
- No matrices or vectors
- No programming constructs (use
dystr/compute/run
instead)
Note
For more complex calculations requiring programming logic, loops, or advanced mathematical operations, use the dystr/compute/run
command instead of this simple calculator.
system/util/stt
Converts speech from an audio file to text, with optional translation to English. Creates a new text file in your Workspace with the results.
Input Required
ArgumentDescriptionfileId
ID of the audio file to converttranslate
Whether to translate the speech to English (optional)outputFileName
Name for the output file (with extension: .json, .txt, .srt, or .vtt)outputFileType
Format of output: json
, text
, srt
, verbose_json
, or vttoutputFolder
Folder to save the output file (default: "/files")
What Happens
- Loads the source audio file from your Workspace
- Processes the speech using AI transcription
- Translates to English if requested
- Creates a new file with the transcribed text
- Returns both the text and file information
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
stringSuccess confirmation or error detailstext
string | nullThe transcribed textfileId
string | nullID of the created output filefileUrl
string | nullURL to access the output filefileName
string | nullName of the output filefileType
string | nullFormat of the output filefolder
string | nullLocation of the output file
Output Formats
text
: Plain text transcriptionjson
: Basic JSON with text contentverbose_json
: JSON with timestamps and metadatasrt
: Subtitle format with timingsvtt
: Web Video Text Tracks format
system/util/tts
Converts text to speech and saves it as an audio file in your Workspace. Supports multiple voices and audio formats.
Input Required
ArgumentDescriptiontext
Text to convert to speech (max: 4,096 characters)voice
Voice to use: alloy
, echo
, fable
, onyx
, nova
, or shimmeroutputFileName
Name for the output file (with extension: .mp3, .opus, .aac, or .flac)outputFileType
Format of output: mp3
, opus
, aac
, or flacoutputFolder
Folder to save the output file (default: "/files")
What Happens
- Validates the input text length
- Processes the text using the selected voice
- Converts to the requested audio format
- Creates a new audio file in your Workspace
- Returns the file information
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")statusMessage
stringSuccess confirmation or error detailstext
string | nullThe input text that was convertedvoice
string | nullThe voice that was usedfileId
string | nullID of the created audio filefileUrl
string | nullURL to access the audio filefileName
string | nullName of the output filefileType
string | nullFormat of the output filefolder
string | nullLocation of the output file
Important Notes
- Text must be under 4,096 characters per request
- Only use this for direct text-to-speech conversion
- For file conversion, use appropriate file conversion commands instead
- All voices are AI-generated and support English text
vendor/google/search
Performs a Google search and returns relevant web results. Supports pagination and configurable result count.
Input Required
ArgumentDescriptionquery
Search query stringresultOffset
Starting position in search results (for pagination)resultCount
Number of results to return (default: 5)
What Happens
- Sends the search query to Google
- Retrieves web search results
- Extracts relevant information from each result
- Returns formatted results with titles, URLs, and snippets
Results Provided to Assistant
After execution, these fields are injected into the Assistant's context:
FieldTypeDescriptionstatus
stringResult status ("okay" or "error")query
stringThe search query that was usedresults
arrayArray of search results (see structure below)
Structure of each search result:
FieldTypeDescriptiontitle
stringTitle of the webpageurl
stringURL of the webpagesnippet
stringBrief excerpt from the page content
Important Notes
- Results are from Google's Custom Search API
- Each result includes a title, URL, and relevant text snippet
- Use pagination to access more results beyond the first set
- Results are ordered by relevance to the query
- Maximum of 10 results per request