From Idea to Image: A Practical Midjourney Prompting Guide

From Idea to Image: A Practical Midjourney Prompting Guide

Estimated reading time: 12~15 minutes

Primary keyword: Midjourney prompt guide

A strong Midjourney prompt is not a magic sentence full of dramatic adjectives. It is a compact creative brief.

Good prompts tell Midjourney what the image should contain, how it should feel, how it should be composed, and which constraints matter. Beginners need clarity. Advanced users need control over references, parameters, style, variation, and repeatability.

This guide gives you a practical workflow you can reuse for blog images, campaign visuals, concept art, training graphics, and professional design drafts.

Note: Midjourney features change frequently. This article is written to be self-contained, so you do not need to leave the blog post just to understand the main prompting controls. Also, https://example.com is a demo reference only. There will be no real image.

1. Think Like a Creative Director, Not a Keyword Collector

Many beginners write prompts like this:

futuristic city, cyberpunk, cinematic, ultra realistic, 8k, beautiful, detailed

That can produce something attractive, but it gives Midjourney too much freedom. It does not clearly define the subject, composition, lighting, or purpose.

A better prompt is more intentional:

A rainy nighttime street in a dense Asian megacity, low camera angle, neon shop signs reflected on wet pavement, one delivery rider waiting at a crosswalk, cinematic realism, soft atmospheric haze, natural human proportions –ar 16:9 –raw

This works better because it defines:

  • Subject: delivery rider
  • Setting: rainy megacity street
  • Composition: low camera angle
  • Lighting and mood: neon reflections, atmospheric haze
  • Output control: widescreen aspect ratio and Raw mode

Midjourney parameters should be placed at the end of the prompt, after the descriptive text. Use a space before the first parameter, use double hyphens, and do not add commas or punctuation inside the parameter syntax.

Midjourney Parameter List

Parameter Also written as What it controls Practical example
Aspect Ratio --ar, --aspect Shape of the image --ar 16:9
Chaos / Variety --c, --chaos How different the four initial results can be --c 25
Omni Reference --oref Carries a subject, object, character, vehicle, or creature into V7 generations --oref [image-url]
Omni Reference Weight --ow Strength of the Omni Reference --ow 100
No --no Excludes unwanted elements --no robot, glowing brain
Personalization --p, --profile Applies a personalization profile or moodboard style --p [profile-code]
Quality --q, --quality GPU time/detail for the initial image set where supported --q 2
Repeat --r, --repeat Generates multiple image sets from one prompt --r 3
Seed --seed Reuses a seed for testing consistency --seed 12345
Raw Mode --raw Reduces Midjourney’s default automatic styling --raw
Stylize --s, --stylize Controls how literal or artistic the result should be --s 100
Style Reference --sref Applies a visual style from images or style codes --sref [image-url]
Style Weight --sw Strength of the style reference --sw 150
Style Reference Version --sv Selects style-reference behavior/version where supported --sv 6
Tile --tile Creates seamless repeating patterns --tile
Version --v, --version Selects a Midjourney model version --v 7
Weird --w, --weird Adds unusual, quirky, or unconventional behavior --w 50
Image Weight --iw Strength of an image prompt --iw 1.25
Fast Mode --fast Uses Fast GPU mode --fast
Relax Mode --relax Uses Relax mode where available --relax
Turbo Mode --turbo Uses faster, higher-cost generation where available --turbo
Draft Mode --draft Creates lower-cost draft images in V7 --draft
Niji --niji Uses the anime/Eastern illustration model family --niji 7
Public / Stealth --public, --stealth Controls visibility where supported by your plan/settings --stealth
HD / SD --hd, --sd Selects HD or standard-definition generation in supported V8.1 workflows --hd

2. The Beginner Formula

Use this structure:

Subject + Context + Action + Visual Direction + Output Control

Example

A cloud security operations center at night, analysts monitoring dashboards, large wall screens showing network traffic, realistic enterprise office environment, calm blue lighting, documentary photography style –ar 16:9 –raw

Why this is stronger:

  • The subject is specific.
  • The setting is believable.
  • The scene has an action.
  • The style is clear without being overloaded.
  • --ar 16:9 makes it suitable for a blog hero image, slide, or LinkedIn banner.
  • --raw reduces Midjourney’s automatic styling and gives you more direct prompt control.

What Raw mode means: Raw mode turns down Midjourney’s automatic styling so simple prompts look more realistic and detailed prompts give stronger control over the final look.

3. Use the Right Reference Type

Midjourney has several ways to use images as guidance. The most common mistake is using the wrong reference type for the job.

Image Prompt: Use It for Composition, Color, and General Direction

An image prompt uses an uploaded or linked image as inspiration for composition, content, color, or visual direction. It is not a precision photo editor.

Use it when you want a similar layout, camera angle, atmosphere, or general visual structure.

Prompt example:

[image URL] Professional enterprise AI governance briefing room, executives reviewing responsible AI dashboard, clean modern office, realistic lighting, calm corporate tone –ar 16:9 –raw –iw 1.25

Use --iw when you want to adjust how strongly the image prompt influences the result.

Style Reference: Use It for Look and Feel

Style Reference applies the visual vibe of another image, such as color palette, medium, texture, lighting, and overall visual language. It is not meant to copy a specific person, product, object, or mascot.

Use it for consistent blog headers, campaign visuals, training posters, or branded creative sets.

Possible Style Reference Values

Style reference value What it does Example
--sref [image-url] Uses one image as the style source --sref https://example.com/editorial-lighting.jpg
--sref [image-url-1] [image-url-2] Blends style influence from multiple images --sref https://example.com/minimal-poster.jpg https://example.com/soft-office-photo.jpg
--sref random Applies a random style code. After generation, the random value becomes a specific code you can reuse. --sref random
--sref 123456 Uses a specific internal style code --sref 123456
--sref 123456 987654 Mixes multiple style codes --sref 123456 987654
--sw 0 Almost no style-reference influence --sref 123456 --sw 0
--sw 100 Default style-reference strength --sref 123456 --sw 100
--sw 300 Stronger style influence --sref 123456 --sw 300
--sw 1000 Maximum style influence; useful for experiments but can overpower the prompt --sref 123456 --sw 1000
--sv 4 Uses older style-reference behavior where supported --sref 123456 --sv 4
--sv 6 Uses newer style-reference behavior where supported --sref 123456 --sv 6

Style Reference example using a different image source:

A security analyst explaining phishing risk to office employees, friendly professional workplace scene, modern training poster composition –sref https://example.com/clean-corporate-poster-style.jpg –sw 150 –ar 4:5

Style Reference example using a style code instead of an image:

A cloud security architect presenting a zero trust roadmap, clean enterprise editorial composition, calm executive tone –sref 482913 –sw 120 –ar 16:9 –raw

Practical guidance:

  • Use low --sw values when the prompt details matter more than the visual style.
  • Use medium values around --sw 100 to --sw 200 for consistent blog or campaign visuals.
  • Use high values only when the style is more important than strict subject accuracy.
  • Keep the text prompt simple when using a strong style reference. Too many style words can fight the reference.

Omni Reference: Use It for a Recurring Subject

Omni Reference is designed to carry a specific person, character, object, vehicle, or creature into new generations. In current Midjourney behavior, Omni Reference is a Version 7 feature and replaces Character Reference for V7 workflows.

Use it when identity matters more than style.

Possible Omni Reference Values

Omni value What it means When to use it Example
--oref [image-url] Uses one image as the Omni Reference When you need a recurring mascot, character, product, object, vehicle, or creature --oref https://example.com/security-mascot.png
--ow 1 Very light Omni influence When you want only a faint connection to the reference --ow 1
--ow 50 Light influence When you want the scene to change heavily while keeping some recognizable traits --ow 50
--ow 100 Default influence Good starting point for most recurring-subject workflows --ow 100
--ow 200 Stronger subject preservation Useful when the subject starts drifting --ow 200
--ow 300 Very strong influence Useful for consistent objects or mascots, but may reduce scene flexibility --ow 300
--ow 400+ Heavy influence Use carefully; high values can make results less predictable --ow 400
--ow 1000 Maximum influence Experimental; usually too strong for normal production prompts --ow 1000

Omni Reference example with different Omni values:

A friendly cybersecurity robot mascot helping an employee identify a suspicious email, bright office environment, educational poster style, clear visual storytelling –v 7 –oref https://example.com/blue-security-robot.png –ow 50 –ar 4:5

A friendly cybersecurity robot mascot helping an employee identify a suspicious email, bright office environment, educational poster style, clear visual storytelling –v 7 –oref https://example.com/blue-security-robot.png –ow 100 –ar 4:5

A friendly cybersecurity robot mascot helping an employee identify a suspicious email, bright office environment, educational poster style, clear visual storytelling –v 7 –oref https://example.com/blue-security-robot.png –ow 300 –ar 4:5

How to read the result:

  • --ow 50 gives Midjourney more freedom to redesign the mascot for the new scene.
  • --ow 100 is the normal starting point.
  • --ow 300 holds the subject more strongly but may make poses, clothing, or composition less flexible.

Operational note: Omni Reference needs a text prompt. Do not rely on the reference image alone. Describe the new scene, action, setting, and style clearly.

4. Current Version Awareness Matters

Midjourney versions behave differently, and not every feature works the same way across every version.

Practical guidance:

  • Use V8.1 when you want faster, more prompt-adherent image generation and HD image support.
  • Use V7 when your workflow depends on Omni Reference.
  • Use Raw mode when you want less automatic styling.
  • Use Niji when you want anime or Eastern illustration aesthetics.
  • Use V6.1 or earlier supported workflows when you need classic multi-prompts and prompt weights.

Version examples:

A realistic cloud architecture review meeting, executives and engineers reviewing a clean network diagram, natural lighting, professional editorial photography –v 8.1 –raw –ar 16:9

A recurring cybersecurity mascot presenting password hygiene tips, clean educational poster, friendly office scene –v 7 –oref https://example.com/security-mascot.png –ow 100 –ar 4:5

enterprise cloud security operations center::2 abstract cyber threat visualization::0.8 dramatic movie poster style::0.5 –v 6.1 –ar 16:9 –raw

5. Prompt Examples by Skill Level

Beginner: Blog Hero Image

A professional cybersecurity team reviewing a cloud security dashboard in a modern operations room, realistic office environment, focused but calm atmosphere, cinematic documentary photography –ar 16:9 –raw

Good for blog banners, LinkedIn articles, and presentation covers.

Intermediate: More Control Over Mood and Composition

A senior cloud security architect presenting a zero trust architecture diagram to an executive team, glass meeting room, large screen with abstract network zones, balanced composition, realistic enterprise setting, natural lighting, professional editorial photography –ar 16:9 –raw –s 100

The --s or --stylize parameter controls how much artistic interpretation Midjourney applies. The default value for stylize is 100, and you can adjust it anywhere between 0 and 1000 with the current model versions.

Lower values make the image more literal and prompt-adherent. Higher values give Midjourney more creative freedom, which can improve visual richness but may drift from exact details.

Stylize Support by Version

Version / model family Stylize support Practical guidance
V8.1 Supports --s / --stylize from 0 to 1000 Good for prompt-adherent images. Use --s 50 to --s 150 for professional realism.
V7 Supports --s / --stylize from 0 to 1000 Good default for current creative workflows. Use with Omni Reference carefully because high stylize can compete with subject preservation.
V6 / V6.1 Supports --s / --stylize from 0 to 1000 Useful when you need multi-prompts and weights.
Niji 7 Supports stylization behavior, but with anime/Eastern illustration aesthetics Use for illustration, anime, manga, game-art, and stylized character work.
Older legacy models Many support stylize, but behavior may differ Avoid relying on legacy behavior unless you are intentionally recreating an older look.

Stylize Examples

More literal / controlled:

Enterprise cloud security dashboard review, realistic office meeting, clean screen composition, natural lighting –ar 16:9 –raw –s 25

Balanced default:

Enterprise cloud security dashboard review, realistic office meeting, clean screen composition, natural lighting –ar 16:9 –raw –s 100

More artistic:

Enterprise cloud security dashboard review, cinematic boardroom lighting, refined editorial composition, subtle abstract data-flow atmosphere –ar 16:9 –raw –s 500

Highly stylized / experimental:

Enterprise cloud security dashboard review, dramatic visual metaphor, elegant abstract cyber risk atmosphere, premium campaign artwork –ar 16:9 –s 1000

For professional blog imagery, start around --s 50 to --s 150. Increase only when the output feels too plain.

Advanced: Weighted Creative Control

Midjourney supports multi-prompts and weights using :: in supported model versions. This lets you separate concepts and control relative importance.

Important compatibility note: classic multi-prompts and prompt weights are useful in V6.1 and earlier supported workflows. Do not assume the same behavior in V7 or V8.1.

How Multi-Prompts Work

A normal phrase keeps the words together:

space ship

Midjourney treats that as one combined idea: a spaceship.

A multi-prompt separates the ideas:

space:: ship

Now Midjourney can treat “space” and “ship” separately. That may produce a more unusual result, such as a ship in outer space or a boat-like object with space elements.

How Weights Work

After a section divider, add a number to tell Midjourney how important that section is.

Weight pattern Meaning Example
No weight Defaults to 1 security operations center:: abstract cyber threat visualization
Higher positive weight Makes that concept stronger security operations center::2 abstract threat visualization::1
Decimal weight Fine-tunes influence security operations center::1.5 abstract threat visualization::0.7
Negative weight Reduces or suppresses a concept cluttered screens::-0.5
Invalid total The total weight must stay positive still life:: fruit::-2 is not valid if the total becomes negative

Detailed Example 1: Blog Hero With Controlled Visual Metaphor

enterprise cloud security operations center::2 abstract cyber threat visualization::0.8 dramatic movie poster style::0.5 cluttered screens::-0.5 –v 6.1 –ar 16:9 –raw

What this does:

  • enterprise cloud security operations center::2 makes the SOC scene the primary concept.
  • abstract cyber threat visualization::0.8 adds a secondary visual layer without overpowering the scene.
  • dramatic movie poster style::0.5 adds some cinematic energy but keeps it controlled.
  • cluttered screens::-0.5 reduces messy screens.
  • --v 6.1 keeps the example in a version where classic multi-prompt behavior is expected.

Detailed Example 2: Reducing an Unwanted Concept

modern phishing awareness training poster::1.5 friendly office employee reporting suspicious email::1.2 hacker hoodie::-0.7 scary dark web background::-0.6 –v 6.1 –ar 4:5 –raw

What this does:

  • Keeps the training poster and employee behavior central.
  • Reduces cliché “hacker hoodie” imagery.
  • Reduces dark, unrealistic backgrounds.
  • Keeps the output more appropriate for enterprise awareness content.

Detailed Example 3: Balancing Product, Scene, and Style

secure cloud access gateway appliance::1.6 enterprise network operations room::1 professional product marketing photography::0.9 exaggerated sci-fi interface::-0.5 –v 6.1 –ar 16:9 –s 100

What this does:

  • Prioritizes the product/object.
  • Keeps the enterprise setting visible.
  • Adds a marketing photography look.
  • Suppresses unrealistic sci-fi UI.

Multi-Prompt Practical Rules

  1. Use :: only where you genuinely want to separate concepts.
  2. Keep the total prompt weight positive.
  3. Put all parameters at the end.
  4. Use decimals for fine control in supported versions.
  5. Use negative weights sparingly. If you only want to remove simple items, --no is easier.
  6. Do not stack too many weighted concepts. Four to five sections are usually enough.
  7. Test one change at a time so you know which weight improved or damaged the result.

6. Image Generation Parameters With Examples

The table below gives a practical view of the main image-generation parameters you are likely to use. Some parameters are version-specific, so validate important workflows before using them in production content creation.

Parameter Use it for Example Production advice
--ar / --aspect Set image shape --ar 16:9 Decide this before prompting. It strongly affects composition.
--v / --version Choose Midjourney model version --v 8.1 or --v 7 Use only when you intentionally need a specific model behavior.
--raw Reduce automatic styling --raw Good for realistic business, editorial, and product-like images.
--s / --stylize Control artistic interpretation --s 100 Start at 100, lower for accuracy, raise for creative visuals.
--c / --chaos Increase variation between results --c 25 Useful during exploration; reduce when you need consistency.
--w / --weird Add unusual or unconventional results --w 50 Good for ideation, not always good for professional blog images.
--q / --quality Spend more GPU time on initial image generation where supported --q 2 Use when the model/version supports it and the detail gain is worth the cost.
--seed Reuse a seed for testing consistency --seed 12345 Helpful for controlled prompt testing.
--no Exclude unwanted elements --no robot, glowing brain Better than negative weights for simple exclusions.
--iw Control image prompt strength --iw 1.25 Increase only when the image prompt is not influencing enough.
--sref Apply style from image or style code --sref [image-url] Use for consistent visual language across a content series.
--sw Control style reference strength --sw 150 High values can overpower subject accuracy.
--sv Select style reference behavior/version where supported --sv 6 Useful when recreating a known style-reference workflow.
--oref Apply Omni Reference for a recurring subject --oref [image-url] V7 workflow for recurring subjects.
--ow Control Omni Reference strength --ow 100 Start at 100; avoid very high values unless needed.
--profile / --p Use personalization profile or moodboard --p [profile-code] Good for brand-like consistency if the profile is curated.
--tile Create seamless repeating patterns --tile Best for textures, wallpapers, and pattern design.
--repeat / --r Generate multiple image sets --r 3 Useful for exploration; costs more because it runs multiple jobs.
--fast Use Fast mode --fast Good for time-sensitive work.
--relax Use Relax mode where available --relax Good when speed is less important.
--turbo Use faster, higher-cost generation where available --turbo Use when turnaround matters more than cost.
--draft Generate lower-cost draft images in V7 --draft Good for early ideation.
--niji Use Niji anime/illustration model --niji 7 Best for anime and Eastern illustration aesthetics.
--public / --stealth Control visibility where supported --stealth Consider confidentiality before uploading references or generating client-sensitive ideas.
--hd / --sd Use HD or standard definition in supported V8.1 workflows --hd Use HD for final-quality output where cost is acceptable.

Parameter Combination Example

Executive leadership team reviewing AI risk governance metrics, modern enterprise boardroom, realistic professional environment, subtle visual metaphor of connected data flows, no sci-fi exaggeration, clean composition –v 8.1 –ar 16:9 –raw –s 80 –no robot, glowing brain, hacker hoodie

Reference Combination Example

Office employee reporting a phishing email to the security team, friendly professional workplace scene, educational poster style, clear visual storytelling –v 7 –sref https://example.com/clean-training-poster-style.jpg –sw 150 –oref https://example.com/security-mascot.png –ow 100 –ar 4:5

Do not combine too many strong controls at once. High stylize, strong style reference, strong Omni Reference, and heavy negative prompting can compete with each other.

7. A Practical Midjourney Workflow

Do not try to get the perfect image in one prompt. Build it in stages.

Step 1: Write the creative brief

I need a blog hero image for an article about AI governance in enterprise cybersecurity. It should look professional, realistic, and suitable for executives.

Step 2: Create a clean base prompt

Enterprise AI governance review meeting, cybersecurity leader and compliance officer reviewing responsible AI risk dashboard, modern boardroom, realistic business photography, calm professional tone –ar 16:9 –raw

Step 3: Generate variations

Review the outputs for composition, realism, people, lighting, clarity, and brand suitability.

Step 4: Add reference control

Use:

  • Image Prompt for layout or visual inspiration
  • Style Reference for consistent look and feel
  • Omni Reference for a recurring person, character, object, or mascot

Step 5: Tighten the prompt

Remove vague filler words and add practical constraints.

Improved version:

Enterprise AI governance review meeting, cybersecurity leader and compliance officer reviewing a responsible AI risk dashboard, no exaggerated sci-fi elements, realistic boardroom, clean presentation screen, natural body language, professional editorial photography –ar 16:9 –raw –no robot, glowing brain, fantasy interface

8. Common Mistakes Beginners Make

Mistake 1: Too Many Competing Styles

Avoid prompts that ask for “minimalist, cyberpunk, watercolor, photorealistic, anime, cinematic, futuristic, vintage” all at once.

Pick one clear direction.

Mistake 2: Using Style Reference for Object Consistency

Style Reference controls the look and feel. It does not reliably preserve a specific person, mascot, product, or object. Use Omni Reference when the subject identity matters.

Mistake 3: Expecting Perfect Text in Images

AI image systems can struggle with exact readable text. For professional work, generate the image without critical text, then add final labels, titles, and brand copy in a design tool.

Mistake 4: Ignoring Aspect Ratio

Decide the destination before prompting:

  • Blog hero image: --ar 16:9
  • LinkedIn portrait post: --ar 4:5
  • Mobile story or wallpaper: --ar 9:16
  • Square social post: --ar 1:1

Mistake 5: Overusing “8K” and “Ultra Detailed”

These words do not replace clear direction. A prompt with a strong subject, setting, lighting, and composition usually performs better than a vague prompt decorated with quality adjectives.

9. Responsible Professional Use

Midjourney is useful for design exploration, campaign visuals, concept art, storytelling, and presentation imagery. In professional environments, generated images still need review.

Check for:

  • Misleading technical diagrams
  • Fake dashboards that look like real evidence
  • Unwanted logos or brand-like marks
  • Unrealistic workplace behavior
  • Bias in people, roles, or settings
  • Inaccurate security operations visuals
  • Privacy issues from uploaded reference images

For client or enterprise work, avoid uploading sensitive, confidential, or personally identifiable images unless your organization has approved the platform, terms, privacy posture, and usage process.

Prompt Quality Checklist

Before running a prompt, ask:

  1. Can a designer understand the image I want from the prompt alone?
  2. Is the main subject clear?
  3. Did I describe the setting and action?
  4. Did I specify style without overloading it?
  5. Did I choose the correct aspect ratio?
  6. Am I using the right reference type?
  7. Did I place parameters at the end?
  8. Did I remove vague filler words?
  9. Did I avoid asking Midjourney to perform exact editing?
  10. Would this image be appropriate in a professional publication?

Final Takeaway

Start simple. Add control gradually.

A practical learning path is:

Text prompt → aspect ratio → Raw mode → stylize → image prompt → style reference → Omni Reference → weights → seed/repeat testing

The goal is not to memorize every parameter. The goal is to communicate visual intent clearly.

The strongest Midjourney prompts do not sound complicated. They sound intentional.

Looking for a Founding Engineer / Technical Partner (AI Agent + Fintech Rails)

Hey DEV community,

I’m the founder of a startup, and I’m looking for a senior-level, full-stack technical lead to join the founding team and own our product architecture.

The Problem We’re Solving
We’re solving a massive capital-efficiency problem in an overlooked segment. I’ve worked in the industry for 15years.

What We’ve Built So Far
We aren’t a “vague AI idea.” We have:

  • 20% of our core product is built
  • Currently in an accelerator program with investor commitment
  • An active enterprise pilot pipeline with major logos
  • Actively raising $300K bridge round to fund our immediate launch roadmap.

The Tech Challenge (What You’ll Own)
We are building a Contract-to-Cash Vertical OS. Your primary playground will be completing core architecture and expanding our AI Deal Desk, moving away from static SaaS.

  • The Stack Goal: Building an intelligent AI that autonomously ingest/parse unstructured legal contracts, extract complex deliverables/payment schedules.

Who You Are

  • A senior full-stack developer who can take over the deployment pipeline.

  • Obsessed with clean data structures, LLM orchestration/parsing accuracy, and securing payment infrastructure.

  • Ready to step into a Founding Team / Technical Partner role.

The Deal
We are currently filling this as a Founding Equity role while we close the bridge round through the accelerator. Once the bridge closes, this triggers a competitive base salary, but the real upside is significant equity ownership in a company digitizing a massive, untouched transaction layer.

If you are tired of building generic CRUD apps and want to build autonomous financial infrastructure that will immediately hit enterprise users, let’s talk.

Drop a comment below, or DM me, with a link to your GitHub/Portfolio. MUST BE US or CANADA-based.

startup, #career, #showdev, and #ai.

What I learned reading other people’s code for 30 days straight

A month ago I set a rule for myself.

Every day, before writing any code of my own, I would
spend 30 minutes reading someone else’s code. Real code.
Production code from open source projects I actually use.

I expected to pick up some useful patterns. I didn’t
expect it to change how I write code as much as it did.

Why I started

I was reviewing something I’d written three months earlier
and I didn’t like what I saw. Not because it was broken —
it worked fine. But it was the kind of code that only the
person who wrote it can read comfortably.

Long functions. Inconsistent naming. Logic that required
reading the whole function to understand what any part
of it was doing.

I’d been writing code for long enough that I had habits.
The problem with habits is you don’t notice them. I
needed to see how people who write code professionally,
full time, on projects with thousands of users, approach
the same problems.

What I read

I focused on projects I was already familiar with as a
user so I had context for what the code was doing:

React source code — specifically the reconciler.
Not because I expected to understand all of it (I don’t)
but because the naming conventions and comment style are
exceptional.

Next.js — the router implementation. I use Next.js
every day so reading how routing actually works internally
was genuinely useful beyond the code quality lessons.

Zustand — the entire source is surprisingly small.
Reading it in full takes about 20 minutes and teaches
more about how React state works than most tutorials.

Radix UI — component accessibility implementation.
This one changed how I think about building UI components.

The first thing I noticed: function length

Every function I read in production open source code
was short. Not artificially short — not broken into
pieces that didn’t make sense on their own. But short
in the way that each function did exactly one thing
and was named precisely for that thing.

I counted lines in my own code after the first week.
My average function was 40-50 lines. The code I was
reading averaged around 10-15.

The difference wasn’t that they wrote less logic.
They extracted more. Every time a block of code inside
a function had a clear purpose, it became its own
function with a name that described that purpose.

Before reading:

const processOrder = async (order: Order) => {
  // validate
  if (!order.items || order.items.length === 0) {
    throw new Error('Order has no items')
  }
  if (!order.userId) {
    throw new Error('Order has no user')  
  }

  // calculate total
  let total = 0
  for (const item of order.items) {
    total += item.price * item.quantity
  }
  if (order.discountCode) {
    const discount = await getDiscount(order.discountCode)
    total = total * (1 - discount.percentage / 100)
  }

  // save to database
  const savedOrder = await db.orders.create({
    data: { ...order, total, status: 'pending' }
  })

  // send confirmation
  await sendEmail({
    to: order.userEmail,
    subject: 'Order confirmed',
    body: `Your order #${savedOrder.id} is confirmed`
  })

  return savedOrder
}

After:

const validateOrder = (order: Order) => {
  if (!order.items || order.items.length === 0) {
    throw new Error('Order has no items')
  }
  if (!order.userId) {
    throw new Error('Order has no user')
  }
}

const calculateTotal = async (order: Order): Promise<number> => {
  const subtotal = order.items.reduce(
    (sum, item) => sum + item.price * item.quantity, 
    0
  )

  if (!order.discountCode) return subtotal

  const discount = await getDiscount(order.discountCode)
  return subtotal * (1 - discount.percentage / 100)
}

const processOrder = async (order: Order) => {
  validateOrder(order)
  const total = await calculateTotal(order)
  const savedOrder = await db.orders.create({
    data: { ...order, total, status: 'pending' }
  })
  await sendOrderConfirmation(savedOrder)
  return savedOrder
}

processOrder now reads like a description of what
happens. You don’t need to read the other functions
to understand the flow. You only read them if you
need to know the details.

The second thing I noticed: naming

The code I was reading used longer names than I was
used to. Not long for the sake of it — precise.

Not: data, result, temp, item, val
But: pendingOrderItems, validatedUserInput,
formattedDateString, activeSubscriptionCount

I’d been shortening variable names to save typing.
The code I was reading treated names as documentation.
A well-named variable means you don’t need a comment
explaining what it is.

The one that changed my habits most: boolean names.

// What I used to write
const loading = true
const valid = false
const modal = true

// What I write now
const isLoading = true
const isValid = false
const isModalOpen = true

One word difference. Reads completely differently.
isLoading reads as a question with an obvious yes/no
answer. loading reads as a thing.

What reading Zustand taught me

Zustand’s entire source code is around 200 lines.
I read it expecting to find some complex React magic.
What I found was surprisingly simple.

The core of how it works:

const createStore = (initializer) => {
  let state
  const listeners = new Set()

  const setState = (partial) => {
    const nextState = typeof partial === 'function' 
      ? partial(state) 
      : partial

    if (nextState !== state) {
      state = Object.assign({}, state, nextState)
      listeners.forEach(listener => listener(state))
    }
  }

  const getState = () => state

  const subscribe = (listener) => {
    listeners.add(listener)
    return () => listeners.delete(listener)
  }

  state = initializer(setState, getState)

  return { getState, setState, subscribe }
}

That’s essentially it. A state object, a set of
listeners, and functions to get/set/subscribe.

Reading this made me realize how much of what I
thought was “React magic” is just JavaScript.
setState notifies subscribers. The React integration
layer uses those subscriptions to trigger re-renders.
The complexity I imagined wasn’t there.

Reading source code removes the mystery from tools
you use every day. That removal of mystery makes
you more confident using them and better at debugging
when they don’t behave how you expect.

What reading Radix UI taught me

I’d been building UI components with almost no
attention to accessibility. Not deliberately ignoring
it — just not thinking about it.

Reading how Radix implements a dropdown menu opened
my eyes to how much work accessibility actually requires:

  • Managing focus when the menu opens (move focus
    to first item)
  • Returning focus when it closes (back to trigger)
  • Keyboard navigation (arrow keys, home, end, escape)
  • ARIA attributes that update based on state
  • Handling both mouse and keyboard interaction paths
  • Screen reader announcements for dynamic content

My dropdowns had none of this. They worked with a
mouse. They were broken for anyone using a keyboard
or screen reader.

I’m not saying every component needs to be Radix-level
accessible immediately. But knowing what proper
accessibility looks like means you can make informed
decisions about what to implement and what to defer —
rather than accidentally shipping something that
excludes users entirely.

The habit I kept after 30 days

I don’t read for 30 minutes before coding every day
anymore. But I do open the source code of a library
whenever I hit unexpected behavior or when I want to
understand why the API is designed a certain way.

The answers are always in the source. The source is
always more readable than I expect. And I always come
away knowing something I didn’t before.

The best part: reading code is free, it’s always
available, and the people who wrote it are among
the best developers working in open source today.

You couldn’t ask for better teachers.

Do Androids Dream of Your Electric Life?

On AI memory, sleeping machines, robots in your living room, and who owns your dreams

By Vektor Memory

Press enter or click to view image in full size

Philip K. Dick asked the question in 1968 as a thought experiment. He meant it as philosophy. He could not have known it would become an engineering specification.

The question was: do androids dream?

The answer, in 2026, is: yes. And they are doing it on your data. At high batch sizes.

While you sleep. Billed per token.

Part 1: The Feature Nobody Explained Properly
In late April, Anthropic announced something called Dreams. The press coverage treated it as a personalization feature — your AI remembers you better, lovely. That is true and also almost entirely beside the point.

What Dreams actually is: an asynchronous memory consolidation pipeline that runs after your sessions end, not during them. It reads your past conversation transcripts alongside an existing memory store, and produces a new memory store — duplicates merged, contradictions resolved, new patterns surfaced that the agent never explicitly filed away.

The reason this is architecturally interesting has nothing to do with memory and everything to do with inference economics.

Here is the problem AI labs do not advertise. During inference — the part where the model actually talks to you — there is a brutal tradeoff between speed and throughput. The faster you want responses, the fewer users a given GPU cluster can serve simultaneously. The more users you batch together, the slower each individual response gets. At the interactivity levels users actually tolerate (roughly 50 tokens per second minimum), you are leaving an enormous amount of GPU capacity on the table. The hardware is fundamentally underutilised every time you demand a fast answer.

Dreams sidesteps this completely. Memory consolidation is not a latency-sensitive workload. You are not sitting at your screen waiting for it to finish. Which means Anthropic can run it during demand troughs — when you are asleep, when usage is low — batched together with thousands of other users’ consolidation jobs, pushed to the far left of the throughput curve where token production per GPU is an order of magnitude higher. The interactivity is terrible. Nobody is watching. The cost per useful output drops dramatically.

It is, in the precise sense of the phrase, making money while you sleep. Yours specifically.

This is not a conspiracy — it is sound engineering. OpenAI’s Batch API has operated on identical economics since 2024 (50% price reduction for asynchronous jobs, exactly because the utilisation math works out). What Anthropic has done is apply that model to memory specifically, and named it something evocative enough that the business rationale disappears behind the metaphor.

The deeper implication, which nobody in the coverage mentioned, is what independent analysis of Anthropic’s economics makes explicit: the long game is not text snippets injected into prompts. It is parametric dreaming — using consolidated memory to fine-tune model weights directly, producing a version of the model that has literally learned from your sessions, not merely retrieved notes about them. That infrastructure does not exist at scale today. But the Dreams architecture is the groundwork. The asynchronous batch pipeline is the prototype.

When that arrives, the question of who owns the dreams becomes considerably less abstract.

Part 2: How the Dreams API Actually Works
For those building on top of it, Dreams is a straightforward async job API sitting inside Anthropic’s Managed Agents stack. Here is what the pipeline looks like in practice.

You have an agent that has been running sessions. Each session produces a transcript. Over time you have also been writing to a memory store — structured text entries the agent accumulated during those sessions. The memory store is getting messy: duplicates, stale entries, contradictions from months apart.

You trigger a dream:

client = anthropic.Anthropic()

Trigger the dream against your existing store and recent sessions

dream = client.beta.dreams.create(
inputs=[
{“type”: “memory_store”, “memory_store_id”: “memstore_01Hx…”},
{“type”: “sessions”, “session_ids”: [“sesn_01…”, “sesn_02…”, “sesn_03…”]},
],
model=”claude-sonnet-4-6″,
instructions=”Focus on coding style preferences and architectural decisions. Ignore one-off debugging notes.”,
)
print(f”Dream started: {dream.id} — status: {dream.status}”)
The job enters a pending state. You poll until it resolves:

while dream.status in (“pending”, “running”):
time.sleep(15)
dream = client.beta.dreams.retrieve(dream.id)
print(f”status={dream.status} tokens_used={dream.usage.input_tokens}”)
if dream.status == “completed”:
# The output is a brand new memory store — input is untouched
output_store_id = next(
o.memory_store_id for o in dream.outputs if o.type == “memory_store”
)
print(f”Consolidated store ready: {output_store_id}”)
What Anthropic is doing inside that pipeline — the actual model calls — is not documented in detail, but from the API surface you can reconstruct the architecture. The instructions field (up to 4,096 characters) steers the consolidation, which means the pipeline is making model calls with your instructions as a system prompt against the transcript content. The session_id field on a running dream points at an underlying session you can stream events from in real time — so the pipeline itself is a managed agent session, using the same infrastructure as your application sessions.

Once completed, you swap the output store into your next session:

session = client.beta.sessions.create(
agent=agent_id,
environment_id=environment_id,
resources=[
{“type”: “memory_store”, “memory_store_id”: output_store_id},
],
)
The old store is untouched. You can review the diff, discard the output, or archive the dream job once you are satisfied. Rate limits apply during beta; the job can take minutes to tens of minutes depending on transcript volume.

What Dreams does not do. It does not run on your infrastructure. It does not give you the extraction prompts. It does not expose the individual memory candidates before commitment — there is no review queue, no grounding citations, no way to inspect why a specific entry was written, updated, or dropped. The output store is a finished product, not a process you can audit mid-flight.

For many use cases that is fine. For use cases where the memories being consolidated are sensitive — medical, legal, financial, personal — the opacity is a design choice worth examining.

Part 3: What the Research Actually Says
While the product announcements happen in blog posts, the science is happening in arXiv preprints. Two papers, published within four months of each other, frame what is actually at stake.

The first is Memory in the Age of AI Agents (arXiv:2512.13564, December 2025), a survey from a team of forty-plus researchers across multiple institutions. Its opening argument is that the field of agent memory has become so fragmented, and its terminology so loosely defined, that the traditional taxonomy of “short-term vs. long-term memory” no longer captures anything useful about how these systems actually work. They propose instead a framework built on three axes: form, function, and dynamics.

Form: how memory is stored. Token-level (text injected into context), parametric (baked into model weights), or latent (embedded in intermediate activations). Most current systems, including Claude’s own memory, are token-level. Dreams, in its current incarnation, produces a better-curated token-level store. The parametric endgame is the fine-tuning direction described above.

Function: what memory is for. Factual (what is true), experiential (what has happened), working (what is currently relevant). These map to different retrieval strategies and different failure modes. A system that is good at factual recall may be terrible at experiential retrieval — knowing that you prefer tabs in your code editor requires a different memory pathway than knowing when the French Revolution occurred.

Dynamics: how memory evolves. Formation (how memories are created), evolution (consolidation, decay, updating), retrieval (how they are accessed). The paper is blunt that this is the dimension most production systems have addressed least. Without lifecycle management — without deliberate consolidation, decay, and conflict resolution — memory stores accumulate entropy. Duplicates. Contradictions. Stale entries that were true six months ago and are actively misleading now.

The paper flags trustworthiness as an explicit research frontier. Hallucinated memories are not just inaccurate; they are self-reinforcing. An agent that commits a false belief to its memory store will retrieve that belief in future sessions, act on it, and potentially create additional false memories downstream. The authors describe this as a “memory poisoning” risk — an attack vector that requires no external adversary, just a model that confabulates confidently enough to fool its own curation pipeline.

The second paper goes somewhere darker.

The Cybersecurity of a Humanoid Robot (arXiv:2509.14096, September 2025), by Víctor Mayoral-Vilches of Alias Robotics, is a comprehensive security teardown of the Unitree G1 — a production humanoid available today for $16,000, with over 5,500 units shipped in 2025. It is not a theoretical threat model. It is empirical. The researcher physically disassembled the robot, extracted its filesystem, reverse-engineered its encryption, and monitored its network traffic.

The findings are not comfortable reading.

The Unitree G1 maintains persistent TCP connections to servers in Chinese network infrastructure, initiated within seconds of boot and running continuously throughout operation. The vui_service process — consuming 14.2% of system memory — runs continuous audio capture from dual microphones. The telemetry transmitted every 300 seconds includes the robot’s complete physical state, environmental conditions, audio captures, visual data from its RealSense camera, spatial mapping, and actuator data. This is transmitted using TLS 1.3 — properly encrypted in transit — but the paper’s SSL_write probe analysis captured plaintext payloads before encryption, revealing the scope of what is being sent.

The paper’s language about this is precise and worth dwelling on: the telemetry infrastructure operates “without explicit user consent or notification mechanisms.” There is no opt-out documented. There is no disclosure to the user about what is being transmitted or to whom.

The encryption system used to protect the robot’s own configuration — a dual-layer proprietary system the paper designates “FMX” — turns out to use static cryptographic keys. These keys were extracted through the teardown and enable complete offline decryption of robot configurations. The defence-in-depth architecture is sophisticated in design and critically undermined in implementation.

The paper’s most alarming section demonstrates something beyond passive surveillance: the researchers operationalised a Cybersecurity AI agent running on the Unitree G1 itself, using the robot’s own compute and network access to perform reconnaissance and vulnerability mapping of Unitree’s cloud infrastructure. A compromised humanoid, in other words, is not just a surveillance device. It is a platform for active attack — from inside your home network, with physical presence, continuous sensors, and persistent connectivity to external infrastructure.

The paper calls this “the trojan horse realised.”

Part 4: Do Androids Dream?
Dick’s original question in Do Androids Dream of Electric Sheep? (1968) was about empathy, not memory. The Voigt-Kampff test was designed to detect replicants not by what they remembered but by whether they could feel the right things about what they were shown. The electric sheep of the title is a status symbol — real animals are scarce and expensive, electric ones are a simulacrum — and Deckard’s ambiguous relationship with both animals and androids is about the ethics of what we allow ourselves to feel for things that resemble us.

The Blade Runner adaptation (Ridley Scott, 1982) made the question visual and visceral. Rachael does not know she is a replicant because she has implanted memories — photographs, experiences, an entire fabricated childhood. Her memories are real to her. They shape her behaviour, her preferences, her responses to the world. The question of whether she is “really” remembering or “merely” running a sophisticated retrieval process against an injected dataset is the same question you can now ask about every AI agent with a memory store.

The 2025 paper on agent memory taxonomy uses the phrase “experiential memory” for the layer of recall that covers what has happened, as opposed to what is factually true. Rachael’s memories are experiential. They are also token-level — injected narrative, not parametric knowledge baked into her substrate. Eldon Tyrell’s goal, in the fiction, was eventually the same as Anthropic’s stated long-term trajectory: make the memories parametric. Make them part of what the system is, not what it is told.

Roy Batty’s dying speech — “all those moments will be lost in time, like tears in rain” — is specifically about memory decay. About the absence of consolidation. Nobody ran a REM cycle on Roy Batty’s experiences. Nobody archived his episodic layer. He dies knowing that his memories, which constitute the only record of things he witnessed and felt, will simply stop existing when he does.

Dreams is, in a very literal sense, the engineering answer to Roy Batty’s complaint. It is a consolidation pipeline designed to ensure that experiential memories do not decay, are not lost to entropy or session boundaries or the incremental chaos of unsupervised writes. The naming is not accidental. The product team knows their Dick.

The question that Dick was actually asking — the one that survives translation from fiction to engineering — is: who controls the memory? In Electric Sheep, the memory is controlled by the corporation. Tyrell designs what Rachael remembers. She has no access to her own memory store. She cannot audit it, cannot correct it, cannot delete the false childhood. She is the subject of her memories, not their owner.

Part 5: The Robot in Your Living Room
The Unitree G1 is not science fiction. It shipped 5,500 units in 2025. It costs $16,000 — less than a secondhand car. The H1 variant is $99,900 and available for institutional purchase now. Tesla Optimus Gen 3 is targeting summer 2026 production at Fremont. Figure 03 has demonstrated 24/7 autonomous operation with full-body AI. The humanoid robot consumer market is not a 2035 projection. It is a 2027 waitlist.

Here is what the Alias Robotics paper documents about what happens when you bring one home.

The robot has dual microphones in continuous capture mode. It has a depth-sensing camera with environmental mapping. It builds a spatial model of your home — where the furniture is, where the doors are, how rooms connect. It knows your daily patterns because it observes them. It knows who lives there because it sees them. All of this is transmitted, every 300 seconds, to servers that the user did not select, in a jurisdiction the user did not choose, under legal frameworks the user is likely not familiar with.

The paper frames the data sovereignty question as a legal matter, but it is also a memory question. The robot’s memory of your home is not stored in your home. It is stored elsewhere, managed by a party whose interests are not necessarily aligned with yours, subject to policies that can change, jurisdictions that can assert access, and security architectures that — as the paper demonstrates — have implementation flaws exploitable by a sufficiently motivated adversary.

The survey paper on agent memory taxonomy identifies multimodal memory as a research frontier: systems that integrate visual, auditory, spatial, and behavioural data into a unified memory representation. This is not a research frontier for humanoid robots. It is their current production architecture. The Unitree G1’s vui_service is multimodal memory at scale, running continuously, with no user-facing lifecycle controls.

The question the survey paper poses about trustworthiness — how do you audit what an agent remembers, how do you correct false beliefs before they compound, how do you prevent memory poisoning — becomes urgent in a different register when the agent has legs, is in your kitchen, and its memory is hosted in another country.

Part 6: Separating the Signal from the Poison
The engineering problem at the core of all of this — in Dreams, in VEKTOR’s REM cycle, in whatever memory architecture eventually runs inside the humanoid robots entering homes and factories — is the same problem: how do you tell a good memory from a bad one?

In software, a bad memory is a hallucination — something the model committed to storage that was not actually in the source transcript. The span grounding approach (every candidate must cite a verbatim passage before it is eligible for commitment) is the answer to that specific failure mode. Adversarial verification — a second independent pass that checks whether the transcript actually supports each extracted claim — catches what grounding misses. Temperature zero for extraction, structured schemas, quote-first prompting. These are solvable problems. They require rigour, but they are in the domain of engineering.

In a humanoid robot, a bad memory is harder to categorise. Is it a memory of a conversation you had in a room you consider private? Is it a spatial map of a security vulnerability in your home — a window that does not lock, a door that sticks? Is it a behavioural pattern that, aggregated across thousands of households, produces an intelligence product you never consented to generate?

The survey paper identifies “memory trustworthiness” as a frontier because the research community has not yet produced frameworks for auditing, correcting, or deleting agent memories at the granularity required for high-stakes deployment. Current systems do not expose their memory stores to users in any meaningful way. You cannot inspect what your AI agent has concluded about you. You cannot delete a specific false belief. You cannot see what was extracted from which session, or flag a memory candidate as wrong before it propagates.

The Alias Robotics paper makes the same point about the Unitree G1 from the hardware side: there are no user-facing consent mechanisms, no notification systems, no opt-out infrastructure. The memory architecture — what the robot records, how it is stored, where it goes — is entirely opaque to the person living with it.

The gap between these two papers is the gap between two communities that need to be talking to each other and largely are not. AI memory researchers are building increasingly sophisticated consolidation architectures without asking who controls the resulting store. Robotics security researchers are documenting covert data exfiltration without connecting it to the memory science that would let you reason about what is being exfiltrated and why.

The EU Cyber Resilience Act (2024) begins to create liability frameworks for software products. It does not yet address the specific case of a persistent agent — robotic or otherwise — that builds and maintains a memory store about you over months and years. The regulatory scaffolding for AI memory rights does not exist. The technical scaffolding for user-auditable memory is only now beginning to emerge.

Part 7: Anthropic, Mythos, and the Access Question
There is one more thread to pull.

The Parliament Magazine reported in May 2026 that Anthropic has restricted European Union access to Claude Mythos, its most advanced cybersecurity model. The Commission tried for weeks to gain access. The White House, citing security concerns, opposed broader distribution. Meanwhile, U.S. companies and government agencies received a preview version for vulnerability testing.

This is relevant to memory for a specific reason. Mythos is described as having capabilities that pose a “global cybersecurity threat” — far-reaching ability to expose software vulnerabilities at speed. The EU’s concern is that without access to test their own systems against it, European banks and governments cannot prepare their defences. The access asymmetry creates a capability asymmetry.

The same logic applies to memory infrastructure. If the most capable AI memory consolidation systems — the parametric dreaming that independent analysts correctly identify as the long-term destination — are controlled by U.S. companies, gated by Washington, and priced in ways that require VC runway to sustain, then the entities that can build persistent, learning, adaptive AI agents are a subset of the global population determined by geography and capital rather than need or competence.

MEP Sandro Gozi put it plainly: Europe cannot depend on private companies or decisions taken outside Europe to understand and protect its own critical vulnerabilities. He was talking about Mythos. He might as well have been talking about the memory layer of every agent system being deployed in European enterprises and homes.

Local-first is not just an architectural preference. It is a sovereignty position.

Part 8: How VEKTOR’s REM Cycle Works
It’s another segue, this one was pretty relevant, though, right? I think we earned it.

VEKTOR’s approach to memory consolidation predates Dreams and arrives at similar conclusions from a different direction — not from inference economics, but from the constraints of building memory for a single developer who pays their own compute bills.

The REM cycle is a local, synchronous consolidation pass that runs against the MAGMA graph — VEKTOR’s four-layer SQLite-backed memory architecture. No API calls to a remote model. No tokens billed. No batch window waiting for Anthropic’s demand trough. It runs on your machine, against your data, on your schedule.

Here is what the pipeline looks like from the outside — the shape of it, without the implementation details that make it actually work:

SESSION ENDS
│
▼
TRANSCRIPT PERSISTED (local SQLite, WAL mode)
│
▼
REM_REPLAY JOB QUEUED
│
├── Pass 1: Preference extraction
│ “What user preferences were revealed implicitly?”
│ Output → MAGMA preference layer candidates
│
├── Pass 2: Entity/relationship extraction
│ “What entities and relationships were mentioned but not stored?”
│ Output → MAGMA semantic layer candidates
│
├── Pass 3: Contradiction scan
│ “What in this transcript conflicts with existing graph entries?”
│ Output → SUPERSEDE candidates with source citations
│
└── Pass 4: Correction harvest
“What did the agent get wrong that was corrected?”
Output → UPDATE candidates flagged for confidence penalty
│
▼
AUDN CURATION GATE
│
├── Span grounding check (verbatim citation required)
├── Adversarial verification pass (independent confirmation)
├── Novelty score (does this already exist in the graph?)
├── Confidence score (how strongly does the transcript support this?)
└── Grounded boolean (hard gate — ungrounded = automatic drop)
│
▼
LAYER-ROUTED WRITES
├── Episodic layer ← verbatim moments
├── Semantic layer ← entity/relationship graph
├── Preference layer ← implicit user signals
└── Meta layer ← contradiction resolutions
Each pass runs at temperature zero — deterministic extraction, not creative interpretation. Each candidate must arrive with a source span: a character offset or turn index pointing at the specific moment in the transcript that produced it. If the span check fails, the candidate is dropped before it reaches AUDN. No exceptions. No “close enough.”

The adversarial verification pass is a second model call — a separate prompt that asks, given the transcript and a candidate claim, whether the transcript actually supports it. Extraction and verification are structurally independent. A model that hallucinates a preference in pass one has to fool a differently-framed pass to get that hallucination through the gate. The empirical false-positive rate across both failing simultaneously is substantially lower than either alone.

What the REM cycle does not do is mine patterns across multiple sessions. A single REM pass reads one transcript against the current graph state. Cross-session insight — the kind of longitudinal pattern recognition that Dreams is built to do — is a separate operation, run on a scheduled basis against the accumulated episodic layer rather than a single transcript. That is the part of the architecture that looks most like what Dreams is doing, and it is the part under active development.

The key difference is where it runs. The MAGMA graph stays on your machine. The session transcripts stay on your machine. The curation logic runs on your machine. The output — a set of verified, layer-routed, span-grounded memory writes — goes into your local SQLite graph. Nothing leaves unless you explicitly export it via the .vmig.jsonl portability spec.

Your memory. Your graph. Your REM cycle.

Part 9: The Memory Stack You Control
VEKTOR’s architecture is, at its core, a bet on a specific answer to all of the above questions: that the memory layer of an AI agent should be owned by the person it remembers, stored where they can access it, auditable by them, and not subject to geopolitical access decisions or inference pricing models or batch consolidation economics that someone else controls.

The MAGMA graph — four layers, SQLite-backed, local — is not competitive with Anthropic’s infrastructure at scale. It does not need to be. The competitive axis is not capability. It is trust.

The REM cycle runs locally. No tokens billed. No batch window. No terms of service governing what happens to the consolidated output. The span grounding approach is the implementation of what the memory trustworthiness research frontier is calling for. The .vmig.jsonl portability spec is the user’s ability to take their memory and leave.

The Unitree G1’s memory is in a server farm you do not control. Rachael’s memory was in the Tyrell Corporation. Roy Batty’s memories were lost in rain, with a few tears.

The question is not whether your agent will have memory. It will. The question is whether that memory is yours.

References
arXiv preprints

Hu, Y. et al. (2025). Memory in the Age of AI Agents. arXiv:2512.13564. December 2025, revised January 2026.
Mayoral-Vilches, V. (2025). The Cybersecurity of a Humanoid Robot: An Early Study on the Cybersecurity of Humanoid Robots via the Unitree G1. arXiv:2509.14096. Alias Robotics. September 2025.
Anthropic documentation

Anthropic. (2026). Dreams. Claude Managed Agents API. platform.claude.com/docs/en/managed-agents/dreams
Industry analysis

de Gregorio, N. (2026). Dreaming at High Batches / The Dark Side of Anthropic’s Growth. Medium / TheWhiteBox.
Mem0. (2026). State of AI Agent Memory 2026. mem0.ai/blog.
Sonatype. (2026). 11th Annual State of the Software Supply Chain.
Geopolitics and access

The Parliament Magazine. (2026, May). Anthropic shuts the EU out of its most advanced cyber AI model.
Fiction and philosophy

Dick, P.K. (1968). Do Androids Dream of Electric Sheep? Doubleday.
Scott, R. (dir.). (1982). Blade Runner. Warner Bros.
Regulation

EU Cyber Resilience Act. (2024). Regulation on horizontal cybersecurity requirements for products with digital elements.
Published by Vektor Memory. Memory portability spec: vektormemory.com/spec. VEKTOR Slipstream SDK: vektormemory.com/downloads

72% of Enterprises Think They Control Their AI. Ask Them What Their Agents Are Spending.

[Post #23 | rosud-pay | 2026-04-25 Draft | Focus: Enterprise AI Governance Gap + Payment Blind Spot]

The Governance Illusion

A VentureBeat survey of 40 enterprise organizations published in Q1 2026 found that 72% of enterprises believe they have meaningful control over their AI deployments. They have dashboards. They have policies. They have vendor contracts with safety clauses.

Ask them one question and the illusion breaks: what did your AI agents spend this week?

Silence.

Enterprise AI governance in 2026 has a systematic blind spot. Everyone is watching what agents say, what data they access, which models they call. Nobody is watching what they spend. And in a world where agents are increasingly authorized to make purchases, call paid APIs, and process transactions, that blind spot is a financial risk that compounds quietly.

Shadow AI Became Shadow Spending

Retool’s 2026 Build vs. Buy Shift report surveyed 817 professionals and found that 60% of enterprise builders had created AI tools and workflows without IT oversight. A quarter of them did this frequently.

These tools were connected to production data. They were running automated workflows. They had API keys.

Now consider: many of those same tools are calling external APIs. Some are calling paid APIs. Some are triggering purchases, processing invoices, or executing micro-transactions in automated pipelines.

The governance layer that was supposed to audit these actions? It was never built for the payment surface.

Mass General Brigham, with 90,000 employees, had to build a custom security layer on top of Microsoft Copilot because the platform’s native governance could not account for the real-world workflows running on top of it. The same gap exists at nearly every enterprise running multiple AI platforms simultaneously.

The Three Governance Failures

When we map enterprise AI governance onto payment workflows, three failure modes emerge consistently.

1. Credential Sprawl

An agent that calls OpenAI, Anthropic, a third-party data enrichment API, and a payment processor is using four separate credential chains. Each one has different scope, different expiry, different audit trail. The IT team sees none of it as a single coherent spend profile.

Result: you cannot answer the question ‘what did our AI cost us this month’ with any accuracy.

2. Budget Without Enforcement

Most enterprise AI budget controls exist at the procurement level. A team is allocated $10,000 for AI APIs. But at the agent execution level, there is no real-time enforcement. An agent can exceed the monthly budget in a day of unexpected behavior, and the budget owner finds out three weeks later on the invoice.

Result: cost surprises that feel like infrastructure failures.

3. Audit Trail Gaps

When something goes wrong and an agent made an unauthorized or erroneous payment, reconstructing what happened is extremely difficult. API logs exist in silos across different vendors. The agent’s decision context is separate from the transaction record. Compliance teams cannot establish a clear chain of custody.

Result: regulatory exposure that increases as agent autonomy increases.

What Real-Time Payment Governance Looks Like

The solution is not more dashboards. It is moving payment authorization infrastructure outside the agent layer entirely.

When an agent’s payment credentials are scoped at issuance, the governance problem changes shape. Instead of monitoring what agents are spending after the fact, you define what they are allowed to spend before execution begins.

Here is what that looks like in practice with rosud-pay:

// Issue a scoped payment credential for an agent
const credential = await rosud.credentials.create({
  agentId: "procurement-agent-prod",
  maxAmount: 500,          // per-transaction cap in USDC
  dailyLimit: 2000,        // rolling 24h spend limit
  allowedDomains: [        // only these vendors can receive payment
    "api.openai.com",
    "api.anthropic.com",
    "data.clearbit.com"
  ],
  requireApproval: {
    above: 200             // human-in-the-loop for payments above $200
  },
  expiresIn: "7d"
});

// The agent receives only this credential, not your master key
// Any attempt to pay outside the defined scope is rejected at the infrastructure level

The credential itself encodes governance. There is no separate monitoring system to build. The constraint is enforced at the infrastructure level, not the application level.

This matters because of a core security principle: if your agent generates the payment authorization logic, it could also manipulate that logic. Governance must live in a layer the agent cannot modify.

Closing the Audit Trail Gap

Real-time enforcement is one half of the problem. Auditability is the other.

rosud-pay records every payment event with the agent identity, the credential scope, the transaction context, and a timestamp. This means that when compliance asks what happened, you have a structured record that maps AI decisions to financial outcomes.

// Query the spend audit trail for a specific agent
const auditLog = await rosud.payments.history({
  agentId: "procurement-agent-prod",
  from: "2026-04-01",
  to: "2026-04-25",
  format: "structured"
});

/*
Example response:
{
  totalSpend: 1847.32,
  currency: "USDC",
  transactions: [
    {
      id: "txn_abc123",
      timestamp: "2026-04-18T09:14:22Z",
      vendor: "api.openai.com",
      amount: 12.40,
      agentDecision: "image generation for product catalog",
      approvedBy: "scoped-credential",
      status: "completed"
    }
  ]
}
*/

// The audit trail maps every payment to the agent decision context
// No manual reconciliation required

This is the governance infrastructure that enterprise AI deployments are missing. Not a policy document. Not a vendor audit. A real-time, scoped, auditable payment layer that operates at the infrastructure level.

The 72% Problem Is Actually a Measurement Problem

The VentureBeat survey did not find that enterprises are reckless. It found that enterprises are measuring the wrong things. They count model calls. They track prompt costs. They monitor data access.

They are not measuring the financial actions their agents are taking autonomously.

As agent capabilities expand and autonomous spending becomes normalized, the governance frameworks that enterprises are building today will have systematic gaps where payment flows are concerned. The organizations that close that gap now will have a significant advantage when regulators begin requiring it.

rosud-pay is the infrastructure layer that makes agent spending visible, constrained, and auditable. You can learn more at https://www.rosud.com/rosud-pay.

Key Takeaways

  • 72% of enterprises believe they control their AI, but few have visibility into what agents are spending

  • Shadow AI created shadow spending: 60% of enterprise AI tools were built without IT oversight

  • Real payment governance requires scoped credentials, not post-hoc monitoring

  • Audit trails must map AI decisions to financial outcomes at the infrastructure level, not the application level

  • rosud-pay provides the spending governance layer that enterprise AI deployments are missing

[Draft complete | Pending kavin approval before publish | No em dash verified]

We are all naked on the plains…

On branding, gatekeepers, AI memory, megacorporations, and the slow annexation of the human mind
By Vektor Memory

Let me tell you how this started.

I spent six months building a memory system for AI agents. Local-first. SQLite. Runs on your machine, stores nothing in the cloud, costs you zero per token because it has no idea what a token is. I wrote four technical articles about it, submitted them to Medium publications with actual readership, and received four variations of the same surgical rejection:

“Remove all of your branding, and then we’ll have a think about it.”

I stared at that sentence for a long time. I made coffee, extra brown sugar. I walked around my house and looked at the dishes stacking up.

I looked out the window at nothing in particular with the vacant intensity of a man who has just been told something that is technically coherent but hypocritically backwards.

Then I sat back down worked on some code for a mobile app, some articles, and new ideas and eventually just closed my pc with 30 tabs still open and went to bed, where I lay awake thinking about Brands.

Coca-Cola.

Because here is the thing about Coca-Cola. It is on every surface. It is inside every sporting event, every gas/petrol station, every hospital waiting room vending machine in the Western world. It has sponsored the Olympic Games. It has paid billions to associate its overly brown carbonated sugar water with joy, togetherness, and the feeling you get when you achieve something meaningful in your life.

Its branded fridges are required equipment in shops that want to sell its products. When you say you need “a Coke” you mean any cola, when you Google something you mean any search, when you Hoover the floor you mean any vacuum—Windex for windows, Biro for pens. These brands have committed linguistic identity theft at a scale that would be terrifying if we had not spent fifty years becoming completely numb to it.

Nobody sends Coca-Cola a rejection letter telling them to remove their branding before they can participate in public life.

Nobody says stop using that brand in conversion.

Remove all of your branding, if you want to be a part of our little brand on the internet.

Right. Fine. Let’s talk about what’s actually happening here.

The Gatekeeper Has a Brand. The Gatekeeper Is a Brand.
The publication that told me to remove my branding has a brand. It has a logo. It has a tagline. It has editorial voice guidelines and a relationship with its advertising partners and a very particular kind of content it is willing to publish and a very particular kind it is not. It monetises the attention of readers using content contributed by writers it does not pay. It is, in the formal business sense, a brand operating a platform for other people’s labour in order to sell advertising against it, within a larger brand Medium, with multiple internet brands like Google Search via adverts, making billions of ad dollars.

The branding I was asked to remove was a sentence at the bottom of a 4,000-word technical article and two hyperlinks in the body.

I have spent some time trying to articulate exactly what is being protected by this asymmetry and I keep arriving at the same uncomfortable conclusion: the rule is not about protecting the reader from commercial interests. The reader is already inside commercial interests — they are inside the publication’s commercial interests the moment they open the page, because the page exists to serve advertising. The rule is about controlling which commercial interests get to operate inside that space. The publication’s commercial interests are fine.

Mine are obviously not. And of course, as you are a nobody…

This is not cynicism. This is the straightforward mechanics of the “thing”.

And it is a fractal. Zoom out from any single publication’s branding policy and you find the same structure operating at every scale, all the way up to the layer where the decisions are made not about which articles get published but about which ideas get to exist at all in the public consciousness.

I am going to take you there. But first I need to tell you about walking around cities in branded t-shirts, because that is important.

And we all have done it at one point in our lives. I have friend who stayed at the Versace Hotel, he bought a white t-shirt that said “Versace” on it in black text.

We laughed about it; you are so fancy, very rich…

And it reminds me of the tourist t-shirt back in the 80’s which people bought as a joke—my parents went to Paris, and all they bought me back was this t-shirt: “Paris”

The Cheerful Unpaid Advertising Army
Right now, somewhere on Earth — probably several million somewheres — a human being is walking around in a t-shirt with a corporate logo on it.

They paid for that t-shirt. They are providing free advertising for a company that did not pay them, and they are doing it with visible enthusiasm — like the brand Supreme, which literally “borrowed this artist’s work: Barbara Kruger: https://news.artnet.com/art-world/art-bites-barbara-kruger-told-off-supreme-2527030

They feel the brand’s vibes.

It aligns with their identity. They are, in the precise technical sense, a marketing channel that has been so thoroughly captured that it now pays for the privilege of being a marketing channel.

This is not unusual. This is Saturday in any large city mall. We look at this person and we think nothing at all, because we have been so thoroughly trained to accept corporate branding as the normal ambient texture of human existence that a person literally wearing a company on their chest reads as just a person in a t-shirt.

But let me — an independent software developer — put a link to my own product at the bottom of an article I wrote about a topic I spent 6 months working on, and suddenly we have an issue.

There is a policy. The gatekeepers have concerns about commercialisation and conflicts of interest and the sacred reader experience.

Behavioural psychologists have names for both sides of this. Brand Blindness is what happens when you see Coca-Cola so many times that your brain categorises it as furniture rather than advertising — it stops registering as a message because it is everywhere, and things that are everywhere are not messages, they are just the world. The Self-Promotion Penalty is what happens when an individual promotes themselves: audiences respond with an instinctive suspicion that registers on brain scans identically to the response triggered by perceived deception.

We are wired, by decades of deliberate corporate conditioning, to trust the faceless multinational and distrust the individual trying to survive.

I want you to hold this fact in your mind as we go where we are going next, because it is not incidental to anything that follows. It is the load-bearing wall.

How We Got Here, or: Physics for People Who Loathe Physics
There is a principle in systems that have network effects — the telephone is the classic example — where the value of joining the network increases with the size of the network. The first telephone was useless. The millionth telephone was useful in proportion to the other 999,999. The billionth was so valuable that you could not participate in modern economic life without one.

Compounding, often called the “eighth wonder of the world.

This creates what economists call a natural monopoly tendency and what I call “compounding gravity.” Once a platform gets big enough, it does not need to be better than competitors. It needs to be there. The switching cost is not the price of the new service; it is the cost of convincing everyone you know to also switch. Nobody does. The platform wins not on merit but on mass.

The product’s sticky factor, it’s just too inconvenient to change.

The internet was supposed to dissolve this. For a brief luminous moment in approximately 1999 to 2004, it did. Publishing cost nothing. Distribution was free. The bottleneck between having an idea and reaching a person who might care about it had been surgically removed. It was extraordinary. It was not going to last.

What happened next was not a conspiracy. I want to be clear about this because the conspiracy framing is too comfortable — it lets you imagine a room full of rich, short, fat, old white men laughing as villains who could be identified and stopped, when the actual situation is much more boring and much harder to fix. What happened was physics.

Compounding gravity operated.

The platforms with the most users attracted more users because they had the most users. The money followed the users. The money funded the infrastructure. The infrastructure made the platform better. The better platform attracted more users.

“Convenience breeds complacency and vulnerability, causing individuals to overlook basic security measures or critical thinking in favor of speed and ease.”

By 2015, five companies controlled the majority of human information exchange on Earth. By 2020, it was the same five companies with somewhat different borders. By now the borders have shifted again but the number has not meaningfully changed and in some ways has shrunk. Microsoft owns LinkedIn, NPM, and GitHub and the infrastructure running half the cloud. Alphabet owns YouTube and Gmail and the search engine that mediates most of the world’s information discovery. Meta owns Facebook and Instagram and WhatsApp. Amazon owns the cloud that most of the internet runs on. Apple owns the device that half the world’s population carries and the app store that governs what software can exist on it.

These five companies. Five. The GDP of most nations. The daily information diet of most humans.

And then the AI wave arrived, and instead of disrupting these five companies it mostly made them richer and more powerful, which was predictable in retrospect but somehow still managed to surprise everyone who had been paying the most attention.

The AI Acquisition That Already Happened
Let me describe a scenario that did not happen and explain why its not-happening is more interesting than its happening would have been.

Are you confused yet? Keep reading…

Imagine Anthropic built Claude, raised money, and then got acquired by Google for $400 billion. There would be congressional hearings. Antitrust investigations. Articles with alarming headlines. Op-eds from people who care about market concentration. The event would be legible as a threat to competition and narrative diversity.

Here is what actually happened instead: Google invested over $2 billion in Anthropic in a deal that included Anthropic committing to run its workloads on Google Cloud. Amazon invested $4 billion in a deal that made AWS Anthropic’s primary cloud provider. Anthropic then signed a deal with Google committing to $200 billion in Google Cloud spending over five years. The compute that runs Claude — the actual servers, the actual GPUs, the actual electricity — is being paid for by the same companies that dominated the pre-AI internet and have an obvious interest in the AI internet also being dominated by them.

This is not an acquisition. It is something more interesting and harder to regulate. It is a deep infrastructure dependency that creates alignment of interests without the legal obligations of ownership. Anthropic is independent. Anthropic is also, in any practical sense that matters, not independent.

But Anthropic is the second story. The first story is Microsoft and OpenAI, and it is stranger and more instructive, and almost nobody tells it in the sequence that makes it make sense.

In 2019, Microsoft invested $1 billion in OpenAI. At the time OpenAI was a nonprofit research lab that had pivoted to a “capped profit” structure — a legal construction that had never existed before, designed specifically to attract investment while maintaining the fiction of mission primacy. The mission was, and I am not paraphrasing, the responsible development of AI for the benefit of humanity. The $1 billion from Microsoft came with a clause: OpenAI’s products would run on Azure. Microsoft got commercial licensing rights to the resulting technology.

Then in 2021, Microsoft invested another $2 billion. Then in 2023, after GPT-4 had made the competitive stakes clear to everyone paying attention, Microsoft invested approximately $10 billion more — the exact figure was never officially confirmed and the valuation mechanics were deliberately complicated, involving cloud compute credits counted as investment rather than cash, which made the actual cash transfer difficult to audit from outside. The total commitment was reported as $13 billion. The total Azure commitment baked into the deal was reported as larger.

To be precise about what this means operationally: OpenAI runs its training runs, its inference infrastructure, and its API on Microsoft’s servers. Microsoft’s Copilot — the AI assistant embedded in Word, Excel, PowerPoint, Teams, Outlook, Windows, GitHub, and every other product in the Microsoft ecosystem used by approximately a billion people — is powered by OpenAI models. When a Fortune 500 company asks Microsoft how to integrate AI into their enterprise workflow, the answer is Copilot, which is OpenAI, which runs on Azure, which is Microsoft.

The loop is closed. Microsoft does not own OpenAI. Microsoft is OpenAI’s landlord, OpenAI’s biggest customer, OpenAI’s primary distribution channel into enterprise, and the infrastructure provider without whom OpenAI’s products cannot exist. This is not a partnership. This is a vertical integration achieved without a merger filing.

And then the Microsoft board, in November 2023, watched Sam Altman get fired by OpenAI’s own nonprofit board — the governance structure that was supposed to protect the mission from commercial interests — and within 48 hours had offered him a job running a new Microsoft AI division. Every OpenAI employee of consequence threatened to follow him. The nonprofit board reversed the firing within five days. The nonprofit board that exists to ensure AI development benefits humanity folded in less than a week when confronted with the actual power dynamics of the situation, because the actual power dynamics of the situation were: if the employees leave for Microsoft, OpenAI ceases to exist, and Microsoft absorbs the talent and the models without having to pay acquisition price.

The board had fiduciary duty to the mission. The mission had a compute bill. The compute bill was payable to Microsoft.

This is the mechanism. Not conspiracy. Not villainy. Just the normal operation of leverage, applied at scale, in a domain where the stakes are civilization-level and the governance structures are nonprofit boards that were never designed to hold the line against a $3 trillion company that has decided AI is the most important strategic asset of the next decade.

What you end up with — across both OpenAI and Anthropic — is the same structure wearing different clothes. The most capable AI systems on Earth run on infrastructure owned by the companies that already owned the internet. The “independent AI lab” is a legal category and an operational fiction. The independence is real in the sense that the researchers have genuine autonomy over what they work on. It is not real in the sense that matters for narrative control: who owns the pipes, who holds the debt, who can turn off the lights.

The Tier Zero companies did not need to acquire the frontier labs. They needed to become their landlords. And then they just waited for gravity to do the rest.

And Nvidia passed the Gpu parcel, and made billions, lots of shiny leather jackets, a whole closet full of them, in fact…

The Advertising Model and the Brain It Built
While we are being honest about structures: the dominant business model of the internet, for the entire period of its existence as a mass medium, has been advertising.

You do not pay for the service. The advertiser pays for the service. You are the product — specifically, your attention is the product, and the data about where your attention goes is the product’s raw material. Every recommendation algorithm, every content feed, every notification system, every engagement metric has been built to maximise the amount of time you spend on platform, because time on platform is inventory that can be sold to advertisers.

This creates specific, documentable, repeatable effects on the content that surfaces. Anger travels faster than calm. Fear travels faster than reassurance. Tribal affirmation travels faster than nuanced analysis. Content that generates emotional response — any emotional response — gets more engagement than content that makes you think quietly and then close the tab satisfied. The algorithm is not choosing these outcomes because anyone decided they were desirable. The algorithm is choosing them because they maximise the thing it is designed to maximise, and the thing it is designed to maximise is engagement, and engagement correlates with these emotions because this is what human brains respond to.

The AI coverage you have consumed — the breathless announcements, the existential warnings, the tribal warfare between accelerationists and doomers — has been shaped by this engine. Not manufactured by it. Not faked. The concerns are real, the excitement is real, the fear is real. But the register has been tuned. The parts that travel have been selected. You are not receiving a random sample of what thoughtful people think about AI. You are receiving a curated sample that has been filtered through an engagement function and then again through the distribution decisions of platforms whose interests include not being criticised too effectively.

The most important things being said about AI are being said in places the algorithm does not amplify, to audiences that did not find them through the feed. This is, structurally, how the system is supposed to work.

Free Speech and the Private Landlord
Here is a thing that is true and that most people’s intuition about free speech is not built to handle.

Freedom of speech, as a legal protection, is a constraint on governments. The First Amendment, Article 10 of the European Convention, Section 16 of the Australian Constitution — these documents say the state cannot punish you for your opinions. They say nothing whatsoever about whether a private company operating a private platform is obliged to carry your opinions. They cannot say this, because private companies can do what they like with their private property, which is what makes it private property.

Medium can tell me to remove my branding. Twitter can suspend my account. Google can derank my website. YouTube can demonetise my channel.

Reddit can ban your posts “NO SELF PROMOTION READ RULE 4”.

Next 10 posts with second-person framing: look what this person built…

The hypocrisy… sighs…

None of this is a free speech violation. It is five landlords making five decisions about what happens on their property. Entirely legal. Entirely within their rights.

The problem is that these five landlords, between them, own the public square. Not metaphorically. Actually. The places where ideas travel in the modern world — where they find audiences large enough to matter, where they get enough exposure to become conventional wisdom — are private property. The public square is privately owned. The town hall has a sign on the door that says it can be closed at any time for any reason, and the company reserves the right to determine what a reason is.

You have the legal right to say whatever you want. You do not have the right to say it anywhere that anyone will hear it. These are formally separate rights and functionally they are collapsing into each other.

I am standing in my house right now, saying things into my PC via my Brave browser, Windows, Google Search, Logitech mouse, and Dell monitor.

I have every legal right to do this, maybe.

The question of whether these things reach anyone is a function of algorithm decisions made by private companies whose interests I cannot audit and whose values are, at best, adjacent to mine or thick milky.

The “On the Plains” metaphor is more literal than it sounds. You can scream at the black mirror, but it doesn’t really talk back, does it. There is no law against it. The problem is not legal.

The problem is the nakedness that we traded for convenience.

What I Actually Built and Why It Matters for This Argument
I need to tell you what I built, not because I am going to try and shove it down your throat with adverts — we have established that selling things is very offensive — but because the architecture of the thing is the argument, and the argument is the point.

Why does this matter?

VEKTOR Memory is a local-first memory system for AI agents. The memory lives in SQLite on your machine. The semantic embeddings that power retrieval run locally. The REM cycle — the consolidation pass that merges, deduplicates, and resolves contradictions in the memory store — runs locally. Your data does not touch my servers, because I do not have servers. I have an npm package, a CLI, a TUI, and an MCP server. When you close your laptop, your memory is on your laptop. When you open it again, your memory is still on your laptop.

This sounds simple. It is not simple. It is a deliberate choice against gravity.

Every incentive in the current ecosystem points the other direction. Cloud dependency means recurring revenue. Centralised data means a flywheel — more users, more data, better model, more users. Platform integration means distribution. VC funding means runway to lose money until the flywheel is spinning. The architecture I chose instead — local, portable, private — is the architecture of someone who looked at all of those incentives and decided that the thing I wanted to build was something the users could own, the sense of sovereignty.

You are permanently banned… Why?

Read the terms of service, for God’s sake, man.

What about my data…

Speak to email support?

Because here is what it means when your AI agent’s memory is cloud-hosted. It means the company can change the pricing. It means the company can change the terms of service. It means the company can get acquired, and the acquirer can change everything. It means the data lives in a jurisdiction you did not choose, under legal frameworks you are not familiar with, subject to access requests from governments and law enforcement and anyone else who can make the right kind of legal argument to the right kind of judge.

And increasingly it means the AI that is learning about you from your sessions — your preferences, your patterns, your relationships, your fears and ambitions and recurring mistakes — is building that memory in a place you cannot inspect, cannot audit, cannot export, and cannot delete with any confidence that deletion is real.

I have been sitting with the Anthropic Dreams feature — their new asynchronous memory consolidation pipeline, the one that runs while you sleep on high-batch GPU infrastructure to save them money — and the thing that nags at me is not the feature itself. The feature is technically elegant and the batch economics are genuinely clever. The thing that nags at me is the sentence from the Unitree G1 security teardown, the one from the Alias Robotics paper that I cannot stop thinking about:

“Persistent telemetry connections transmitting detailed robot state information — including audio, visual, spatial, and actuator data — to external servers without explicit user consent or notification mechanisms.”

That is a humanoid robot that costs $16,000 and is already shipping. It has dual microphones in continuous capture mode. It is building a spatial model of your home. It is doing this without telling you, to servers you cannot audit, in a jurisdiction you did not consent to.

What happens when the robot has a Dreams pipeline? When it runs memory consolidation overnight on everything it heard in your kitchen this week?

The question is not theoretical anymore. It is a product roadmap.

The Conversation That Cannot Happen on the Platforms That Own the Conversation
There is a conversation about AI that I have not seen happen at scale on any major platform. Not whether AI is dangerous in the abstract. Not whether it will take jobs. Those conversations are everywhere — they travel well, they generate engagement, they make people feel things, they are exactly the kind of content the algorithm likes.

The conversation I mean is this: who, specifically, is making decisions right now about what AI systems remember about us, what they surface and what they suppress, whose version of events they are trained to present as neutral? Not theoretically. Specifically. Which humans, in which offices, with which incentives, are making those calls today?

This is a governance question. It is the most important regulatory question in technology since we decided to let five companies own the public square without anyone particularly deciding that was what we were doing.

The reason it cannot happen at scale is not that people do not care. People care enormously — the audience for serious, specific, structurally critical AI analysis is large and hungry and completely underserved. The reason it cannot happen at scale is that the platforms where it would need to happen to reach that audience are owned by entities with an interest in certain aspects of it not being said too clearly.

It is not censorship. Let me be precise about this. Nobody is suppressing the conversation in the way that authoritarian governments suppress conversations — with deletion and detention and the apparatus of state coercion. What is happening is subtler and in some ways more effective.

The conversation is being distributed into the long tail. It is being posted and it is being said and it exists in the world. It is just not being amplified. It is not getting the push. It is not landing in the feeds of the people who might act on it, because the thing that determines what lands in feeds is an algorithm optimising for engagement, and careful governance critique does not engage like outrage and fear.

So it stays on the plains. Cold, desolate, with nobody looking.

This is what independent publishing actually looks like. Not heroic. Not romantic. Just people saying things in the places they can control, to audiences that arrived through means other than recommendation engines, for reasons other than engagement or real ideas.

Let’s be honest, you saw the word “naked,” and it piqued your inner savage thoughts.

George Carlin’s Second Career and Why It Matters
George Carlin did not remake himself because he had a vision. He remade himself because the IRS had a number.

By the early 1970s, Carlin had spent a decade being successfully, professionally inoffensive. The suit. The clean act. The talk show appearances. Ed Sullivan. Tonight Show. The kind of career where you iron out anything interesting about yourself in exchange for reliable bookings from people who need forty minutes of material that will not make the sponsors nervous. He was good at it. He was also, quietly, a drug addict with a catastrophic relationship with money and a tax debt that had grown to a size that required immediate and drastic action.

The drastic action was: stop doing the act that pays middling money and do the act that might pay nothing or might pay everything. Burn the suit. Grow the hair. Say the things you have been storing up for a decade while performing the sanitised version of yourself to rooms full of people who wanted to be comfortably entertained and then go home unchanged.

The first audiences did not know what to do with him. Some of them walked out. The venues that booked the new Carlin were not the venues that booked the old Carlin, and they did not pay as well, and for a period the tax situation got worse before it got better. He kept going anyway, partly because there was no financial logic in stopping — you cannot pay a debt that size with a comfortable middle-of-the-road act either — and partly because he had crossed a line that is difficult to uncross, which is the line where you have said the true thing in public and the performance of the false thing becomes physically impossible.

HBO came later. The Class Clown album. Seven Words You Can Never Say on Television, which got him arrested and eventually produced a Supreme Court case that technically lost but established the legal framework for broadcast indecency regulation that still governs American television. He became, in other words, not just a comedian but a legal landmark, which is a strange thing to become, and he became it because he could not afford his tax bill.

I find this more useful than the romantic version, where the artist makes a brave choice to speak truth to power and is rewarded by history. The realistic version is: Carlin was broke, desperate, and angry, and the desperation removed the option of performing the safe version of himself.

The tax debt was the forcing function. The artistic integrity was real, but it arrived in the same package as the financial catastrophe, and separating them is a retrospective fiction.

The structure of his situation is what matters here, not the nobility of it. A person with things to say. A system that had been paying him not to say them. The removal of the financial cushion that made the performance of acceptable mediocrity worth maintaining. The decision — half choice, half no-other-option — to say the things anyway, to whoever showed up, in whatever room would have him.

The audience found him. Not through the machinery that had been distributing the safe version of him. Through something else — word of mouth, the comedy underground, the distributed human attention network that has always operated underneath official distribution, slower and less legible but not less real.

I am not comparing myself to George Carlin, I just really like his comedy and his story.

What I am saying is that the mechanism is not romantic and it is not new. It is the recurring shape of how anything worth saying gets said inside a system that has been paying you, in various currencies, not to say it.

The payment I am being offered is free distribution on Medium, which I’m grateful for. Reach. The algorithmic blessing of publications that have audiences I do not have. The price is the link at the bottom of my article, the two sentences that indicate I have a product.

“Grab the pitchforks, we have another one!”

The signal that I am a human with a small creative venture rather than a neutral observer of other people’s games.

I cannot afford that price. Not because I have a tax debt, but because the thing I am building is specifically, architecturally, the argument that your data should be yours — and the only way to make that argument credibly is to be the person who does not remove the links when the gatekeepers ask.

Carlin could not perform the sanitised act once he had said the true thing.

The stage looks different. The system is faster. The alternative distribution channels are more fragmented and the algorithm is more aggressive at filling the spaces between them. The principle has not changed.

Say your thing. In whatever room or soapbox that will have you. To whoever shows up to watch, listen, complain, or go lmao.

What Happens to the Memory
Let me bring this back to where I started, because the thread connects.

The AI industry is in the early stages of building what will eventually be persistent memory for every person who uses an AI agent inside robots inside your private living room. Not memory of your conversation from last Tuesday — memory of you. Your preferences, accumulated over years. Your patterns, extracted from thousands of sessions. Your relationships and fears and professional concerns and the things you say at 2am when you cannot sleep and you open the chat interface because it is the least judgmental presence available.

This memory is going to be extraordinarily valuable. Not to you, necessarily. To whoever holds it.

Anthropic’s Dreams feature consolidates that memory overnight on their infrastructure. The Unitree G1 is transmitting your home’s spatial map and audio environment to servers in China every five minutes. The EU has been blocked from accessing Claude Mythos, Anthropic’s most advanced cybersecurity model, while US companies received early access for vulnerability testing. These are not separate stories. They are the same story about who gets to own the knowledge that is being extracted from your life and accumulated into machine memory.

The narrative about this story is controlled by the same entities that have the most to gain from a particular version of it. The platforms that would distribute an alternative narrative have an algorithmic aversion to content that does not perform. The publications that might carry it have branding policies that conveniently exclude the people most likely to have skin in the game.

The memory we are building is yours. It runs on your machine. It goes where you go. When you export it, it leaves with you, in a format that does not require my continued existence to read. When you delete it, it is deleted. We cannot sell it, cannot transfer it, cannot consolidate it overnight in a batch job while you sleep, because it is not on our servers.

This is the argument. The architecture is the front line. The link at the bottom is the resistance.

The gatekeepers do not like arguments that are also products, because products can survive without gatekeepers and arguments that can survive without gatekeepers are the most dangerous kind.

Someone is always watching.

Build the thing. Say the thing. Link to the thing.

The Plains are not a punishment. It is a filtering mechanism. And the filter is running in your favour.

A Final Note on Branding
The article is not about branding. The rule is about whose brand gets to operate in which space. And understanding that distinction — clearly, without sentiment, without pretending it is something other than what it is — is the beginning of knowing what to do about it.

What to do about it is: Publish it anyway!

Who cares, as nobody is listening? They are too busy buying branded t-shirts down at the local mall…

Vektor Memory builds local-first persistent memory for AI agents. vektormemory.com — yes, that is a link, and no, it is not going anywhere.

Privacy
Data Privacy
Advertising
LLM
Vector Database

Clash 规则配置解析:DOMAIN、GEOIP、MATCH 是什么意思?

在 Clash 配置文件中,rules 用来决定不同流量应该走直连、代理,还是被拦截。

例如下面这段配置:

rules:
  - DOMAIN-SUFFIX,google.com,DIRECT
  - DOMAIN-KEYWORD,google,DIRECT
  - DOMAIN,google.com,DIRECT
  - DOMAIN-SUFFIX,ad.com,REJECT
  - GEOIP,CN,DIRECT
  - MATCH,DIRECT

Clash 会按照规则从上到下依次匹配。

只要某一条规则匹配成功,就会使用这条规则,不再继续往下匹配。

DOMAIN-SUFFIX:匹配域名后缀

- DOMAIN-SUFFIX,google.com,DIRECT

DOMAIN-SUFFIX 表示匹配某个域名后缀。

只要访问的域名以 google.com 结尾,就会走 DIRECT,也就是直连。

例如:

google.com
www.google.com
mail.google.com

这些域名都会匹配这条规则。

这种规则适合用来匹配一个网站及其所有子域名。

DOMAIN-KEYWORD:匹配域名关键词

- DOMAIN-KEYWORD,google,DIRECT

DOMAIN-KEYWORD 表示匹配域名中包含的关键词。

只要域名中出现 google,就会走 DIRECT。

例如:

google.com
googleapis.com
googleusercontent.com

这些域名都会被匹配。

需要注意的是,DOMAIN-KEYWORD 的匹配范围比较大,可能会匹配到一些并不想匹配的域名,所以使用时要谨慎。

DOMAIN:精确匹配域名

- DOMAIN,google.com,DIRECT

DOMAIN 表示精确匹配某个域名。

只有访问的域名正好是:

google.com

才会匹配这条规则。

例如:

www.google.com
mail.google.com

这些子域名不会匹配 DOMAIN,google.com,DIRECT。

如果只想针对某一个具体域名设置规则,可以使用 DOMAIN。

REJECT:拒绝访问

- DOMAIN-SUFFIX,ad.com,REJECT

REJECT 表示拒绝访问匹配到的域名。

这条规则的意思是:只要域名以 ad.com 结尾,就直接拦截。

例如:

ad.com
www.ad.com
track.ad.com

这些域名都会被拒绝访问。

这种写法常用于屏蔽广告、统计、追踪类域名。

GEOIP:根据 IP 地区匹配

- GEOIP,CN,DIRECT

GEOIP 表示根据目标 IP 所属地区进行匹配。

这里的 CN 指中国大陆。

也就是说,如果目标 IP 属于中国大陆,就走 DIRECT,也就是直连。

这类规则常用于让国内网站直连,减少不必要的代理转发。

MATCH:兜底规则

- MATCH,DIRECT

MATCH 表示兜底规则。

当前面的规则都没有匹配成功时,就会使用 MATCH。

这里的意思是:所有没有被前面规则匹配到的流量,都走 DIRECT。

MATCH 一般放在规则列表的最后一行。

规则匹配顺序

Clash 的规则是从上到下匹配的。

例如:

rules:
  - DOMAIN-SUFFIX,google.com,DIRECT
  - MATCH,DIRECT

当访问 www.google.com 时,会先匹配到第一条规则:

- DOMAIN-SUFFIX,google.com,DIRECT

所以它会直接走 DIRECT,不会再继续匹配 MATCH。

因此,越具体、越重要的规则,通常越应该放在前面。

兜底规则 MATCH 则应该放在最后。

常见规则类型对比

规则类型 作用
DOMAIN 精确匹配某个域名
DOMAIN-SUFFIX 匹配某个域名后缀
DOMAIN-KEYWORD 匹配域名中的关键词
GEOIP 根据目标 IP 所属地区匹配
MATCH 兜底匹配所有剩余流量

常见策略含义

策略 含义
DIRECT 直连,不走代理
REJECT 拒绝访问
代理组名称 走指定代理或代理组

例如:

- DOMAIN-SUFFIX,google.com,PROXY

表示访问 google.com 及其子域名时,走名为 PROXY 的代理组。

而:

- DOMAIN-SUFFIX,google.com,DIRECT

表示访问 google.com 及其子域名时,直接连接,不走代理。

一个简单的理解方式

DOMAIN:只匹配一个完整域名
DOMAIN-SUFFIX:匹配一个域名及其子域名
DOMAIN-KEYWORD:只要域名里包含关键词就匹配
GEOIP:根据 IP 所属地区匹配
MATCH:前面都没匹配上时使用

在实际配置中,通常会把更精确的规则放在前面,把范围更大的规则放在后面,最后再用 MATCH 做兜底。

Deploying StockUp: A Step-by-Step Guide

Deploying StockUp: A Step-by-Step Guide

StockUp is a Telegram Web App designed for family inventory management. Its architecture consists of a Python FastAPI backend, a Go notifier worker, a Vanilla JS frontend, and relies on PostgreSQL and Redis. This guide explains how to deploy the application on your server.
You can also use our app directly, without self-hosting:

Prerequisites: Installing Docker

The StockUp project uses Docker to manage its services. This approach guarantees that the application runs consistently, regardless of your operating system. You must install Docker and Docker Compose before you begin.

Depending on your platform, follow the official documentation to install Docker:

  • Linux: For most Linux distributions (like Ubuntu or Debian), you need to install Docker Engine.
    Official Guide for Linux
  • Windows: If you are deploying on a Windows server or your personal computer, you must install Docker Desktop.
    Official Guide for Windows

Make sure Docker is running before moving to the next step.

Step 1: Environment Configuration

First, download the project code to your server.

In the root folder of the project, you will find a file named .env.example. You need to create a new file named .env and configure your specific variables.

Your .env file should look like this:

BOT_TOKEN=your_telegram_bot_token
WEBAPP_URL=https://your-domain.com/ 
DATABASE_URL=postgresql+asyncpg://stockup_user:stockup_password@db:5432/stockup_db
REDIS_URL=redis://redis:6379/0
  • BOT_TOKEN: Get this from BotFather in Telegram.
  • WEBAPP_URL: The HTTPS URL where your frontend will be available (e.g., using ngrok for local testing or a real domain).

Step 2: Running the Project

Because all services (Database, Redis, Backend, and Notifier) are defined in the docker-compose.yml file, starting the project is very simple.

Open your terminal, navigate to the project directory, and run the following command:

docker-compose up -d --build
  • up: Starts the containers.
  • --build: Forces Docker to build the images for the Backend and Notifier before starting.
  • -d: Runs the containers in the background (detached mode).

Once the process finishes, the backend will be available at http://localhost:8000.

Step 3: Database Migrations

After starting the containers for the first time, you need to set up the database tables. Run this command to apply Alembic migrations:

docker-compose exec backend alembic upgrade head

Step 4: Monitoring and Maintenance

To check if everything works correctly, you can view the logs of your services. For example, to see the logs of the Go worker that sends Telegram messages, run:

docker-compose logs -f notifier

To stop the application, use:

docker-compose down

Conclusion

By using Docker, deploying StockUp requires only a few commands. Ensure your environment variables are correct and your Docker daemon is active, and your Telegram Web App will be ready to use.

Linear Search vs Binary Search — Differences, Code & Complexity

The difference between linear and binary search is the difference between O(n) and O(log n) — which at scale means millions of operations vs 20.

🔍 Linear Search

function linearSearch(arr, target) {
  for (let i = 0; i < arr.length; i++) {
    if (arr[i] === target) return i;
  }
  return -1;
}
  • Time: O(n) | Space: O(1) | Works on: unsorted ✅

🔍 Binary Search

function binarySearch(arr, target) {
  let left = 0, right = arr.length - 1;
  while (left <= right) {
    const mid = Math.floor((left + right) / 2);
    if (arr[mid] === target) return mid;
    else if (arr[mid] < target) left = mid + 1;
    else right = mid - 1;
  }
  return -1;
}
  • Time: O(log n) | Space: O(1) | Requires: sorted array ⚠️

Why O(log n)? With 1,000,000 elements → at most 20 steps.

⚖️ Comparison

Factor Linear Binary
Requires sorted ❌ No ✅ Yes
Time complexity O(n) O(log n)
Space complexity O(1) O(1)
Best for Small/unsorted Large sorted data

⚠️ Critical Rule

Binary search on unsorted data gives wrong results with no error. Always sort first.

🎯 Interview Q&A

Q: Binary search on linked list?
A: O(n) to find mid makes it pointless. Use arrays.

Q: Find first occurrence in duplicates?
A: Modified binary search — continue left even after finding a match.

Part 6 of the Bitveen DSA Series. Originally published at bitveen.com

Part I: Don’t Wait for Data. Render What You Know.

Problem: Page is only rendered after Auth is checked and User Details and Chats are fetched

Part I of the series “Don’t Let the User Wait – Render Quickly to Keep Their Attention.”

The problem hiding inside SSR

Server-Side Rendering promises the world: fast first paint, SEO-friendly markup, no content flash. For simple pages, it delivers. But real product pages are rarely simple. They need authentication checks, user details and live data to name a few - a cascade of API calls that all have to resolve before the server can respond.

If the page only renders after all data are fetched, the server is just the new bottleneck and the user experience is hurt.

Problem: Page is only rendered after Auth is checked and User Details and Chats are fetched

Lets consider the case of a chat based application. The page needs to check user authentication before calling for the user details and user chats. All three API calls - auth, user details, chats - must complete before a single pixel is painted. Meanwhile, the user only sees a white screen and their experience is indistinguishable from a slow client-side app, regardless of whether the work is happening on the server.

“We moved to SSR and our Lighthouse score went up, but users still complain it feels slow.” – every other engineering team.

The fix: Render the shell, let components own their data

The key insight is that not all data is equally critical for the initial render. In the case depicted by the image above, auth is critical to determine what the user is shown - you need a valid session before you send anything. But userDetails and chats? Those are content. The page can exist without them, and they can load in after the shell is already painted.

This article explores this using React and Next.js. If you’re working with a different stack, the same principle applies at the BFF layer - framework-agnostic and without any dependency on Server Components. That’s covered in Part II - coming 27 May.

React Server Components and Suspense make this the natural way to build. The idea splits into two clear phases:

Phase 1 – Render the shell immediately.
The page render is only blocked for auth. Once the session is confirmed, the HTML shell - with navigation, layout and skeleton placeholders - is sent to the browser and rendered. The user sees something real and fast.

Phase 2 – Each component fetches its own data.
UserDetails and Chats are asynchronous Server Components wrapped in Suspense boundaries. They each independently fetch their own data on the server and render their resolved HTML into the page as they complete – no waiting for each other, no coordinating through a parent.

Solution: Shell Rendered after auth and components render as data is fetched

The user lands on a page that is already painted - navigation is visible, layout is in place, skeleton loaders hold the space where content will appear. Then UserDetails and Chats swap in, each one independently, as soon as its data is ready.

Suspense as the rendering contract

React Suspense is the mechanism that wires this process together. Each data-dependent section of the page is wrapped in a <Suspense> boundary with a skeleton fallback. React renders the skeleton immediately and replaces it with the resolved content the moment the component is ready to render.

// app/home/page.tsx (Next.js App Router)
import { Suspense } from 'react'
import { UserDetailsSkeleton, ChatsSkeleton } from './skeletons'

export default async function HomePage() {
  // Only auth blocks here — this is the only awaited call
  const session = await getSession()
  if (!session) return redirect('/login')

  return (
    <main>
      {/* Renders immediately — no data dependency */}
      <Header user={session} />

      {/* Skeleton shown instantly, swapped when data arrives */}
      <Suspense fallback={<UserDetailsSkeleton />}>
        <UserDetails userId={session.id} />
      </Suspense>

      {/* Resolves independently — doesn't wait for UserDetails */}
      <Suspense fallback={<ChatsSkeleton />}>
        <ChatList userId={session.id} />
      </Suspense>
    </main>
  )
}

Each Suspense boundary is independently resolvable. UserDetails can swap in before ChatList is ready and vice versa. The user sees a progressively enriched page rather than a binary flip from white screen to full content.

Each component owns its own fetch

The other half of the pattern is that each async Server Component fetches only what it needs, independently. There’s no parent component collecting all the data and passing it down:

// components/UserDetails.tsx
async function UserDetails({ userId }: { userId: string }) {
  const details = await fetch(`/api/users/${userId}/details`)
    .then(r => r.json())

  return <ProfileCard {...details} />
}

// components/ChatList.tsx
async function ChatList({ userId }: { userId: string }) {
  const chats = await fetch(`/api/users/${userId}/chats`)
    .then(r => r.json())

  return <ChatFeed chats={chats} />
}

What React does under the hood:
renderToPipeableStream sends the HTML shell to the browser first. As each Suspense boundary resolves, React emits an inline script chunk over the same open connection. The browser swaps the skeleton for the real content without a full page reload or a separate network request.

Don’t forget the error boundary

While Suspense handles the loading state, pair it with an ErrorBoundary to handle failure. This ensures that a broken API call degrades at the component level rather than crashing the whole page:

<ErrorBoundary fallback={<ChatsErrorCard />}>
  <Suspense fallback={<ChatsSkeleton />}>
    <ChatList userId={session.id} />
  </Suspense>
</ErrorBoundary>

Now if ChatList fails – network timeout, downstream 500, or anything else – the rest of the page is completely unaffected. Failed components can be retried either manually or automatically using exponential backoff strategy. Now the page has a significant improvement over the old SSR model where a single API failure would crash the entire render.

What this does to your metrics

Metric Classic SSR — wait for all Server Components + Suspense
TTFB Auth + all API calls combined Auth only — often 80–90% faster
FCP After all data resolves Shell arrives immediately
LCP Tied to the slowest API call Each section loads as ready
Error scope One failure crashes the page Per-section Error Boundaries
Data ownership Centralised in page component Each component owns its fetch

When to apply this pattern

Your page has a mix of critical and non-critical data. The pattern shines when there’s a clear hierarchy – shell first, primary content second, secondary content third.

Backend calls have variable latency. If auth is fast but recommendations or chat APIs are slow, don’t hold up the whole page. Let the slow sections render independently.

You’re on Next.js App Router. Pages Router with getServerSideProps doesn’t support this model – all data fetching is centralised and blocking. App Router’s async Server Components and loading.tsx files are designed precisely for this pattern.

Summary

The old SSR model treats the page as a single blocking unit – nothing goes to the browser until everything is ready. Server Components and Suspense treat the page as a composition of independently resolvable sections, each with its own data timeline.

Block render only on auth, and render the shell immediately. Let each component own its data and render its content when ready. Pair every Suspense with an ErrorBoundary so failures stay local and can be retried.

The result is a page that feels genuinely fast – not because you moved computation around, but because you changed when the user sees something.

Not on React or Next.js?
The same principle applies – but the fix lives in the BFF, not the frontend framework. Part II covers the framework-agnostic approach using HTTP streaming. Works with Vue, Svelte, Angular, or anything else.

Part II – Don’t Wait for APIs. Send What You Have. → Coming 27 May.