Skip to main content

Socrates Tools: Empower Socrates to Take Action on Cases

Learn about the actions Socrates, Torq's AI analyst, can perform and how to expand its out-of-the-box capabilities.

Socrates, Torq's autonomous AI assistant, not only provides valuable insights but can also take direct action on cases, streamlining investigations and saving time. By using natural language, you can instruct Socrates to suggest next steps and execute selected actions, enhancing the efficiency of your case investigations.

Socrates is pre-configured by Torq to inform you of the actions it's taking, explain its reasoning, and request user confirmation for actions that require approval.

Overview

Out of the box, Socrates can perform operational actions on a case like an analyst. You can further extend Socrates' capabilities by creating tools it can execute. Each tool automates a specific procedure that Socrates can then carry out as an action.

There are 3 types of tools available to Socrates:

  • Built-in tools: Tools available out-of-the-box, such as Add Tags, Change State, or Create Observable.

  • Workflow tools: Tools created from on-demand workflows.

  • Step tools: Tools created from workflow steps.

The full list of available tools is always displayed in the tool menu in a conversation and in the Actionplan tab of the Runbooks page.

How to use

Built-in tools are available out of the box. Workflow and step tools are tools that need to be created and enabled in the workspace for Socrates to execute them.

To create, edit, disable, or delete a Socrates workflow or step tool, navigate to the Socrates Tools page in Settings.

Socrates can only execute tools that are both valid and enabled.

Create a workflow tool

You can extend Socrates's capabilities by creating workflow tools that it can execute. These workflows automate various procedures, including those that leverage integrated third-party systems. Multiple tools can be created from the same workflow.

Any on-demand workflow can be used to create a Socrates tool.

Nested-only workflows cannot be used to create a Socrates tool.

To create a workflow tool:

  1. Create a workflow: Design a workflow that implements the procedure you want Socrates to perform. Ensure it has an On-demand trigger.

    1. If the procedure requires human confirmation, be sure to incorporate that step directly within the workflow.

  2. Configure the workflow:

    1. Define input parameters: Clearly define the trigger input parameters and provide detailed descriptions. This information helps Socrates understand the requirements for the tool execution.

      1. Supported parameter types: Short text, Long text, JSON, Markdown, Number, Boolean, Single select, and Multi select

    2. Set exit parameters: Verify each branch in the workflow ends with an Exit operator that sets the status to Success or Failed and contains parameters that explicitly return the data. Socrates will use this information to interpret the workflow's outcome.

    3. Update the workflow name and description: Open the workflow's More Options menu and select Settings. Socrates will use these settings to understand the workflow functionality.

      1. Give the workflow a meaningful, descriptive name that reflects its purpose.

      2. Provide a concise description of the workflow to ensure clarity.

    4. Publish the workflow: Publish the workflow to make it available to Socrates.

  3. Open the Socrates Tools page: Navigate to Settings > Socrates Tools.

  4. Create a tool: Click + Create tool, select Workflows from the side bar, and select a relevant workflow. Workflows that were previously used to create tools will display an Already in use chip.

  5. Configure the tool:

    1. Review the tool's name and description. Provide a unique name and a meaningful description to ensure Socrates selects and executes the tool correctly. Editing the tool's name or description will not affect the workflow itself.

    2. (Optional) Resolve any underlying workflow issues, such as a missing Exit operator.

      1. If a tool has warnings, Socrates can still use it. However, the tool might not be used as expected, and Actionplans might not be generated properly.

      2. If a tool contains errors, it will be invalid, so Socrates won't be able to execute it until those errors are resolved.

    3. (Optional) Click the Preview tab to preview the workflow before creating the tool.

    4. Click Save. If the underlying workflow is valid, the new tool will be ready to use.

Create a step tool

You can extend Socrates's capabilities by creating step tools that it can execute.

To create a step tool:

  1. Open the Socrates Tools page: Navigate to Settings > Socrates Tools.

  2. Create a tool: Click + Create tool, select Steps from the side bar, and select a relevant step.

  3. Configure the tool:

    1. Review the tool's name and description. Provide a unique name and a meaningful description to ensure Socrates selects and executes the tool correctly. Editing the tool's name or description will not affect the workflow itself.

    2. Select the integration instance for the tool to use.

    3. (Optional) Select a runner.

    4. Click Save.

Edit a tool

You can edit a workflow or step tool's name or description to enhance Socrates's ability to select it and use it.

Changing a tool's name or description will not affect the originating step or workflow name or description.

To edit a workflow or step tool:

  1. Open the Socrates Tools page: Navigate to Investigate > Socrates and select the relevant tool.

  2. Edit the tool: Enter the desired name or description, then click Save.

Disable a tool

Tools can be disabled to prevent Socrates from seeing or using them. This will only affect the tool's status, not its validity.

To disable a workflow or step tool:

  1. Open the Socrates Tools page: Navigate to Investigate > Socrates and select the relevant tool.

  2. Disable the tool: Click the toggle in the top-right corner to disable the tool.

  3. (Optional) Re-enable the tool: If you decide to re-enable the tool, click the toggle to turn it back on.

Delete a tool

To delete a workflow or step tool:

  1. Open the Socrates Tools page: Navigate to Investigate > Socrates and select the relevant tool.

  2. Delete the tool: Click the Delete tool icon and then confirm you want to permanently delete the tool.

Import and export tools

Use the following workflow steps to manage Socrates tooling programmatically:

  • Export Socrates Tool: exports a tool in JSON format, including all tool details and the underlying step or workflow by ID.

  • Import Socrates Tool: gets a tool JSON and imports it. The tool name must be unique, and the behavior depends on the import strategy selected for the Import strategy parameter.

Both steps can be used across workspaces by using the Access token parameter.

Select tools for Socrates

To see which tools are accessible to Socrates, or request that Socrates use a specific tool, you can invoke the tool menu in the Socrates conversation via the @ character. The menu will show all available tools. A single tool can be explicitly selected and sent in the message without additional instructions.

  1. Open the Socrates conversation: Navigate to a relevant case and start a new conversation with Socrates in the Socrates tab.

  2. Invoke the tool menu: Type @ to list the menu with available tools.

  3. Select relevant tools: Hover over tools to see their descriptions, then select any relevant ones for your message. They will be embedded in the conversation and displayed in bold with @.

Explicitly selecting a tool does not guarantee that Socrates will use it. Socrates may choose to use a different or additional available tool based on the message's context or instructions.

Troubleshooting

Socrates can only execute tools that are both valid and enabled. Tools with errors are considered invalid and unavailable, whereas tools with warnings remain valid and available despite their issues.

A Socrates tool can be saved, but it will not run if it is invalid. This can occur due to errors such as an invalid workflow. To be executed, the workflow must be edited—providing the correct parameters will resolve any errors.

When a Socrates tool contains at least one error and is invalid, it will be indicated by an error icon next to the relevant tool on the Socrates Tools page. Tools with at least one warning will have a Ready to use icon on the Socrates Tools page and remain available despite their issues. A banner summarizing all errors and warnings will also be displayed at the top of the tool. These can include:

  • A missing Exit operator warning

  • A missing parameter description warning

  • An unsupported parameter (e.g., integration) error

Workflow edits after tool creation can also result in an error message. If the workflow was unpublished, disabled, or deleted, or the trigger was changed from on-demand, the tool will become invalid and unavailable for use.

Did this answer your question?