Make API request
command. Not only can it make calls to internet services with APIs to fetch data into Tana, you can also pass existing Tana node data to these APIs and then receive results in return. The results of these calls can be added as new Tana nodes or can be used as input to further features like the built-in AI integration.Make API request
command gives me the ability to call out to custom code. Importantly, that code doesnât have to run âon the internetâ somewhere but can in fact run on my local laptop via the Avoid Proxy
setting of Make API request
. As a software engineer, this really opens things up for me. tana-helper
and started adding functions to it.tana-helper
is open source, licensed under the MIT license, and is completely free. tana-helper
running on your laptop is to download the double-clickable Tana Helper.app. This should work on any Mac running Mac OSX 12 (Monterey) or newer with either Intel or Apple Silicon. Open the .dmg and drag the Tana Helper app to your Applications folder.tana-helper
service running on your laptop by following the instructions at: GitHub â verveguy/tana-helper: Small web service to handle API calls from Tana and do useful things. (follow README instructions. â ïž Needs developer knowledge).tana-helper
from the menu should launch a Terminal window showing you the log as Tana Helper runs and handles requests.tanahelper.exe
which will give you a small menu tray app which you can right-click to get the action menu. Or you can double-click the start.exe
which should just launch a terminal window showing the log as tana-helper
runs.tana-helper
service running, youâll need a set of Tana Command nodes to call it. The best thing to do is load this content with all of the commands as a Tana template.tana-helper
base URL, Iâve used the Tana support for secrets. The first time you run one of these commands in Tana, youâll be prompted to fill in the value for the HelperURL. If you are running locally, use http://localhost:8000 (or whatever port youâre running on if youâve tweaked the build). For server deployments of tana-helper
, configure appropriately (some help is in the README on github).#meeting
nodes in Tana, pre-populated with the names of the people I was meeting with. I was able to write the code for this (originally in Swift) and then call it from Tana. That code is now included here in tana-helper
. (See đ Import Calendar into Tana (Mac only))#topic
nodes. Topics might be projects, technologies, events, etc. Each of these probably exists in my library, created at some earlier time. So meetings are one of the main ways I accumulate more knowledge about these topics. Most meetings also touch on more than one topic, and also have extraneous notes in them as well. So I canât just organize each meeting neatly under a topic. After using Tana for a while, I found that I wanted to copy those notes to the Library nodes themselves rather than have them only appear in my meeting notes. Over time, this let me build up more and more knowledge of a topic through many conversations with my #topic
nodes accumulating all that knowledge. (See đ Harvesting inline references).#topic
nodes, I want to query many of these same topics by semantic content rather than just text matching. I want to find topics that are similar or related in ways that perhaps arenât initially obvious. Since Tana canât do that (yet), I was able to write some code to copy the nodes to an external vector database as âembeddingsâ computed by OpenAI which I could then search by âsemantic proximityâ to any question I might want to ask of my own notes. Two Tana Make API
commands are then all it takes â one to upsert a topic node into the database, and one to query the database using my current node as the âsimilarityâ query. The vector database I originally chose was Pinecone, but a better choice now is ChromaDB, which stores all the data locally. (I now support Weaviate as well.) (See âïž Using Vector databases with Tana)tana-helper
web UI. Use the âRAG Indexâ menu and the Upload button. This will walk your entire Tana workspace, finding all tagged nodes and treating them as âtopicsâ. It will embed all the child nodes such that, when you use the Query Chroma command, you will get the topic nodes as references back to Tana whenever a child node matches your semantic query. You can also change the Query Chroma command parameters to get back the smaller child fragments (âreturnsâ: ânodeâ
), or ask for both topics and fragments. (âreturnsâ: âbothâ
) Thereâs even a mode for returning the topic node as an inline reference with the matching fragment nested within it. (âreturnsâ: ânestedâ
). You can also incrementally update to future versions of your workspace â just save a new Tana Export JSON file and use RAGIndex->Upload again. Only nodes that have been added or changed will be re-embedded. See this video demo for a quick tour. tana-helper
is written in python, and many of the functions are relatively short, I decided Iâd try and have code written in Tana passed to tana-helper
on the fly. The result is covered below in đ Running user-defined python .tana-helper
that lets you do things like this with a JSON export of your Tana workspace:Interactive 3D visualization of my Tana knowledge graph
tana-helper
does a bunch of useful stuff, all made possible by the built-in Tana Make API request
command. Each command calls a different API âendpointâ of tana-helper;
you can think of it as a kind of âswiss army knifeâ of services./calendar
endpoint will by default return you a list of your meetings for a given date from a calendar named âCalendarâ. If no date is specified, defaults to the current date.{
"me": "self name", // your own name to avoid adding you as an attendee
"meeting": "#tag", // the tag to use for meetings defaults to #meeting
"person": "#tag", // tag for people / attendees defaults to #person
"solo": true | false, // include meetings with just one person (yourself?)
"one2one": "#tag", // tag for 1 to 1 meetings, defaults to #1:1
"calendar": "Calendar", // the name of the Calendar to read from
"date": "2024-03-21" // date to fetch (defaults to Today)
"offset": -n, | 0 | +n // how many days before or after today to start from
"range": >= 1, // how many days to retrieve. Defaults to 1
}
Calendar
as the name of your calendar. You can change this by passing âcalendarâ: â<your calendar name>â
in the JSON payload.tana-helper
service. (Source code at GitHub â verveguy/tana-helper)tana-helper
that lets the user craft a Tana command that runs an arbitrary chunk of python code against some passed in params.tana-helper
service? Using something like ngrok you can open a tunnel back to your local machine, exposing only the tana-helper port 8000.tana-helper
will not be able to insert anything into Tana.?format=csv
on the URL. (if you leave format off, itâll default to json)<METHOD>
/<TARGET URL>
. So /proxy/DELETE/http://something.com/foo?id=12 will make. a DELETE request to whatever is at http://something.com/foo?id=12{
"name": "This is a RESTful data object. We pass a Tana structure as the value of data field",
"data": [
{
"name": "Another object",
"field 1": "Foo",
"field 2": "Bar"
}
]
}
{
"name": "This is a RESTful object in Tana. Note the data field has fields",
"data": {
"api_key": "none",
"format": "text",
"target": "de",
"source": "auto",
"q": "What on earth does this do?"
}
}
tana-helper
provides a 3D visualization of your Tana workspace.Interactive 3D visualization of my Tana knowledge graph
tana-helper
API to âqueue upâ the paste which adds a special queue node to your Tana Inbox. Later on when back in the Tana UI, you use a Tana Make API request
command to âfetchâ the queued paste. This is the only way to get Tana paste into Tana currently via a push API.tana-helper
is mostly intended to be a local service these days, you need to expose your Tana helper service via something like ngrok for this to work from the outside world. Be careful: thereâs currently no security on tana-helper (yet â Iâm working on it).tana-helper
service? Using something like ngrok you can open a tunnel back to your local machine, exposing only the tana-helper port 8000.tana-helper
will not be able to insert anything into Tana.