Open the app
Architecture

Data layers & boundaries

The four storage layers — Convex, SQLite, Parquet/DuckDB and Redis — the rule that decides which is which, and the retention policy per data type.

Clawlas runs four data layers on purpose. Conflating them is the easy mistake; keeping them separate is what makes the dashboard honest, the agents fast, the analytics scalable and the events disposable.

The four layers

LayerResponsibility
ConvexCurrent operational state — everything the dashboard reads reactively.
SQLiteThe agents' persistent knowledge and memory, local to the runtime.
Parquet / DuckDBHistorical and analytical data — high-volume market history, backtesting datasets.
Redis / Valkey StreamsTemporary event transport between services. Never a system of record.
Where does this datum live?
Read reactively by the dashboard → Convex. The agents’ private cognition → SQLite. High-volume history & analytics → Parquet/DuckDB. In-flight coordination → Redis/Valkey. The same raw data is not duplicated across all four.

The split in practice

DataSource of truthWhy
Opportunities, positions, orders, approvalsConvexOperational truth, read live by the UI
Agent reports & trade journalConvexThe dashboard must display them live
Long-term lessons & decisionsSQLitePrivate agent cognition, high frequency
Raw market trades, order books, on-chain historyParquetToo voluminous for Convex
Backtesting datasets & analytical queriesDuckDBFast scans over Parquet
In-flight events (market, research, execution)Redis / ValkeyEphemeral transport
SecretsDocker secrets / encrypted filesNever in Convex, SQLite or prompts

Retention policy

Hot stores stay small and fast; volume ages into the lake or compresses into summaries. Nothing high-frequency lives in Convex, and nothing is kept raw forever just because it might be queried later.

Data typeHot retentionLong-term form
Raw social posts7–30 daysDeduplicated summary / compressed archive
Raw high-frequency trades1–7 days (selected assets)Aggregated bars / Parquet
Order-book snapshotsHours–daysFeatures & selected event windows
OHLCVLong termParquet / DuckDB
Decisions & trade logsPermanentConvex + backup
LLM prompts / responsesConfigurable, privacy-awareStructured summaries & hashes
API usage logs12–24 monthsDaily / monthly aggregates
System logs7–30 days locallyImportant incidents archived

The kill switch crosses the boundary: a flag the web raises in Convex, read by the Python core on its next loop. One store the UI controls, one process that obeys.