Skip to content

find_path

Find how two concepts connect. The shortest chain of links joining two concepts of one tree, following links either way (at most 6 links), each step saying which way its link points. For questions like “how does A relate to B?”. Read-only.

Parameter Type Required Description
from string Yes Concept ID, its tree first: company:product/okforest-product-brief. In a Forest of one tree, the tree may be left out.
to string Yes The other concept’s ID, in the same tree as from.

One JSON object (see All tools):

Field Type Always Description
tree Tree reference Yes The tree they’re in, and the commit it was read at.
connected boolean Yes Whether a chain of at most 6 links joins them.
steps list of Path step Yes The concepts from from to to, both included; empty when they aren’t joined.

Asked “How is Acme Corp connected to Rival Co?”, an assistant might call find_path with:

Arguments
{
"from": "company:customers/acme-corp",
"to": "company:competitors/rival-co"
}

On OKForest’s test Forest (Acme’s made-up company knowledge), it returns:

Result
{
"tree": {
"slug": "company",
"repo": "acme/acme-okf",
"commit": "abc1234abc1234abc1234abc1234abc1234abc12",
"url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/"
},
"connected": true,
"steps": [
{
"id": "company:customers/acme-corp",
"title": "Acme Corp",
"tree": "company",
"url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/customers/acme-corp"
},
{
"id": "company:competitors/rival-co",
"title": "Rival Co",
"tree": "company",
"url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/competitors/rival-co",
"link": "from previous"
}
]
}