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);
function onSendMessage(input, fromNode) {
const userNode = engine.addNode(input, 'user', {
parentIds: fromNode?.id ? [fromNode.id] : []
});
const assistantNode = engine.addNode('', 'assistant', {
autofocus: true
});
}
<TraekCanvas {engine} {onSendMessage} />
</script>