wrenchData Model

The data model in Prax is structured around flows, nodes, and executions.

Primary Entities

Entity
Description

Flow

Represents a complete workflow consisting of multiple nodes

Node

An individual step within a flow; has config, input, and output

Execution

A single run of a flow (with start time, status, duration, logs)

User

(If auth enabled) Represents a person using the system

Session

(Optional) Used for memory or state preservation across calls

Flow Structure (JSON)

A flow is stored in JSON like this:

jsonCopyEdit{
  "id": "flow-abc",
  "name": "Simple LLM Chain",
  "nodes": [
    {
      "id": "node-input",
      "type": "input",
      "data": {},
      "position": { "x": 100, "y": 200 }
    },
    {
      "id": "node-llm",
      "type": "chat-model",
      "data": {
        "model": "gpt-4",
        "prompt": "{{input}}"
      },
      "position": { "x": 300, "y": 200 }
    }
  ],
  "edges": [
    { "source": "node-input", "target": "node-llm" }
  ]
}

This structure is persisted in the database and hydrated into the flow editor on load.

Database Schema (Simplified)

Last updated