AI command nodes

AI commands are commands that use Tana AI to run actions, and is now available on Tana Core.

For an intro on command nodes and all non-AI commands, see Command nodes

Details

Ask AI

Can be run on a single node, a single field, or can be configured with prompts, batch processing, temperature etc. Accepts user-provided OpenAI keys.

Generic AI query

A generic AI query command that streams content into Tana. Accepts user-provided OpenAI keys.

Make API request

Making an API request involves specifying the API endpoint, choosing the appropriate HTTP method, providing any necessary headers or authentication, and handling the response from the API. This process allows different software systems to exchange data and functionality seamlessly.

Generate image(s) with DALL-E

Returns an AI-generated image using DALL-E.

Cluster children with embeddings

Takes a list of children, gets embeddings, and does unsupervised clustering. Given that you have to manually specify number of clusters, this is more of an experiment until we have server-side processing.

Fill in all empty AI fields

System command that uses the field's context to fill empty AI fields

Transcribe audio

Sends an audio file to WhisperAI and returns a transcription.

Autotag

Add tags using GPT interpretation

Add meeting bot

Send a meeting agent to a video call to transcribe what participants are saying. Many of these fields map onto the ones being synced by the Calendar integration.

  • Meeting link (required): Where to find the link to the meeting
    • Works well with Google Meet and Zoom. Coming soon: MS Teams
  • Transcript field (required): Where to place the transcript of the meeting
  • Attendees field: Where to find attendees for the meeting
    • Having attendees here improves participant identification during the transcription process and when making meeting notes and attributing who said what
  • Recording target: The link to the recording will be placed here. It will be deleted after 7 day
  • Meeting date field: Where to find the date of the meeting. The bot will join automatically when the meeting starts.
    • If a meeting has no date filled in, it will join immediately when you hit "Add meeting agent" button.
  • Transcription provider: Which provider to use for transcription
  • Meeting bot name: Name of the bot to use for the meeting
    • When the agent joins the meeting, the name of the agent can be changed here to "Tam's assistant"
  • Post process command: Command to run after transcription is completed. The default is a command with the Text processing agent, see below.

Text processing agent

Take a transcript (or any text), extract summaries and other things, put them in a target location.

General

  • Transcript source (required): Where to find the transcript. The field with the text for processing.
    • Could be a meeting transcript, article, voice memo or similar.
  • Status attribute: Use this if you need to override the default system provided status attribute.
    • You may be using several text processors on the same transcript. You can have each text processor triggered based on a different status field.
  • Text processing agent mode: Which mode to run the text processing agent in. Defaults to meeting if not set. Available modes: meeting|generic.
    • There are two modes: meeting or generic. For standard meetings, we recommend the meeting setting as it has been optimized to process action items, entities, and attribution of ideas to attendees. For other uses like processing a voice memo, we recommend generic. Default: meeting

Note: If all you define is the Transcript source, the processing agent will create a summary of the transcript, output as a child of the node.

Tag choices (optional)

  • Attendees field: Where to find users to be used for speaker identification
    • Field where attendees are listed. Most applicable to meetings where the meeting agent identifies speakers and can link them to the list in this field.
  • Tags to use for entities: Entities (e.g. persons, companies) will be detected and replaced for these tags
  • Tags to use for action items: Action items (e.g. decisions, todos) will be extracted for these tags
  • Tags to use for item extraction: Looks for sections of the transcript that match these tags, and extracts them as nodes

Note: if no tags are defined, the processor will not look for anything specific and only run the summary.

Targets (optional)

  • Summary target: Where to place the summary of the meeting
  • New entities target: Where to place discovered entities
  • Action items target: Where to place discovered action items
  • Extracted items target: Where to place extracted items

Note: If you don't set targets, things are placed as children

Prompts (optional)

  • Summary prompt: Prompt to use for generating the summary
  • Augment prompt: Prompt to use for augmenting the attendees
  • Action items prompt: Prompt to use for detecting action items. Use ${sys:actionItemTags} to get configured tags
  • Entities prompt: Prompt to use for detecting new entities, Use ${sys:entityTags} to get configured tags
  • Extracted items user prompt: Additional prompt to use for extracting items (optional).
EXAMPLE PROMPT:

GOAL:
- You are a senior UX researcher tasked with finding relevant “user observations”
in an onboarding transcript and reporting them back classified according to
the provided tags.
TASK:
- Find all moments in the transcript when the user experience any of the
described types of observation found in the supplied tags.
- You work for Acme Inc., and it is the experiences of the user - not the
team member - you want to observe and capture. The person with the #team acme
tag works at Acme Inc. The person being onboarded is tagged #person.
- Find at least 10 items, and at least 2 of each type.

Disabling functions (optional)

  • Disable augmentation: Checkbox. Do not enhance attendees with additional information
  • Disable summary: Checkbox. Do not generate a summary

All parameters

Prompt

  • Description: Prompt expression - same syntax as title expression, but can be multiline. ${sys:context} gives context of node and children.
  • Source: Tana

Node filter

  • Description: Search query to filter nodes that this command can be run on
  • Source: Tana

Node context

  • Description: Node context for commands - defaults to node the command is run on
  • Source: Tana

Field dependencies

  • Description: References to other fields on the same node. If any of these fields are empty, and have AI turned on, then their AI prompts will be run before evaluating this command.
  • Source: Tana

Target node

  • Description: Defines what Tana object to insert the result into. Can be a reference to a template node, or a field reference
  • Source: Tana

Temperature

  • Description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. OpenAI generally recommends altering this or top_p but not both. Defaults to 0.
  • Source: OpenAI

Top P

  • Description: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. OpenAI generally recommends altering this or temperature but not both. Defaults to 1.
  • Source: OpenAI

Suffix

  • Description: A string that will be appended to the end of the text.
  • Source: OpenAI

Best of

  • Description: Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token). When used with n, best_of controls the number of candidate completions and n specifies how many to return – best_of must be greater than n.
  • Source: OpenAI

Max tokens

  • Description: The maximum number of tokens to generate. Will be capped at maximum given prompt length. Defaults to maximum.
  • Source: OpenAI

Model to use

  • Description: Allows you to select from the models that are available to use in Tana.
  • Source: OpenAI

Stop sequences

  • Description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. One sequence on each node.
  • Source: OpenAI

Presence penalty

  • Description: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Defaults to 0.
  • Source: OpenAI

Frequency penalty

  • Description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. Defaults to 0.
  • Source: OpenAI

Combination prompt

  • Description: After running the normal prompt over all of the context, this prompt will be run with ${sys:context} set to the concatenated output.
  • Source: OpenAI

Batch prompt context

  • Description: The presence of this field enables splitting up a long context into multiple prompts, which can optionally be combined with the Combination prompt. The field ${sys:context} is determined by the dropdown options, or by a reference to a field or a node.
  • Source: OpenAI

Fill context window percentage

  • Description: The context window size includes both the prompt and the response. This parameter takes a number from 0 to 1, and determines the percentage of the context window that the prompt is allowed to fill - both for individual and batched prompts. The default is 0.5, which means that the prompt and response are equal in size.
  • Source: OpenAI

URL

  • Description: URL, processed using title expressions
  • Source: Tana

Insert output strategy

  • Description: Default is adding as a child (except in fields, where default is replace)
  • Source: Tana

Payload

  • Description: Payload type
  • Source: Tana

API method

  • Description: Defaults to GET
  • Source: Tana

Parse results

  • Description: Defaults to no parsing (raw)
  • Source: Tana

Authorization header

  • Description: For authentication (for example "Bearer ....")
  • Source: Tana

Headers

  • Description: API headers, must start with a word and a colon, like "Authorization: ..."
  • Source: Tana

Avoid using proxy

  • Description: For local sites, or where you know there is no CORS issue
  • Source: Tana

Tags

  • Description: Define supertags
  • Source: Tana

Image size

  • Description: The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3 models.
  • Source: OpenAI

Number of images to generate

  • Description: The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported.
  • Source: OpenAI

Metaprompt to enhance prompt with GPT-3

  • Description: n/a
  • Source: Tana

Number of groups

  • Description: Defaults to 3
  • Source: OpenAI

Transcription Language

  • Description: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
  • Source: OpenAI

View definition

  • Description: View definition to apply to node
  • Source: Tana

View type

  • Description: Set view type by picking from dropdown.
  • Source: Tana

Fields to set

  • Description: Fields to set, and optionally values
  • Source: Tana

Commands

  • Description: Commands to execute
  • Source: Tana

Tag candidates

  • Description: Define supertags that become candidates
  • Source: Tana

Fields to remove

  • Description: Define fields that, if present, will be removed.
  • Source: Tana

Move node target

  • Description: Define node to be moved. Reference to a specific node, field or a dropdown option
  • Source: Tana

Remove reference after moving node

  • Description: Will remove the reference after moving node
  • Source: Tana

Move original node

  • Description: By default, if you run the command on a reference, the reference will be moved. This option can force the original node to be moved.
  • Source: Tana

Done status to set

  • Description: Gives you done state options to set. There are four options to choose from:
    • Node has no checkbox
    • Done
    • Not done
    • Toggle done status
  • Source: Tana

Command to run

  • Description: Write out the commands you want to run.
    • If you're uncertain about how a command is written out, navigate to it through the command line, create a custom shortcut, and go to Settings > Private keyboard shortcuts to the shortcut you just made and expand it. You'll find the command written out in a node.
  • Source: Tana

Look for children in field

  • Description: Looks for children in a specific field, instead of the node. Add reference to field definition.
  • Source: Tana

Relative date string

  • Description: Write out a date string like this week, in two months, etc. Interpreted with prompt expressions.
  • Source: Tana

Reference date

  • Description: Either a date, or use Lookup field to reference a field. If reference date is May 1, and relative date is in two weeks, the output will be May 15th.
  • Source: Tana

Date/time granularity

  • Description: Allows you to specify the granularity of the date object. Use the dropdown to set year, month, week, day, hour, minute, second, or millisecond.
  • Source: Tana

Set only start or end of date

  • Description: Allows you to specify whether you want to set a Start or End date/time.
  • Source: Tana


Related release notes

  • FixedFixed bug where Fetch Youtube Transcript command node was not working. ()

Related FAQs

Examples

  • A keyboard shortcut to invoke a set of commands
    Nov 12, 2024
    🙏 Thanks to Chuck for surfacing this excellent tip for all keyboard users out there doing incremental/bullet journaling and who find that command buttons just aren't their thing! For more stuff like this, join our community to share and learn about all things Tana 🫶

    Goal

    Use one keyboard shortcut to bring up a very specific set of commands.

    Instructions

    For this example, we're going to build one command that brings up a set of commands for a bullet journaling practice. People who practice bullet journalling (or BuJo) usually decide on a list of keys or "signifiers": bullet symbols that mean different things to the writer. Here's an example of things that might be in this list:

    Example of signifiers: task, note, follow up, event, memory, look up, future log

    In Tana, we can assume each item in the list is a separate supertag.

    Build the command

    1. Decide on a prefix for your commands. In this example, we'll use "Bujo:".
    2. For each of the signifiers
      1. Create a new command called Bujo: [signifier]
      2. Add the command Add tag, and insert the supertag definition to the parameter
    3. Create a keyboard shortcut: Run Create keyboard shortcut in the command line, then record the shortcut you want to use. In this case, we're using Cmd/Ctrl+Shift+P. In the parameter Commands, write the words Bujo:.
    Setup of commands
    Keyboard shortcut with the typed-in prefix BuJo:

    Testing the command

    To test it, use the keyboard shortcut Cmd/Ctrl+Shift+P

    • This will insert the words Bujo: in the command line
    • Type space to bring up all the options

    That's it 🙌

  • Move node to Library when a supertag is used
    Nov 12, 2024
    🙏 Thanks to many community members but especially Ready and Navigator Dee for surfacing this tip in a recent conversation! For more stuff like this, join our community to share and learn about all things Tana 🫶

    Goal

    To move all nodes to a single place when they get tagged. This is useful if you want nodes of a certain type to live in a place that makes sense for breadcrumb navigation.

    Instructions

    For this example, we're going to build a command that moves all tagged nodes to the Library.

    Build the command

    1. Create a new command called Move to Library
      1. Add the command Move node
      2. In the parameter Move node target, pick the Library from the dropdown. There are other locations to choose from as well, and you can insert a reference to any node you want as the target
      3. Add parameter Remove references after moving node and give it your desired setting. Most would want it unchecked so it leaves a reference of the node in the original location
      4. Add parameter Move original node and check it. This ensures that even when you use the Add tag action on a reference, it moves the original node to the desired location and not the reference (which won't achieve the goal of this command)
    2. Add the command to the config of the supertag in question. Go to AI and Commands > On added, and add a reference to the command here.

    Testing the command

    To test it, use the supertag on a node:

    • If used on a node, it should immediately send the original to the specified location and leave a reference behind.
    • If used on a reference, it should send the original - wherever it is - to the specified location.

    That's it 🙌

  • Receive a notification whenever someone uses a supertag
    Nov 12, 2024

    Goal

    Community member Jérémie asked: "I created a new supertag called #feedback to collect feedback from my team. They can easily add a comment and add the supertag. Is there a way to receive a notification when the tag has been added?"

    Great question! Below was the solution that worked 👇 For more stuff like this, join our community to share and learn about all things Tana 🫶

    Instructions

    Build the command

    1. Create a new command called Notify me
      1. Add the command Run a command line command
      2. In the parameter Commands, write Notify @[your tana account email]. Example: Notify @fei@tana.inc
    2. Go to the supertag config you want to be notified on, to the section Trigger commands on events, and add a reference to the command to the On added section:

    Testing

    Test the command by adding the supertag. You should

    1. get a notification that a notification has been sent, and
    2. see a blue dot appear in your notifications. Clicking it shows you which node you were notified on.

    🙌 That's it!

  • One command to toggle the related content section on/off
    Nov 12, 2024
    🙏 Thanks to Navigator Theo for sharing how to implement this "focus mode" idea on Related content sections! For more stuff like this, join our community to share and learn about all things Tana 🫶

    Goal

    You want to dial up your focus by hiding the Related content sections.

    Instructions

    Build the single-command toggle

    See this example on how to build it. Build the first section called "In the schema", then come back here.

    To configure the related content sections you want to toggle the visibility on, each section will need a node filter where the checked state of the is visible field determines whether they show up or not:

    • Navigate to the Related content section in the configuration:
      • For supertags, Cmd/Ctrl+Shift click on the tag itself
      • For nodes, run the command Configure node
    • For every related content section
      • Run the command Add contextual content on the related content nodes, and add >Node filter:: >is visible:: true (checked)
    The system field Node filters on related content sections.

    Testing

    Test the command by running the Toggle visibility command on the node. It should make the related content sections appear/disappear.

    Optionally, you can add the Toggle visibility command to the node as a button, and then use that instead.

    🙌 That's it!

  • A single command that toggles the checked/unchecked state of a field
    Nov 12, 2024
    🙏 Credit goes to Ulises RJ and Navigator Theo for coming up with this elegant solution! Join our community to share and learn about all things Tana 🫶

    Goal

    You want to build one command that toggles the state of something, like a checkbox. The key that unlocks this is the obscure Run commands in parallel command, and this is an excellent use for it. The uses for a toggle are endless; this example will demonstrate how to build a visibility switch for command buttons.

    Let's call it the single-command toggle.

    Note: This is more like a proto-command, something that isn't useful on its own, but unlocks many creative uses.

    Instructions

    In the schema

    1. Create a checkbox field called is visible.
      1. In the Hide field setting, choose Always
    2. Create a command node for checking the is visible field:
      1. Name: visibility ON
      2. Add node filter: >NOT:: >is visible:: true (checked)
      3. Add command Set field values
      4. In parameter Fields to set: >is visible:: true (checked)
    3. Make another command node that removes the field:
      1. Name: visibility OFF
      2. Add node filter: >is visible:: true (checked)
      3. Add command Remove fields
      4. In parameter Fields to remove: is visible (field definition)
    4. Create a third command node for toggling between the two commands:
      1. Name: Toggle visibility
      2. Add command Run commands in parallel
      3. In the parameter Commands to run, add references to the two commands you created earlier
    5. Test the command out:
      1. On any node, run the command Toggle visibility. It should add the is visible field to it, checked. Running it again should remove the field.
    Setup for the commands

    The commands are now ready to go.

    Configure visibility of command buttons

    To configure the commands you want to toggle the visibility on, each command will need a node filter where the checked state of the is visible field determines whether they show up or not:

    • Create or find a node that has many command buttons you want to hide
    • For every command, add the >Node filter:: >is visible:: true (checked)
    • As you do this, the buttons should, one by one, disappear from the node.
    A node filter applied to the command button

    Testing

    Test the command again by running the Toggle visibility command on the node. It should make the buttons appear/disappear.

    🙌 That's it!

    Further ideas

    • Bind a custom keyboard shortcut to Toggle visibility so you can easily toggle the visibility of buttons with the same keystrokes. See video above.
    • Add the toggle command as a button: then you can toggle things with a mouse-click instead
    • Use the same thing to toggle the visibility of related content sections
  • How does the "Set view definition" command work?
    Sep 26, 2024

    There is a command called Set view definition. It can set the Group, Sort and Display settings of a node view.

    There is no good UX for this at the moment, so the instructions are not conventional nor friendly for beginners. But right now, this is one way of doing it:

    • Mock up a node that will have sample child nodes representing the data you'll be applying this command on
    • Then, create the exact view settings you want with Group, Sort and Display.
    • Go Cmd/Ctrl+K > Debug Node on the parent node and look at Views for node:
    • Clone the fields over to the command node so it looks like this:

    When you run this command on a node, this should change the view settings according to your configuration.

  • How can I extract the start date of a range using Commands?
    Sep 26, 2024

    Use Insert relative date command, here's an example:

  • How do I use the Autofill command to enrich URL nodes?
    Sep 26, 2024

    The Autofill command can generate a new node title and description based on the URL.

    To set up the command

    • Create a new command node
    • Add the Autofill fields command
    • Add and check off Autofill title and Autofill description parameters to change both
    • Add Model to use to control which model you prefer. If left empty, Tana will pick the one that returns the answer with best quality and consistency

    To run the command

    • Run the command on a URL node using the command line
    • Put this command node in the Commands section of a supertag you use for URLs. Press the button to run the command.
  • How can I add supertags on things that I send from Tana Capture?
    Sep 26, 2024

    While it isn't possible to tag things when you're sending things from Tana Capture, you can have Tana do some post-processing magic to convert written-out tags to real tags once they arrive the Inbox—no AI needed!

    1. This method uses a simple Tana Paste command that you can run on the Inbox node, which targets all new children that have "#" in them.
    2. Once you've created the command, you must add it to the On child added section of the Inbox node. You can find it by running the command Debug node on the title of the Inbox.

    Here's Theo describing the command:

    "All it does is paste the nodes that have # in them and that are not tagged, using Tana Paste.

    Say we add this through Tana Capture:

    buy milk #todo

    The command will paste that exact text back in with Tana Paste, where ${name} is buy milk #todo and ${sys:content} are any child notes that are present. Using Tana Paste, #todo will be added as a tag.

    Note: this creates a new node, so the created date will change, meaning you’ll lose the time that the node was captured through Tana Capture."

Question

  • In the command line, Set [field] -> [value] doesn't show all my fields, why?
    Sep 26, 2024

    Set [field] command only works on field types Option, Instance, User and Checkbox.

  • How do I share a supertag from my private workspace to a shared one?
    Sep 26, 2024
    Currently, the easiest and most foolproof way to do this is to not share it but instead build the supertag, with its fields and anything else necessary for the supertag to work, from the ground up in the new space.

    That said, if you still want to move a supertag over that exists only in your private workspace, the main work is to ensure that there's nothing in the supertag that references something in your private workspace, otherwise it will appear as broken to others once it's moved.

    It's like packaging up a zip file. You can't just zip up a bunch of shortcuts, you need the real files in there or the recipient will only see broken shortcuts.

    You'll also have to remember to move over other things like field options, commands, and ensure that no saved view options contain elements from your workspace. Basically, you must ensure that nothing you're moving over from your workspace contains references from your workspace.

    To bring all nodes (except system nodes) into the supertags, fields and commands you want to move, use the command "Bring referenced node here". Alternatively, you can move each necessary node separately too if you for example want the field definition to exist outside the supertag. But the key is that everything that is connected to what you're sending over gets sent over too, otherwise there will be missing pieces.

  • Can a command move the current node to a field of a new node?
    Sep 26, 2024

    Yes, you can. Make a new command node, and use the command Insert Tana Paste with the following prompt:

    - ${name} #note
    - Based on:: [[^${sys:nodeId}]]

    The first line is the new node. It uses the name of the current node to inform the name of the new node by using the title expression ${name}. The supertag #note can be enough for Tana to find the right tag to use, but you can specify it more precisely by adding the ^nodeID to it. See the Tana Paste doc for more info on this convention. To retrieve the nodeID of a supertag, run the command Copy link (HTML formatted) on a supertag definition and paste the results. It will paste with the nodeID written out:

    The second line is the field. After the name of the field and the double-colon :: is a reference to the current node that the command is being run on, which it is able to target by retrieving the nodeID of the current node using the title expression ${sys:nodeId}.

    This is what the command node should look like:

    Special thanks to Navigator Emmanuel Galanos for this clever solution!