BRIKK

Documentation

Everything you need to build, test and understand Brikk programs.

Getting started

  1. Open the Studio (or load a template).
  2. Drag an Event brick onto the baseplate — every program starts with one.
  3. Snap action, logic and agent bricks below it. Drop value bricks into the round/hexagonal sockets.
  4. Press Validate, then Test Run, or send custom events from the Test environment panel.
  5. Read the execution receipt, then manage the program from the Agent Monitor.

Using the editor

  • Add: drag from the toolbox, or tap/press Enter on a toolbox brick to drop it in the middle of the view.
  • Connect: drag a brick near a connection point — a glowing line (stacks) or glowing socket (values) previews the snap. Incompatible connections never snap.
  • Move groups: dragging a brick takes everything below it. Hold Alt to pull out only that brick (the stack heals). Shift-click or Shift-drag to multi-select; dragging a selected stack moves all selected stacks.
  • Delete: drag onto the toolbox, press Delete, or use the inspector.
  • Navigate: drag the baseplate or scroll to pan, Ctrl/⌘ + scroll or toolbar buttons to zoom, click the minimap to jump.
  • History: Ctrl/⌘ Z / Ctrl/⌘ Shift Z. Projects autosave; the toolbar shows whether they are local drafts or cloud saved.
  • Reuse: “Save as block” in the inspector stores a stack as a custom block in your toolbox.

Brick shapes

when I press run

Event (hat): a smooth domed top — nothing can attach above. Starts the program.

post{token} is moving!to feed

Statement: studs on top, sockets underneath. Stacks in order.

if
empty

C-brick: wraps a nested stack. If/else has two mouths.

stop program

Cap: flat bottom, nothing can attach below.

00

Boolean value: hexagonal, fits boolean sockets.

11

Value: rounded, fits number/text/any sockets.

Execution engine

The interpreter validates the program, finds every enabled event brick that matches the incoming event, then walks each stack top to bottom. Sockets are evaluated just in time; if picks a branch and marks the other as skipped; repeat is bounded to 100 iterations; wait is capped at 10s. Errors stop the stack and are attributed to the brick that raised them.

Protections: a step budget (default 2,000, configurable), a wall-clock timeout (default 30s), at most 400 bricks and 12 nesting levels, cancellation, and structural checks that reject circular or shared connections.

Every run produces a receipt: run id, program version and hash, trigger, executed and skipped bricks, outputs, decisions and outcome (success, failure, no-match, timeout, stopped, invalid).

AI Builder

Requests are converted into a JSON program spec. The spec may only reference bricks from the registry; unknown types, unknown fields, invalid options, type-mismatched sockets, misplaced bricks and oversized programs are rejected, both on the server and again in the browser. Only validated programs are rendered.

When an AI provider (Gemini, Groq or Anthropic) is set up on the server, an AI model generates the spec (with one automatic repair round if validation fails). If several are set, the next one is used automatically when one is busy or over its free limit. Without any, the builder runs in clearly labelled demo mode using a rule-based planner — no AI model is called.

Agents & monitor

Agent bricks create named agents within a run, give them a personality and instructions, let them use approved tools, store memory and record structured decisions. The Agent Monitor lists every project with an event brick, with pause/resume, enable/disable, manual triggers, counts and logs.

In the test environment agents run in your browser, and timer bricks only tick while the Monitor is open. When the cloud runner is configured, Deploy 24/7 runs an agent on the server schedule with timer, volume (live data only) and webhook triggers, even when the app is closed. When real chain events are set up on the server, buy and sell bricks also react to real trades within seconds and holder bricks to real holder counts (checked every 10 minutes). Name the coin by its token address or its symbol.

My coins and “ANY coin”

  • Coins you launch here join My coins automatically. You can add any other coin on Explore: open it and tap Add to My coins.
  • An event brick set to ANY watches all of your coins. Your 24/7 agents pick up a newly launched or added coin within a minute, with no redeploy.
  • To watch one coin only, put its token address in the brick instead of ANY.
  • Trending coins on Explore are just for browsing. Agents never watch them unless you add them to My coins.

Wallets, launches and safety

  • No seed phrases or private keys are ever requested or stored. Your wallet (Phantom or Solflare) signs inside its own window.
  • Every transaction follows one path: the server builds and simulates it → you review the details and confirm → your wallet signs → the server checks the signed transaction is byte-identical to what you reviewed, unexpired and unused → it is sent → success is shown only after on-chain confirmation.
  • Launch creates a Token-2022 token with on-chain name and symbol. After confirmation, the supply, decimals, authorities, metadata and your balance are read back from the chain before it says “launched”.
  • Agents can only propose SOL transfers (“Propose SOL transfer” brick), within your limit and the server limit. You review and sign them under Pending approvals.
  • The operator picks the network: devnet for free testing, or mainnet-beta, which uses real SOL and must be explicitly unlocked (SOLANA_ALLOW_MAINNET=true).
  • “Prepare transaction” buy/sell bricks are previews only: no swap provider is connected.
  • Market data is labelled DEMO DATA unless a live provider is configured. The cloud runner never acts on demo data.
  • Outbound webhooks are simulated unless WEBHOOK_LIVE=true and the host is on WEBHOOK_ALLOWLIST. AI keys are server-side only and sensitive routes are rate limited.

Project format

Projects export as versioned JSON (format: "brickflow.project", schemaVersion: 1) containing metadata, settings and a workspace of blocks (fields, input sockets, statement slots, next) plus root positions. Imports are checked for format, version and structural integrity and always receive a new id.

Brick reference (53 bricks)

Events— Starter bricks. Every program begins with one.

when a buy ≥0ofany of my coins
When a buy occursevent_buyhat

Starts when a buy at or above the minimum size (in USD or SOL) happens on the token.

Min size (number) · Unit (select) · Token (text)

when a sell ≥0ofany of my coins
When a sell occursevent_sellhat

Starts when a sell at or above the minimum size (in USD or SOL) happens.

Min size (number) · Unit (select) · Token (text)

whenany of my coinsvolume crosses $10000
When volume crossesevent_volumehat

Starts when 24h volume moves from below the threshold to at/above it.

Token (text) · Threshold (USD) (number)

whenany of my coinsreaches100holders
When holder milestoneevent_holdershat

Starts when the holder count reaches the milestone.

Token (text) · Milestone (number)

every60seconds
On a timerevent_timerhat

Starts on a repeating interval (test environment: while the Agent Monitor tab is open).

Interval (s) (number)

when I press run
On manual triggerevent_manualhat

Starts when you press Run / Test Run.

when webhookalertsarrives
On webhook eventevent_webhookhat

Starts when a webhook with this name is received (simulated in the test panel).

Webhook name (text)

Logic— Conditions, comparisons, loops and timing.

if
empty
Iflogic_ifc

Runs the inner bricks only when the condition is true.

Condition (socket: boolean)

if
empty
else
empty
If / elselogic_ifelsec

Runs one branch when true, the other when false.

Condition (socket: boolean)

00
Comparelogic_comparereporter → boolean

Compares two values.

Left (socket: any) · Operator (select) · Right (socket: any)

AND / ORlogic_and_orreporter → boolean

Combines two conditions.

Left (socket: boolean) · Operator (select) · Right (socket: boolean)

not
Notlogic_notreporter → boolean

Inverts a condition.

Value (socket: boolean)

repeat3times
empty
Repeatlogic_repeatc

Repeats the inner bricks a bounded number of times (max 100).

Times (socket: number)

wait1s
Waitlogic_waitstatement

Pauses the program (max 10 s; simulated instantly in Instant speed).

Seconds (socket: number)

pickgmorwagmi
Random choicelogic_randomreporter → any

Randomly picks one of two values.

Option A (socket: any) · Option B (socket: any)

program is enabled
Program is enabledlogic_enabledreporter → boolean

True when the program's Enabled switch is on (project settings).

stop program
Stoplogic_stopcap

Stops this stack. Nothing can attach below it.

Data— Numbers, text, lists, maths and variables.

10
Numberdata_numberreporter → number

A number value.

Value (number)

“gm”
Textdata_textreporter → text

A text value. {placeholders} are filled from the event.

Value (text)

True / falsedata_booleanreporter → boolean

A boolean value.

Value (select)

list [alpha, beta, gamma]
Listdata_listreporter → list

A comma-separated list of values.

Items (text)

length of 
Length ofdata_list_lengthreporter → number

Number of items in a list (or characters in text).

Value (socket: any)

11
Arithmeticdata_arithreporter → number

Adds, subtracts, multiplies or divides.

Left (socket: number) · Operator (select) · Right (socket: number)

joinHello builders
Join textdata_joinreporter → text

Joins two values into text.

First (socket: text) · Second (socket: text)

setcountto0
Set variabledata_set_varstatement

Stores a value in a variable for this run.

Variable (text) · Value (socket: any)

changecountby1
Change variabledata_change_varstatement

Adds a number to a variable.

Variable (text) · By (socket: number)

varcount
Variabledata_get_varreporter → any

Reads a variable.

Variable (text)

event
Event fielddata_event_fieldreporter → any

Reads a field from the event that started the program.

Field (select)

Agents— Create agents with personality, memory and tools.

create agentScoutas
Create agentagent_createstatement

Creates an agent for this run. Other agent bricks refer to it by name.

Agent (text) · Role (select)

Scoutfeels
Agent personalityagent_personalitystatement

Sets the agent's tone of voice.

Agent (text) · Personality (select)

ScoutfollowsKeep updates short and factual.
Agent instructionsagent_instructionsstatement

Gives the agent standing instructions.

Agent (text) · Instructions (socket: text)

Scoutrememberslast_event={token}
Store memoryagent_rememberstatement

Saves a value to the agent's memory (persists across runs for this project).

Agent (text) · Key (text) · Value (socket: any)

Scoutrecallslast_event
Read memoryagent_recallreporter → any

Reads a value from the agent's memory.

Agent (text) · Key (text)

Scoutuses
Use approved toolagent_toolstatement

Agent runs one tool from the approved list. Result is stored in the variable `tool_result`.

Agent (text) · Tool (select)

Scoutsummarizes
Generate summaryagent_summaryreporter → text

Agent writes a summary of the event/memory in its personality (local template engine, or AI provider when configured).

Agent (text) · Topic (select)

Scoutdecidesbecauseconditions met
Return decisionagent_decisionstatement

Agent records a structured decision (shown on the execution receipt).

Agent (text) · Decision (select) · Reason (socket: text)

Crypto— Token data, trades, thresholds and approvals.

$BRIK
Token infocrypto_token_inforeporter → anyprovider / demo

Reads a token field from the configured market provider (DEMO DATA when none is configured).

Token (text) · Field (select)

trade
Trade infocrypto_trade_inforeporter → any

Reads the simulated trade that triggered the program.

Field (select)

volume above $10000
Volume abovecrypto_volume_checkreporter → boolean

True when event volume (or provider 24h volume) is above the threshold.

Threshold (USD) (socket: number)

holders ≥100
Holders at leastcrypto_holder_checkreporter → boolean

True when the event's holder count is at least the milestone.

Milestone (socket: number)

% change1→1.2
Price change %crypto_price_changereporter → number

Percentage change between two supplied prices.

From (socket: number) · To (socket: number)

preparealert{token} moved: {volume}
Prepare alertcrypto_alertstatement

Prepares an alert (appears in the activity feed with its severity).

Level (select) · Message (socket: text)

prepareof $25$BRIKfor approval
Prepare transactioncrypto_prepare_txstatement

Prepares a transaction PREVIEW that requires explicit human approval. Never signs or sends anything.

Action (select) · Amount (USD) (socket: number) · Token (text)

propose sending0.01SOL to 
Propose SOL transfercrypto_prepare_transferstatement

Proposes a real SOL transfer for a person to review and sign in the Agent Monitor. The agent cannot sign; limits apply.

Amount (SOL) (socket: number) · Recipient address (text)

reward top5holders ofany of my coinswith0.05SOL
Reward top holderscrypto_reward_holdersstatement

Proposes sharing SOL between a coin's biggest holders (real wallets only; pools and programs are skipped). You review the list and sign once in the Agent Monitor. The agent cannot sign; limits apply.

Holders (socket: number) · Coin (text) · Total (SOL) (socket: number)

Actions— Feed posts, notifications, webhooks and results.

post{token} is moving!to feed
Add to activity feedaction_feedstatement

Posts a message to the activity feed.

Message (socket: text)

message🚀 ${token} volume just hit {volume}!
Format messageaction_formatreporter → text

Generates a message from a template. Use {token}, {volume}, {amount}, {sol}, {holders}, {price}, {wallet} or variable names.

Template (text)

notifyHeads up:{token} event received
Send notificationaction_notifystatement

Sends a simulated notification (shown in-app; no external delivery).

Title (text) · Message (socket: text)

AI writesa one-line update about {token}
AI textaction_ai_textreporter → textprovider / demo

Generates text with the configured AI provider (server-side). In demo mode uses a labelled local template.

Prompt (socket: text)

call API
Call approved APIaction_apistatement

Calls one endpoint from the approved list. Result stored in the variable `api_result`.

API (select)

send webhook tohttps://example.com/hookwith{token} event
Send webhookaction_webhookstatement

Sends a webhook. Simulated unless live webhooks are enabled and the host is on the server allowlist.

URL (text) · Payload (socket: text)

create taskReview {token} activity
Create taskaction_taskstatement

Creates a task in the task list.

Title (socket: text)

recordhandled {type} on {token}
Record resultaction_recordstatement

Records the execution result on the receipt.

Outcome (select) · Note (socket: text)