Skip to content

Repository files navigation

Tidepool

A local-first, visual workflow editor for composing and executing agentic pipelines directly on your machine. Build AI-powered workflows by connecting nodes on a canvas, then execute them in isolated Docker sandboxes — no cloud dependencies required.

Architecture

Tidepool has two layers:

Layer Technology Purpose
Editor Svelte 5 (runes mode) + SvelteKit + SvelteFlow Visual canvas for composing workflow graphs
Engine Sandcastle (@ai-hero/sandcastle) + Docker Sandboxed local agent execution

Workflows are directed graphs of typed nodes. The canvas is the source of truth; serialized formats (JSON, YAML) are derived from the graph. Every pipeline execution runs in an ephemeral Docker container — no process escapes the sandbox.

Tech Stack

Concern Package
Framework @sveltejs/kit, svelte 5, vite
Adapter @sveltejs/adapter-node
Flow Editor @xyflow/svelte (SvelteFlow)
Engine @ai-hero/sandcastle
UI @skeletonlabs/skeleton + @skeletonlabs/skeleton-svelte
Styling tailwindcss v4
Language TypeScript (strict: true)
Testing Vitest (unit + component), Playwright (E2E)
Linting ESLint + Prettier

Prerequisites

Getting Started

npm install
npm run dev -- --open

The dev server starts at http://localhost:5173.

Scripts

Command Description
npm run dev Start development server
npm run build Production build (outputs to build/)
npm run preview Preview production build locally
npm run check TypeScript type-check
npm run lint Run Prettier + ESLint
npm run format Auto-format with Prettier
npm run test:unit Run Vitest unit & component tests
npm run test:e2e Run Playwright end-to-end tests
npm run test Run unit tests then E2E tests

Project Structure

tidepool/
├── src/
│   ├── app.html                 # HTML page template
│   ├── app.css                  # Tailwind + global styles
│   ├── lib/                     # Shared library ($lib)
│   │   ├── components/          # Svelte components
│   │   └── server/              # Server-only code ($lib/server)
│   │       └── sandcastle.ts    # Sandcastle engine wrapper (planned)
│   └── routes/                  # SvelteKit routes
│       ├── +layout.svelte       # Root layout
│       └── +page.svelte         # Landing page / workflow editor
├── tests/                       # Playwright E2E tests
├── svelte.config.js             # SvelteKit configuration
├── vite.config.ts               # Vite configuration
├── tsconfig.json                # TypeScript (strict mode)
├── eslint.config.js             # ESLint configuration
└── .prettierrc                  # Prettier configuration

Core Principles

  1. Local-First — All execution happens on your machine. The UI and engine function offline. Remote integrations are opt-in.
  2. Visual Composition — Workflows are built on a SvelteFlow canvas, not by writing scripts.
  3. Containerized Isolation — Every agent runs in a Docker container via Sandcastle. No process escapes.
  4. Git-Backed Traceability — Workflow definitions are versioned in Git. Every run records the commit SHA for point-in-time reproducibility.
  5. Type-Safe — TypeScript strict mode. Every node type, connection, and serialization format has explicit types.

See .specify/memory/constitution.md for the full constitution.

Usage Example (Sandcastle Engine)

The Sandcastle engine is server-only code. Import it from SvelteKit server modules only:

// $lib/server/sandcastle.ts — NEVER import on the client
import { run, claudeCode } from "@ai-hero/sandcastle";
import { docker } from "@ai-hero/sandcastle/sandboxes/docker";

await run({
  agent: claudeCode("claude-opus-4-6"),
  sandbox: docker(),
  prompt: "Fix the TypeScript errors in src/lib/nodes.ts",
  maxIterations: 3,
});

License

MIT

About

Sculpt complex AI workflows in a local-first sandbox. Tidepool brings a visual SvelteFlow interface to the Sandcastle execution engine, allowing developers to build isolated, agentic pipelines with full Git traceability and zero-config Docker containment.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages