HardwareComparisons

Raspberry Pi 4 vs Raspberry Pi 5 for a self-hosted AI agent

Plenty of people have a Raspberry Pi 4 in a drawer and wonder whether it can host an agent, or whether the Pi 5 is worth buying. With a cloud model the agent mostly waits on the network, so the older board goes further than its age suggests. The specs that decide it are memory, storage and the power supply, all from Raspberry Pi's own pages.

In short: If you own a Pi 4 with 4 GB or 8 GB, keep it for an agent that calls a cloud model, and boot it from a USB SSD. If you are buying, buy a Pi 5: it is the faster board, has a PCIe connector for NVMe, and goes up to 16 GB. Neither is a host for a local model, per OpenClaw's own Pi page.

Buying new: the Raspberry Pi 5 with 8 GB, an SSD and the 27 W supply.
Buy the Raspberry Pi 5 on Amazon

The two boards side by side

Raspberry Pi 4 Model BRaspberry Pi 5
CPUBroadcom BCM2711, 4 Cortex-A72 cores at 1.8 GHzBroadcom BCM2712, 4 Cortex-A76 cores at 2.4 GHz
RAM options1, 2, 4 or 8 GB LPDDR4-32001, 2, 4, 8 or 16 GB LPDDR4X-4267
Fast storageUSB 3.0 (2 ports), USB boot supportedPCIe 2.0 x1 connector for an M.2 HAT, plus USB 3.0
Recommended supply5 V, 3 A USB-C5 V, 5 A USB-C with Power Delivery (27 W supply)
Typical bare-board current600 mA800 mA
USB peripheral budget1.2 A in total1.6 A on a 5 A supply, 600 mA on a 3 A one
Thermal behaviourNo soft limit defined, per the docsArm cores throttled progressively from 80 °C, CPU and GPU at 85 °C
Speed, per Raspberry PiReference"2-3x the speed of the previous generation"

The speed claim is Raspberry Pi's, for general computing. No figure of ours sits behind it.

What OpenClaw's Raspberry Pi page says

OpenClaw is the one agent with a Raspberry Pi page that grades boards. Its minimum is 1 GB of RAM, one core, 500 MB of free disk and a 64-bit OS; it recommends 2 GB or more, a 16 GB SD card or a USB SSD, and Ethernet. Its table, verbatim:

BoardRAMOpenClaw's gradeIts note
Pi 54/8 GBBestFastest, recommended.
Pi 44 GBGoodSweet spot for most users.
Pi 42 GBOKAdd swap.
Pi 41 GBTightPossible with swap, minimal config.
Pi 3B+1 GBSlowWorks but sluggish.
Pi Zero 2 W512 MBNoNot recommended.

The same page asks for 64-bit Raspberry Pi OS ("do not use 32-bit") and says to use cloud API models: "do not run local LLMs on a Pi, even small models are too slow to be useful". The 1 GB grade is optimistic for current releases: in OpenClaw issue #200671, a 1 GB Pi 4 sat "below the gateway's own 2048 MiB heap floor" and restart-looped. The details per board are on OpenClaw on a Raspberry Pi 4 and OpenClaw on a Raspberry Pi 5.

Other agents publish no Pi grades. Our own sizing (an estimate, not a measurement) puts Hermes Agent at 8 GB without its browser tool and 16 GB with it, which only the Pi 5 offers; see how much RAM an agent needs.

Storage: USB SSD on the Pi 4, NVMe on the Pi 5

OpenClaw's advice applies to any agent: "Use a USB SSD, SD cards are slow and wear out." The Pi 4 boots from USB by default once USB is in the BOOT_ORDER; Raspberry Pi notes that early Pi 4 boards might need a bootloader update first. A USB 3 SSD on one of its two USB 3.0 ports is the way to give an old Pi 4 a second life (USB 3 SSD on Amazon).

The Pi 5 adds a PCIe 2.0 x1 connector for an M.2 HAT and an NVMe drive: which HAT and drive, and the boot order, are on Raspberry Pi 5 NVMe. Even its SD slot is quicker. Raspberry Pi's figures for its own card, 4 kB random IOPS:

Raspberry Pi microSD cardRead IOPSWrite IOPS
On a Pi 4 (DDR50 bus)3,2001,200
On a Pi 5 (SDR104 bus)5,0002,000
Raspberry Pi SSD 256 GB on a Pi 5, for scale40,00070,000

Power supply and heat

The Pi 4 wants a 3 A USB-C supply (a good 2.5 A one works if USB devices draw less than 500 mA in total); Raspberry Pi recommends its own 3 A supply (Pi 4 supply on Amazon). The Pi 5 boots on 3 A but then limits USB devices to 600 mA and disables USB boot by default; for an SSD, use the 5 A, 27 W supply. A Pi 4 supply on a Pi 5 is what triggers the 5A warning.

Typical bare-board current is 600 mA for the Pi 4 and 800 mA for the Pi 5, before storage and USB devices: both are small next to a mini PC. On heat, Raspberry Pi says of the Pi 4 that "there is currently no soft limit defined"; every model is held under a hard limit of 85 °C. The Pi 5 throttles its cores from 80 °C, and a cooler keeps it below that (Pi 5 throttling).

The verdict

  • Pi 4 with 4 GB or 8 GB that you own: keep it, 64-bit OS, USB SSD, an agent with a cloud model. OpenClaw grades the 4 GB board "Good".
  • Pi 4 with 2 GB: OpenClaw runs with swap; a lighter agent such as ZeroClaw or Nanobot is more at ease there (our estimate).
  • Pi 4 with 1 GB: not for OpenClaw on current releases; see ZeroClaw on a Raspberry Pi instead.
  • Buying: a Pi 5 with 8 GB (Pi 5 on Amazon), 16 GB if you want Hermes Agent's browser tool. Buying a Pi 4 new makes sense only if you already have its supply and case (Pi 4 on Amazon).

What to buy

The machine for this setup: the Raspberry Pi 5.
Buy the Raspberry Pi 5 on Amazon

Shop links go through /go/ and open Amazon (amazon.fr in the EU and Switzerland, amazon.com elsewhere). As an Amazon Associate we earn from qualifying purchases. Your price does not change and no brand pays for a place on this page (disclosure). We write no price down: it moves, the shop shows today's.

Questions

Is a Raspberry Pi 4 enough for OpenClaw?
The 4 GB Pi 4 is graded Good on OpenClaw's own Pi page (sweet spot for most users) and the 2 GB OK with swap. Use a 64-bit OS, a USB SSD and a cloud model.
How much faster is the Raspberry Pi 5 than the Pi 4?
Raspberry Pi says 2 to 3 times the speed of the previous generation. That is the maker's claim for general use; with a cloud model, the agent spends most of its time waiting on the provider.
Can I use my Pi 4 power supply on a Pi 5?
It boots, but a 3 A supply limits USB devices to 600 mA and disables USB boot by default on the Pi 5. Raspberry Pi recommends its 27 W, 5 A supply for the Pi 5.
Does the Raspberry Pi 4 support NVMe?
Not directly: the PCIe connector is a Pi 5 feature. On a Pi 4, an NVMe drive in a USB 3 enclosure works as a USB SSD.
Can either board run a local model for my agent?
OpenClaw's Pi page says not to: even small models are too slow to be useful. Use a cloud model, or a machine with more memory for local ones.

Sources