spatial conversation engine

træk — follow ideas, not threads.

Every answer opens more questions. Give them space.

What if you'd asked it differently?
See where the thinking went.
Watch ideas grow in real time.
see it branch

Something always gets lost in the scroll.

A good idea came up three replies ago. You scrolled past it. Two paths split. You had to choose. That's not a conversation — that's a log.

The more complex the thinking, the worse a single thread represents it.

If AI thinking branches, your UI shouldn’t stay flat.

possible paths

Not an edge case. Not an afterthought.
Branching is the default.

A map, not a log.

Every message is a place. Every reply, a direction. Pan the canvas. Follow a thread. Branch into the question you almost didn't ask.

  • Branch anywhere — reply from any node; each path stays intact.
  • Spatial layout — ideas spread out instead of stacking up.
  • Thought nodes — reasoning stays visible without cluttering the path.
  • Live streaming — watch tokens land in place as the model thinks.
Two components. That's it.
npm install traek
<script lang="ts">
  import {
    TraekCanvas,
    TraekEngine,
    DEFAULT_TRACK_ENGINE_CONFIG
  } from 'traek';

  const engine = new TraekEngine(DEFAULT_TRACK_ENGINE_CONFIG);

  // Canvas calls this with the text the user typed
  // and the node they're replying from (for branching).
  function onSendMessage(input, fromNode) {
    const userNode = engine.addNode(input, 'user', {
      parentIds: fromNode?.id ? [fromNode.id] : []
    });

    const assistantNode = engine.addNode('', 'assistant', {
      // Parent defaults to the active node (the new user message),
      // so replies naturally branch from the message you answered.
      autofocus: true
    });

    // stream chunks into assistantNode.content here...
  }

  <TraekCanvas {engine} {onSendMessage} />
</script>

Two layers. Your rules.

træk keeps the graph and the UI separate — so you stay in control:

  • TraekEngine — nodes, relationships, layout, and state.
  • TraekCanvas — the spatial UI, pan/zoom, and interaction.

Bring your model, your streaming, your persistence. træk keeps everything navigable.

Made for when AI thinks out loud.

  • agents with memory
  • prompts worth exploring
  • reasoning that branches
  • multi-path generation

Start in minutes.

Use TraekCanvas as your full UI — or wire TraekEngine into your own components and render messages your way.

Ideas deserve more space than a scroll.

træk is actively growing. Drop it in, explore the demos, and help shape what spatial AI conversation can be.