<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ming</title>
    <description>The latest articles on DEV Community by Ming (@mingming_shen_85ea2348fec).</description>
    <link>https://dev.to/mingming_shen_85ea2348fec</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1927469%2F18d0c39d-f6ff-4c45-91a5-3af61cf7b3df.jpg</url>
      <title>DEV Community: Ming</title>
      <link>https://dev.to/mingming_shen_85ea2348fec</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mingming_shen_85ea2348fec"/>
    <language>en</language>
    <item>
      <title>Hardening an Edge AI Platform: What a Real Security Release Looks Like (NeoMind v0.9.21)</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Wed, 02 Sep 2026 11:10:22 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/hardening-an-edge-ai-platform-what-a-real-security-release-looks-like-neomind-v0921-45ml</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/hardening-an-edge-ai-platform-what-a-real-security-release-looks-like-neomind-v0921-45ml</guid>
      <description>&lt;p&gt;Edge devices are a brutal attack surface. They bind to the LAN with nobody babysitting them, they hold credentials for cloud APIs, they run third-party extension code, and "patch it Tuesday" usually means someone drives to the site. When you ship an edge platform, the security work is not a blog post — it's a pile of specific, unglamorous fixes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;NeoMind&lt;/a&gt; is an open-source, Rust-powered edge AI platform for IoT automation (single binary: HTTP API + embedded MQTT broker + rule engine + AI agent runtime). Its just-shipped &lt;a href="https://github.com/camthink-ai/NeoMind/releases/tag/v0.9.21" rel="noopener noreferrer"&gt;v0.9.21&lt;/a&gt; is largely a security and data-safety release, and I think it's worth walking through in public — both what was found and how it was fixed. Everything below reflects the repository at commit &lt;code&gt;8a75c57ee09b&lt;/code&gt; and the official release notes.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Close the front door: self-registration was open
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;POST /api/auth/register&lt;/code&gt; was a public, unconditionally-open account-creation endpoint — on a server that binds &lt;code&gt;0.0.0.0&lt;/code&gt;. Any client on the LAN could mint a user account.&lt;/p&gt;

&lt;p&gt;The fix in 0.9.21: registration now returns &lt;strong&gt;403 unless an admin explicitly opens it&lt;/strong&gt; (admin-only setting, persisted so the choice survives restarts). Nothing regresses for legitimate flows — the first admin comes from the setup wizard and additional users from the admin-only user-management endpoint. The open endpoint had no honest product caller; it was just a hole.&lt;/p&gt;

&lt;p&gt;Related, from 0.9.20 and still the backbone: the public auth endpoints are &lt;strong&gt;brute-force throttled&lt;/strong&gt; — login counts credential failures at 5 per 15 minutes keyed per username AND per client IP (either dimension over the cap blocks, stopping both targeted guessing and account-spraying; a successful login clears the counters), and registration/first-run setup count every attempt per IP.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Secrets at rest: the asymmetry fix
&lt;/h2&gt;

&lt;p&gt;The platform's own API keys were encrypted with AES-256-GCM, but &lt;strong&gt;LLM provider API keys were stored as plaintext JSON&lt;/strong&gt; in &lt;code&gt;settings.redb&lt;/code&gt;. A copied data directory leaked every cloud key while looking superficially protected.&lt;/p&gt;

&lt;p&gt;0.9.21 seals both stores with the shared crypto service (same &lt;code&gt;data/encryption_key&lt;/code&gt; the auth store uses; an env override still wins). Legacy plaintext rows load unchanged and get sealed on next save — upgrades are transparent. Config-change history previously duplicated the plaintext key on every tracked save; it now records the sealed form.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2pdi8vyv1e3pd14625sf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2pdi8vyv1e3pd14625sf.jpg" alt="Closing the asymmetry: LLM provider keys sealed at rest like every other secret" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The path-traversal family
&lt;/h2&gt;

&lt;p&gt;If you take one lesson from this release, take this one: &lt;strong&gt;every path join is a vulnerability candidate&lt;/strong&gt;. 0.9.20 + 0.9.21 together close four of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Share proxy dot-segments&lt;/strong&gt;: &lt;code&gt;/share/{token}/proxy/devices/../../auth/keys&lt;/code&gt; passed the first-segment allowlist and the loopback forwarder normalized the path away — an anonymous share viewer reached any authenticated route via the internal-proxy header. Dot-segments are rejected outright.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Absolute-path asset join&lt;/strong&gt;: the extension asset server joined an attacker-controlled path onto the extension dir; an absolute path (&lt;code&gt;/etc/passwd&lt;/code&gt;) &lt;em&gt;replaced&lt;/em&gt; the base with no &lt;code&gt;..&lt;/code&gt; needed. Absolute paths are rejected and a canonicalized containment check backstops every join.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;file_path&lt;/code&gt; request fields&lt;/strong&gt;: extension register/upload/validate accepted any host path, making them a read-and-try-load primitive for anyone holding credentials. Paths now resolve against (and must stay inside) the data directory, after canonicalization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace ID interpolation&lt;/strong&gt;: the raw extension ID was interpolated into market URLs — &lt;code&gt;../..&lt;/code&gt; turned the marketplace client into a limited arbitrary-GET against the market host. IDs are validated before URL building.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F18qc0k1rai0af2v52mbc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F18qc0k1rai0af2v52mbc.jpg" alt="Every path join is a vulnerability candidate: containment checks stop traversal" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Supply chain: sandbox escapes and unverified packages
&lt;/h2&gt;

&lt;p&gt;NeoMind extensions run in sandboxed processes; WASM tooling sits underneath. The 0.9.21 release-blocker repairs bump &lt;strong&gt;wasmtime 36.0.13 → 36.0.14&lt;/strong&gt; for &lt;a href="https://rustsec.org/advisories/RUSTSEC-2026-0269.html" rel="noopener noreferrer"&gt;RUSTSEC-2026-0269&lt;/a&gt; — a HIGH severity filesystem &lt;strong&gt;sandbox escape when paths or symlinks contain trailing slashes&lt;/strong&gt;, published 2026-08-31. It started failing &lt;code&gt;cargo audit&lt;/code&gt; the day the advisory landed, and the lock update shipped in the same release. (We verified the advisory against the RustSec database; if you run wasmtime anywhere, check your lockfile.)&lt;/p&gt;

&lt;p&gt;Two more supply-chain fixes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Package integrity is now actually checked.&lt;/strong&gt; The marketplace index carried no sha256, so the fail-closed verification branch never fired. The installer now falls back to release-level &lt;code&gt;checksums.txt&lt;/code&gt;, warns loudly when no integrity data exists, and &lt;code&gt;NEOMIND_STRICT_PACKAGE_SHA256=1&lt;/code&gt; refuses unverified packages outright.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zip-bomb defenses unified.&lt;/strong&gt; The async package-extraction path had no size/count caps while the sync installer did — same crate, two implementations, asymmetric defenses. Both now share one set of caps and explicitly reject symlink entries. (A follow-up found a third extraction path had slipped the caps during unification — it got them too.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Credential lifecycle
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deleting a user or changing a password revokes sessions immediately&lt;/strong&gt; — both the in-memory whitelist and every persisted row. Previously a JWT minted earlier kept working for up to 7 days: a leaked token survived password rotation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remote-instance API keys are no longer handed back by the API.&lt;/strong&gt; The instance list previously returned every instance's full key XOR-"encrypted" with a cipher hardcoded in the open-source repo — anyone who could list instances recovered every credential. Now only masked keys leave the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive share links no longer mean "full write".&lt;/strong&gt; An &lt;code&gt;allow_interactive&lt;/code&gt; share token previously skipped the method check — an anonymous holder could POST/PUT/DELETE under the proxied prefixes (install extensions, delete agents). Both share modes now pass the same method gate; interactive adds exactly one write — device command actuation. Configuration editing stays blocked.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Upgrades across a privilege boundary (without sudoers)
&lt;/h2&gt;

&lt;p&gt;The 0.9.21 headline for ops: &lt;strong&gt;the About page can upgrade a server deployment&lt;/strong&gt; — check for updates, download with live progress, apply, reload. The security-relevant part is how the privilege boundary is handled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The API runs as the sandboxed &lt;code&gt;neomind&lt;/code&gt; user (&lt;code&gt;ProtectSystem=full&lt;/code&gt; + &lt;code&gt;NoNewPrivileges=true&lt;/code&gt;). It cannot write &lt;code&gt;/usr/local/bin&lt;/code&gt; and cannot sudo.&lt;/li&gt;
&lt;li&gt;So the API only &lt;strong&gt;stages&lt;/strong&gt;: stream the release into &lt;code&gt;data/upgrade/v&amp;lt;ver&amp;gt;/&lt;/code&gt; (2GB cap, binary &lt;code&gt;--version&lt;/code&gt;-verified before anything is touched), then write &lt;code&gt;apply.trigger&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A root systemd &lt;code&gt;.path&lt;/code&gt; unit watches that file with inotify and runs the apply step: back up → atomic &lt;code&gt;install -m 755&lt;/code&gt; swap → web-dir swap → restart. No sudoers rule, nothing relaxed in the main unit's sandbox.&lt;/li&gt;
&lt;li&gt;The upgrade endpoints sit in the JWT-gated admin route group — &lt;strong&gt;API keys cannot trigger an upgrade&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz598tjnetbrz9buwpvr5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz598tjnetbrz9buwpvr5.jpg" alt="Two-phase upgrade across the privilege boundary: sandboxed staging, root apply via systemd path unit" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Data safety is security too
&lt;/h2&gt;

&lt;p&gt;Two additions that belong in any edge threat model:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verified backups.&lt;/strong&gt; &lt;code&gt;neomind backup&lt;/code&gt; copies every database plus the two secret files (&lt;code&gt;encryption_key&lt;/code&gt; — without it the sealed keys in the backup are undecryptable — and &lt;code&gt;.jwt_secret&lt;/code&gt;) into a timestamped directory (0700; secrets 0600), &lt;strong&gt;verifies each copied database opens&lt;/strong&gt;, writes a manifest, and only then renames the staging dir into place. A crashed backup never masquerades as a restorable one. A scheduler runs it on a configurable interval (6h–7d) with retention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rollback guard.&lt;/strong&gt; The realistic corruption risk on edge boxes isn't old data meeting new code — it's the reverse: a &lt;strong&gt;rolled-back install opening newer data&lt;/strong&gt;, silently dropping unknown fields, then destroying newer-format rows on the first save-back. Every storage database is now version-stamped, and a store refuses to open a database stamped by a newer build, with an explicit "upgrade instead of rolling back" error. About 100 lines; no framework needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Observe it or it didn't happen
&lt;/h2&gt;

&lt;p&gt;A new public Prometheus endpoint (&lt;code&gt;/api/metrics&lt;/code&gt;) exposes request/response counters, uptime, build info, and — my favorite — &lt;code&gt;neomind_eventbus_dropped_total&lt;/code&gt;. The event bus's lagged-subscriber warning log has literally said &lt;em&gt;"surface this, don't let the system fail quietly"&lt;/em&gt; since it was written. Now drops are measurable: non-zero and growing means an automation subscriber is missing events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist for anyone shipping edge software
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Audit your registration and account-creation endpoints — open-by-default on &lt;code&gt;0.0.0.0&lt;/code&gt; is commoner than you think.&lt;/li&gt;
&lt;li&gt;Encrypt every secret at rest, then check for the asymmetry: one plaintext field next to ten encrypted ones.&lt;/li&gt;
&lt;li&gt;Treat every path join as hostile: reject dot-segments and absolute paths, canonicalize, containment-check.&lt;/li&gt;
&lt;li&gt;Verify third-party packages (checksums), and keep &lt;code&gt;cargo audit&lt;/code&gt; (or equivalent) red-blocking your CI.&lt;/li&gt;
&lt;li&gt;Revoke sessions on credential events, and never return secrets from list endpoints.&lt;/li&gt;
&lt;li&gt;Design upgrades around privilege boundaries, not sudoers.&lt;/li&gt;
&lt;li&gt;Back up with verification; guard against rollback as a data-integrity attack.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Full details are in the &lt;a href="https://github.com/camthink-ai/NeoMind/releases/tag/v0.9.21" rel="noopener noreferrer"&gt;release notes&lt;/a&gt;, and the code is open — review it, run it, file issues: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt;. The &lt;a href="https://wiki.camthink.ai/docs/neomind/product-overview/what-is-neomind" rel="noopener noreferrer"&gt;project wiki&lt;/a&gt; covers the platform itself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;All facts reflect the NeoMind repository at commit 8a75c57ee09b (release v0.9.21) and its official release notes; RUSTSEC-2026-0269 verified against the RustSec Advisory Database.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>iot</category>
      <category>rust</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Making LLM Agents Reliable on Edge Hardware: Lessons from Shipping NeoMind 0.9.20</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Tue, 01 Sep 2026 11:12:06 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/making-llm-agents-reliable-on-edge-hardware-lessons-from-shipping-neomind-0920-3dod</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/making-llm-agents-reliable-on-edge-hardware-lessons-from-shipping-neomind-0920-3dod</guid>
      <description>&lt;p&gt;Everyone has a demo where the LLM agent works. Few people have an agent that keeps working when the MQTT broker times out mid-tool-call, when the local model's real context window is half what the registry claims, and when nobody is watching a dashboard in a server room because the "server" is a box in a factory cabinet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;NeoMind&lt;/a&gt; is an open-source, Rust-powered edge AI platform for IoT automation — single binary, embedded MQTT broker, rule engine, and an AI agent runtime that drives real devices. We just shipped &lt;a href="https://github.com/camthink-ai/NeoMind/releases/tag/v0.9.20" rel="noopener noreferrer"&gt;v0.9.20&lt;/a&gt;, and the release's spine is agent execution reliability. This post is the engineering story: the failure modes we found in production-shaped testing, and the fixes that now sit in the loop.&lt;/p&gt;

&lt;p&gt;Everything below reflects the repository at commit &lt;code&gt;8a75c57ee09b&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 1: the dedup brake that punished retries
&lt;/h2&gt;

&lt;p&gt;The agent loop runs up to 30 rounds of tool-calling. To stop infinite loops, we keep a dedup set of execution signatures — if the model proposes a call it already made, we end the loop.&lt;/p&gt;

&lt;p&gt;The bug: signatures were inserted &lt;strong&gt;before&lt;/strong&gt; execution. So when a tool call failed transiently — an MQTT timeout, an extension hiccup — and the model correctly retried, the retry looked like a "duplicate". The loop ended via &lt;code&gt;AllDuplicate&lt;/code&gt;, with the original error still in hand and the task unfinished. The anti-loop mechanism was punishing the model for doing the right thing.&lt;/p&gt;

&lt;p&gt;The fix, in the 0.9.20 release notes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The cross-round dedup set now records only &lt;strong&gt;successful&lt;/strong&gt; executions. Failed calls can retry — and a failed signature that keeps failing (budget: 3 consecutive failures) is blacklisted so the loop brakes instead of burning all 30 rounds.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We also deleted our &lt;code&gt;StuckDetector&lt;/code&gt; entirely. It implemented five OpenHands-style stuck patterns — but they were &lt;strong&gt;mathematically unreachable&lt;/strong&gt; behind the dedup logic. The docs described a brake that never fired; the dedup IS the brake. Sometimes reliability work is subtraction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl8z08q9vit87m369o9ju.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl8z08q9vit87m369o9ju.jpg" alt="Error-aware dedup: failed calls can retry, repeat failures hit the brake" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 2: "context overflow" that was really a config mismatch
&lt;/h2&gt;

&lt;p&gt;On local backends, context overflow is marked permanent per &lt;code&gt;is_permanent()&lt;/code&gt;. But we found hosts where the running model's window was &lt;strong&gt;smaller&lt;/strong&gt; than the registry default — e.g. a backend started with &lt;code&gt;-c 16384&lt;/code&gt; while the model entry claimed 128K. Result: &lt;em&gt;every&lt;/em&gt; round overflowed, and small-model execution "inevitably failed".&lt;/p&gt;

&lt;p&gt;The fix is a self-heal: on overflow, one &lt;strong&gt;hard-compaction retry&lt;/strong&gt; with a halved effective window. That single retry converts "can never run" into "completes". Alongside it, custom backends now carry an explicit &lt;code&gt;max_context&lt;/code&gt; on create/update, so a 16K backend never receives 128K-budgeted prompts, and the catalog caps imported models at 128K because a GGUF header claiming 1M would OOM the KV allocation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsfowrv38eqslt6bq7dio.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsfowrv38eqslt6bq7dio.jpg" alt="Context-overflow self-heal: one hard-compaction retry with a halved window" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 3: the agent didn't know it was out of runway
&lt;/h2&gt;

&lt;p&gt;Within the last 3 rounds, the loop now injects a &lt;code&gt;[System]&lt;/code&gt; note telling the model how much runway is left. It sounds trivial; the effect is not. Without it, the model would start a multi-step chain at round 28 that the cap cuts off mid-flight — a half-finished task with no summary. With the countdown, it wraps up.&lt;/p&gt;

&lt;p&gt;Related shutdown fixes: cancellation now exits the whole round loop (previously it only broke the tool-concurrency batch), and Phase-2 summarization is skipped during shutdown — no LLM calls while the process is going down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 4: the metrics lied
&lt;/h2&gt;

&lt;p&gt;Our agent journal recorded a &lt;code&gt;success_rate&lt;/code&gt; for every execution. It was pinned at &lt;strong&gt;1.0&lt;/strong&gt;, always. Reason: tool results returning &lt;code&gt;Ok { success: false }&lt;/code&gt; were counted as successes — the transport succeeded, so the outcome flag was ignored.&lt;/p&gt;

&lt;p&gt;Now the journal reflects real outcomes. This matters beyond dashboards: the journal is the learning signal the agent system trains and steers on. Honest metrics are a prerequisite for any self-improvement story.&lt;/p&gt;

&lt;p&gt;Similarly, &lt;code&gt;invoke&lt;/code&gt; used to await execution inline with a 60s timeout — which &lt;strong&gt;dropped the future&lt;/strong&gt;. Long runs died mid-flight with no execution record and no journal entry: a ghost execution the agent could never learn from. The execution now runs in its own task; past the wait window the caller gets &lt;code&gt;still_executing&lt;/code&gt; with poll pointers while the run completes and writes its record.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 5: one bad schedule killed the whole scheduler
&lt;/h2&gt;

&lt;p&gt;Found by our own design review: the frontend's "on-demand" option encodes manual-only as &lt;code&gt;interval_seconds: 0&lt;/code&gt;. That value made the agent due on the very next tick, which hit a &lt;strong&gt;division by zero&lt;/strong&gt; in &lt;code&gt;update_next_execution&lt;/code&gt; — a panic inside the unguarded scheduler loop that stopped &lt;strong&gt;every agent on the platform&lt;/strong&gt;. Process alive, no restart, one panic line in the logs.&lt;/p&gt;

&lt;p&gt;Three-layer fix: &lt;code&gt;0&lt;/code&gt; is now a first-class "manual-only" value (schedules to a never-due time), reschedule math guards against 0 for legacy rows, and the tick's reservation phase runs in its own spawned task so any future panic there is logged and skipped instead of unwinding the loop. We also promoted one-shot agents to a real type — &lt;code&gt;ScheduleType::Manual&lt;/code&gt; with a &lt;code&gt;Completed&lt;/code&gt; ready-state between runs — so "on-demand" no longer needs a numeric hack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Per-model sampling: stop sharing one global temperature
&lt;/h2&gt;

&lt;p&gt;The scheduled-agent loop hardcoded &lt;code&gt;temperature 0.7&lt;/code&gt; for everything. But 2026's small-model zoo does not share one optimal sampling point. 0.9.20 wires &lt;code&gt;/api/settings/agent&lt;/code&gt; into both chat and scheduled paths, and each built-in model now carries its own best-known point, applied at llama-server startup and on the request side:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Qwen 3.5&lt;/strong&gt; (non-thinking): 0.7 / 0.8 / 20 — official values; the 4B tier (~3.4 GB quant, ~6 GB RAM, Apache 2.0) is currently one of the strongest laptop-class agent models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 4&lt;/strong&gt;: 1.0 / 0.95 / 64 — Google's model card recommends temperature 1.0 for all modes; we were running 0.6&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ling-3.0-tiny&lt;/strong&gt;: 1.0 / 0.95 / 20 — official&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LFM&lt;/strong&gt;: 0.6 / 0.85 / 20 — our measured best, which beat the official card values in a 154-case A/B&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The catalog schema carries &lt;code&gt;temperature/top_p/top_k&lt;/code&gt;; absent means legacy default. Registry tests lock all four values so a future "let's just tweak this" doesn't silently regress them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The payoff: which small model actually drives agents?
&lt;/h2&gt;

&lt;p&gt;We validate agent capability on a 30-case agent suite (tool selection, multi-step device control, recovery from failed calls). The 0.9.20 headline:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Ling-3.0-tiny Q4_K_M: 77% — ties Qwen 3.5 4B&lt;/strong&gt;, while generating ~45% faster (~110–116 tok/s on M4-class hardware).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ling-3.0-tiny ships through the open model catalog (4.8 GB Q4_K_M, 128K ctx, min 6 GB RAM), and our bundled runtime already carries the architecture support merged upstream, so the download runs out of the box. Tying the quality of a proven 4B agent model at roughly 1.5x the speed is exactly the trade an edge deployment wants.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7neany457t2dzrrczt3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7neany457t2dzrrczt3.jpg" alt="Ling-3.0-tiny ties Qwen 3.5 4B on the 30-case agent suite at ~1.5x speed" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What we'd tell anyone building agent loops
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dedup on outcomes, not intentions.&lt;/strong&gt; Recording a signature before knowing if it succeeded turns transient errors into permanent dead-ends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make failure modes diagnosable.&lt;/strong&gt; "Sorry, the model could not produce a response" now carries the actual reason instead of a bare "Please retry". Your future self debugging at 2am is the customer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget the loop and tell the model about it.&lt;/strong&gt; A countdown in the last rounds changes behavior more than any prompt tweak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure what actually happened.&lt;/strong&gt; If your success rate is 1.0, your metric is broken, not your agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guard the scheduler from its own inputs.&lt;/strong&gt; One malformed row should degrade one agent, not the platform.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you're building or evaluating agent systems that must run where there is no cloud fallback, come look at the code or file an issue: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt;. The &lt;a href="https://wiki.camthink.ai/docs/neomind/product-overview/what-is-neomind" rel="noopener noreferrer"&gt;project wiki&lt;/a&gt; covers the platform itself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Facts in this article reflect the NeoMind repository at commit 8a75c57ee09b (release v0.9.20, 2026-08-26) and its official release notes; third-party model specs (Qwen 3.5 family, Gemma 4 sampling guidance) are from their respective 2026 publications.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
    </item>
    <item>
      <title>From Prototype to Production: Deploying NeoMind on Edge Hardware</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Thu, 20 Aug 2026 11:12:28 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/from-prototype-to-production-deploying-neomind-on-edge-hardware-3654</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/from-prototype-to-production-deploying-neomind-on-edge-hardware-3654</guid>
      <description>&lt;p&gt;Getting an edge AI demo to run on your desk is the easy part. Keeping it alive on a $100 gateway in a factory cabinet, surviving power cuts, OTA updates, and the occasional &lt;code&gt;kill -9&lt;/code&gt; from a well-meaning technician — that's the job.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;NeoMind&lt;/a&gt; is an open-source, Rust-powered edge AI platform for IoT automation: a single binary that bundles an HTTP API (Axum), an embedded MQTT broker, a rule engine, an AI agent runtime, and embedded storage (redb). One process, two ports, no external database. That design choice pays off exactly at the deployment stage.&lt;/p&gt;

&lt;p&gt;This walkthrough covers the two production deployment paths available in the current release (v0.9.18, commit c0306de44d11), plus the operational details that separate a demo from a deployment: restarts, hardening, health checks, updates, and local LLM integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two paths, one binary
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjvl9ar854hi5teronjyl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjvl9ar854hi5teronjyl.jpg" alt="Two deployment paths: bare metal systemd vs Docker" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NeoMind ships pre-built release binaries for &lt;code&gt;linux/amd64&lt;/code&gt;, &lt;code&gt;linux/arm64&lt;/code&gt;, and &lt;code&gt;darwin/arm64&lt;/code&gt;, so you have two sane options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bare metal with systemd&lt;/strong&gt; — smallest footprint, best for constrained gateways (2-4 GB RAM devices).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker / Docker Compose&lt;/strong&gt; — multi-arch images on Docker Hub (&lt;code&gt;camthink/neomind:latest&lt;/code&gt;), best when you already run containers or want the bundled local LLM stack.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both paths expose the same surface: port &lt;strong&gt;9375&lt;/strong&gt; for the HTTP API + Web UI + WebSocket, and port &lt;strong&gt;1883&lt;/strong&gt; for the embedded MQTT broker that your devices connect to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 1: one-line install + systemd
&lt;/h2&gt;

&lt;p&gt;The repo ships an install script (&lt;code&gt;scripts/install.sh&lt;/code&gt;) that detects your OS and architecture, resolves the latest release, and drops everything in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/camthink-ai/NeoMind/main/scripts/install.sh | &lt;span class="nb"&gt;sudo &lt;/span&gt;bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What it does under the hood (and the knobs you can set as environment variables):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;INSTALL_DIR=/usr/local/bin&lt;/code&gt; — the &lt;code&gt;neomind&lt;/code&gt; binary&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DATA_DIR=/var/lib/neomind&lt;/code&gt; — all persistent state (redb database, rules, config)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WEB_DIR=/var/www/neomind&lt;/code&gt; — the built-in web UI static files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PORT=9375&lt;/code&gt;, &lt;code&gt;NO_WEB=1&lt;/code&gt;, &lt;code&gt;NO_SERVICE=1&lt;/code&gt;, &lt;code&gt;USE_NGINX=1&lt;/code&gt; for non-standard setups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The script also installs a systemd unit (&lt;code&gt;scripts/neomind.service&lt;/code&gt;) that is worth reading because it encodes a solid production baseline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Service]&lt;/span&gt;
&lt;span class="py"&gt;Type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;simple&lt;/span&gt;
&lt;span class="py"&gt;User&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;neomind&lt;/span&gt;
&lt;span class="py"&gt;WorkingDirectory&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/neomind&lt;/span&gt;
&lt;span class="py"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/local/bin/neomind&lt;/span&gt;
&lt;span class="py"&gt;Restart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;always&lt;/span&gt;
&lt;span class="py"&gt;RestartSec&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;
&lt;span class="py"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"RUST_LOG=info"&lt;/span&gt;
&lt;span class="py"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"NEOMIND_DATA_DIR=/var/lib/neomind"&lt;/span&gt;
&lt;span class="py"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"NEOMIND_BIND_ADDR=0.0.0.0:9375"&lt;/span&gt;
&lt;span class="py"&gt;NoNewPrivileges&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;ProtectSystem&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;strict&lt;/span&gt;
&lt;span class="py"&gt;MemoryMax&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;2G&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three details here are doing real work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Restart=always&lt;/code&gt; + &lt;code&gt;RestartSec=5&lt;/code&gt; handles the reality of edge power and networking. The box &lt;em&gt;will&lt;/em&gt; brown-out; the service comes back without anyone driving to the site.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ProtectSystem=strict&lt;/code&gt; plus a dedicated &lt;code&gt;neomind&lt;/code&gt; user means the process can only write to explicitly allowed paths. If anything ever escapes into the process, the blast radius is tiny.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MemoryMax=2G&lt;/code&gt; is a cgroup hard cap. On a shared gateway, NeoMind cannot eat the memory that your other services need.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check it with the usual tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status neomind
&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; neomind &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Path 2: Docker Compose (with optional local LLM)
&lt;/h2&gt;

&lt;p&gt;If your fleet already runs containers, the compose path is two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/camthink-ai/NeoMind.git
&lt;span class="nb"&gt;cd &lt;/span&gt;NeoMind &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;docker-compose.yml&lt;/code&gt; pulls &lt;code&gt;camthink/neomind:latest&lt;/code&gt; — a multi-arch image (amd64 + arm64), so the same compose file works on an x86 gateway and a Raspberry Pi 5 or Jetson-class board:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;neomind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;camthink/neomind:latest&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;9375:9375"&lt;/span&gt;   &lt;span class="c1"&gt;# HTTP API + Web UI + WebSocket&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1883:1883"&lt;/span&gt;   &lt;span class="c1"&gt;# MQTT broker&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;neomind-data:/app/data&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two implementation details from the project's Dockerfile that I think are worth knowing, because they answer questions you'd otherwise hit the hard way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Ubuntu 22.04 and not Alpine?&lt;/strong&gt; NeoMind extensions ship native binaries built against glibc. A musl-based Alpine image cannot &lt;code&gt;dlopen&lt;/code&gt; a glibc-linked shared library, so the extension marketplace would be unusable. The runtime stage pins glibc 2.35 — identical to the bare-metal release baseline — so Docker and bare metal load the exact same extension binaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does arm64 need a jemalloc flag?&lt;/strong&gt; The build sets &lt;code&gt;JEMALLOC_SYS_WITH_LG_PAGE=16&lt;/code&gt; for ARM targets because hosts like Raspberry Pi 5 and Jetson can run 64 KB memory pages; without the flag the allocator crashes. If you build your own ARM container images for edge workloads, this is a classic trap.&lt;/p&gt;

&lt;p&gt;The image also ships a built-in health check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;HEALTHCHECK&lt;/span&gt;&lt;span class="s"&gt; --interval=30s --timeout=5s --start-period=10s --retries=3 \&lt;/span&gt;
    CMD curl -f http://localhost:9375/api/health || exit 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So &lt;code&gt;docker ps&lt;/code&gt; and any container orchestrator can tell you whether the node is actually serving, not merely running.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7uzqqsiz0k73wq1ss59l.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7uzqqsiz0k73wq1ss59l.jpg" alt="Docker Compose stack with optional local LLM" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Local AI without extra plumbing
&lt;/h3&gt;

&lt;p&gt;Here's where it gets interesting for the AI-at-the-edge crowd. The repo includes a &lt;code&gt;docker-compose.override.yml&lt;/code&gt; that is auto-loaded by &lt;code&gt;docker compose&lt;/code&gt; and adds a complete local LLM stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;llama-init&lt;/strong&gt;: a one-shot container that downloads a Gemma 4 E2B GGUF (q4_0, ~4.3 GB, resumable) into a named volume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;llama&lt;/strong&gt;: a llama.cpp server with a 16K context window on port 8080&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;neomind&lt;/strong&gt;: waits for the model server to become healthy, then &lt;em&gt;auto-registers it as an AI backend&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's right: &lt;code&gt;docker compose up -d&lt;/code&gt; gives you an IoT platform with a fully local, no-API-key LLM attached. On constrained hardware you'll want a small model — Gemma's E2B variant is built exactly for edge devices, where 7B+ models typically crawl at 1-2 tokens/second on CPU-only boards. First boot downloads the model; every restart after that reuses the volume.&lt;/p&gt;

&lt;p&gt;To disable local AI, delete or rename the override file — the core platform runs fine without it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The operations checklist
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9rml4w0liaumlqppaejm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9rml4w0liaumlqppaejm.jpg" alt="Day-2 operations: health checks, updates, monitoring" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few things that make day-2 operations painless:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reverse proxy / TLS.&lt;/strong&gt; Put nginx or Caddy in front of port 9375 for TLS. The install script has &lt;code&gt;USE_NGINX=1&lt;/code&gt; for this. Keep port 1883 (MQTT) firewalled to your device VLAN — device traffic should never traverse your public ingress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Updates.&lt;/strong&gt; Bare metal: re-run the install script (it resolves the latest release automatically) and &lt;code&gt;sudo systemctl restart neomind&lt;/code&gt;. Docker: &lt;code&gt;docker compose pull &amp;amp;&amp;amp; docker compose up -d&lt;/code&gt; — the compose file sets &lt;code&gt;pull_policy: always&lt;/code&gt;. Because all state lives in one place (&lt;code&gt;/var/lib/neomind&lt;/code&gt; bare metal, &lt;code&gt;neomind-data&lt;/code&gt; volume in Docker), updates are just "replace binary/image, keep data directory". Back up that one directory and you have everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring.&lt;/strong&gt; The &lt;code&gt;/api/health&lt;/code&gt; endpoint is your liveness probe; &lt;code&gt;journalctl -u neomind&lt;/code&gt; (or &lt;code&gt;docker compose logs -f neomind&lt;/code&gt;) is your log stream. &lt;code&gt;MemoryMax=2G&lt;/code&gt; in the systemd unit keeps resource surprises out of your dashboards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secrets.&lt;/strong&gt; In Docker, set &lt;code&gt;NEOMIND_JWT_SECRET&lt;/code&gt; for stable auth across restarts and &lt;code&gt;NEOMIND_ENCRYPTION_KEY&lt;/code&gt; for persistent data encryption — both documented in the compose file. On bare metal, drop them into an override env file rather than editing the unit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Single binary, small ops team
&lt;/h2&gt;

&lt;p&gt;The recurring theme in NeoMind's deployment story is &lt;em&gt;fewer moving parts&lt;/em&gt;. No external broker, no external database, no separate web server. One process with a hard memory cap, one data directory to back up, two ports to firewall. When your "site" is a cabinet in a building you visit twice a year, boring is a feature.&lt;/p&gt;

&lt;p&gt;If you run edge gateways — or you're evaluating what an on-prem AI + IoT stack looks like without cloud lock-in — give it a spin and tell the maintainers what breaks: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Deployment details in this article reflect the NeoMind repository at commit c0306de44d11 (release v0.9.18).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>iot</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Edge AI vs Cloud AI: What Running LLMs Locally Actually Costs in 2026</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Wed, 19 Aug 2026 11:14:17 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/edge-ai-vs-cloud-ai-what-running-llms-locally-actually-costs-in-2026-5ch8</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/edge-ai-vs-cloud-ai-what-running-llms-locally-actually-costs-in-2026-5ch8</guid>
      <description>&lt;h1&gt;
  
  
  Edge AI vs Cloud AI: What Running LLMs Locally Actually Costs in 2026
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;(Based on NeoMind v0.9.18, commit &lt;code&gt;c0306de44d11&lt;/code&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The open-weight LLM landscape has transformed in 2026. Models that once required datacenter GPUs now run on a Raspberry Pi. Qwen3 8B leads the 8B tier with dual-mode thinking and 128K context. Google's Gemma 4 12B brings multimodal understanding to a single consumer GPU. Microsoft's Phi-4-mini fits world-class reasoning into 3.8 billion parameters and 3GB of RAM.&lt;/p&gt;

&lt;p&gt;For IoT deployments, this means a fundamental question has a new answer: &lt;strong&gt;do you still need the cloud?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article breaks down the real economics of edge AI vs cloud AI for IoT in 2026, using NeoMind (an open-source Rust-based edge AI platform) as the reference implementation. We'll compare hardware costs, API bills, latency, privacy implications, and total cost of ownership across three deployment scales.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 2026 Local LLM Landscape
&lt;/h2&gt;

&lt;p&gt;Before comparing costs, here's what's actually available to run on your hardware today:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Parameters&lt;/th&gt;
&lt;th&gt;RAM (Q4)&lt;/th&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;License&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Phi-4-mini&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3.8B&lt;/td&gt;
&lt;td&gt;~3 GB&lt;/td&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;MIT&lt;/td&gt;
&lt;td&gt;Reasoning, math, constrained hardware&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Qwen3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;8B&lt;/td&gt;
&lt;td&gt;~6-7 GB&lt;/td&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;Multilingual, coding, daily driver&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemma 4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;12B&lt;/td&gt;
&lt;td&gt;~7 GB&lt;/td&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;Multimodal, general purpose&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Qwen3.6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;27B&lt;/td&gt;
&lt;td&gt;~16 GB&lt;/td&gt;
&lt;td&gt;262K&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;Coding (77.2 SWE-bench), complex analysis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemma 4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;31B&lt;/td&gt;
&lt;td&gt;~19 GB&lt;/td&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;High-quality general + vision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mistral Small 4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;119B MoE&lt;/td&gt;
&lt;td&gt;~71 GB&lt;/td&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;Server-class, 22B active params&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For edge IoT, the sweet spot is 3B–14B parameters: enough intelligence for device monitoring, anomaly detection, and natural language control, while fitting on hardware that costs $200–$500.&lt;/p&gt;

&lt;p&gt;NeoMind v0.9.18 supports all of these through its &lt;strong&gt;llama.cpp backend&lt;/strong&gt; (recommended for edge) plus Ollama, OpenAI, Anthropic, Google, DeepSeek, Qwen, GLM, MiniMax, and any OpenAI-compatible endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 1: Smart Building (50 Devices)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;: 50 sensors (temperature, humidity, occupancy, CO2), 10 smart switches, 5 cameras. One building, one edge server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud AI Approach
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Component&lt;/th&gt;
&lt;th&gt;Monthly&lt;/th&gt;
&lt;th&gt;Annual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud LLM API (GPT-4o-mini at ~10K queries/day)&lt;/td&gt;
&lt;td&gt;$45&lt;/td&gt;
&lt;td&gt;$540&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud hosting (data ingestion + processing)&lt;/td&gt;
&lt;td&gt;$80&lt;/td&gt;
&lt;td&gt;$960&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth (sensor data upload, ~50GB/month)&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$180&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data storage (time-series, growing)&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;$240&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$160&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,920&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Latency: 200-800ms per AI query (round-trip to cloud API).&lt;/p&gt;

&lt;p&gt;Privacy: All sensor data transmitted to and stored on third-party servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edge AI Approach (NeoMind + Local LLM)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Component&lt;/th&gt;
&lt;th&gt;One-Time&lt;/th&gt;
&lt;th&gt;Annual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hardware (Intel NUC i5, 16GB RAM)&lt;/td&gt;
&lt;td&gt;$350&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NeoMind software&lt;/td&gt;
&lt;td&gt;$0 (Apache 2.0)&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3 8B model&lt;/td&gt;
&lt;td&gt;$0 (Apache 2.0)&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Electricity (~15W continuous)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintenance (estimated)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Year 1 Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$413&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Year 2+ Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$63/year&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Latency: 15-50ms per AI query (local inference).&lt;/p&gt;

&lt;p&gt;Privacy: All data stays on-premises. Zero external transmission.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Break-even: 3 months.&lt;/strong&gt; After the initial hardware investment, edge AI costs 97% less annually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 2: Factory Floor (500 Devices)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;: 500 sensors across 5 production lines, 50 actuators, 20 cameras with vision AI. Needs YOLO object detection + LLM-powered analysis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud AI Approach
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Component&lt;/th&gt;
&lt;th&gt;Monthly&lt;/th&gt;
&lt;th&gt;Annual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud LLM API (50K queries/day, mixed models)&lt;/td&gt;
&lt;td&gt;$380&lt;/td&gt;
&lt;td&gt;$4,560&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vision API (camera analysis, ~100K images/month)&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;$2,400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud infrastructure (streaming + processing)&lt;/td&gt;
&lt;td&gt;$300&lt;/td&gt;
&lt;td&gt;$3,600&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth (industrial telemetry, ~500GB/month)&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;$1,200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$980&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$11,760&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Edge AI Approach (NeoMind + Local Models)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Component&lt;/th&gt;
&lt;th&gt;One-Time&lt;/th&gt;
&lt;th&gt;Annual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hardware (2× workstation, RTX 4090 each)&lt;/td&gt;
&lt;td&gt;$6,000&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NeoMind + Extensions&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.6 27B (analysis) + Phi-4-mini (monitoring)&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;YOLO Video extension (camera analysis)&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Electricity (~400W combined)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$350&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Year 1 Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$6,350&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Year 2+ Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$350/year&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Break-even: 7 months.&lt;/strong&gt; And you get sub-50ms inference for safety-critical responses.&lt;/p&gt;

&lt;p&gt;The factory scenario is where edge AI's advantage becomes decisive. Vision processing alone — 100K images/month through a cloud API — costs $2,400/year. With NeoMind's YOLO Video extension running locally on the RTX 4090, that cost drops to zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 3: Smart Campus (5000+ Devices, Multi-Site)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;: 5 buildings, 5000+ sensors, 200 cameras, industrial HVAC and access control. Multiple NeoMind instances (one per building).&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud AI Approach
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Component&lt;/th&gt;
&lt;th&gt;Monthly&lt;/th&gt;
&lt;th&gt;Annual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud LLM API (500K queries/day)&lt;/td&gt;
&lt;td&gt;$3,500&lt;/td&gt;
&lt;td&gt;$42,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vision + analytics&lt;/td&gt;
&lt;td&gt;$2,000&lt;/td&gt;
&lt;td&gt;$24,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud infrastructure&lt;/td&gt;
&lt;td&gt;$1,500&lt;/td&gt;
&lt;td&gt;$18,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth (5TB/month)&lt;/td&gt;
&lt;td&gt;$500&lt;/td&gt;
&lt;td&gt;$6,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$7,500&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$90,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Edge AI Approach (NeoMind Multi-Instance)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Component&lt;/th&gt;
&lt;th&gt;One-Time&lt;/th&gt;
&lt;th&gt;Annual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hardware (5× workstations + networking)&lt;/td&gt;
&lt;td&gt;$25,000&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NeoMind (5 instances)&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Electricity (~2kW combined)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$1,750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IT maintenance (estimated)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$5,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Year 1 Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$31,750&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Year 2+ Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$6,750/year&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Break-even: 5 months.&lt;/strong&gt; Annual savings of $83,250 from Year 2 onward.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvc14fl9k5316gtv3gbrp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvc14fl9k5316gtv3gbrp.jpg" alt="Edge AI vs Cloud AI Cost Trends" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Costs of Cloud AI
&lt;/h2&gt;

&lt;p&gt;The raw numbers above don't capture several costs that materialize over time:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Data Egress Fees&lt;/strong&gt;&lt;br&gt;
Cloud providers charge $0.05–$0.12 per GB for data leaving their platform. When you need to export historical telemetry for analysis or compliance, a 5TB archive costs $250–$600 to retrieve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. API Rate Limiting&lt;/strong&gt;&lt;br&gt;
At scale, cloud LLM APIs enforce rate limits. A factory running 50 concurrent device queries might hit 429 errors during peak hours, requiring retry logic and degraded user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Compliance Overhead&lt;/strong&gt;&lt;br&gt;
GDPR, HIPAA, and industry-specific regulations often require data residency guarantees. Cloud deployments need additional legal review, data processing agreements, and potentially regional cloud instances — adding $10K–$50K in compliance costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Vendor Lock-in&lt;/strong&gt;&lt;br&gt;
Cloud AI APIs change pricing, deprecate models, and shift terms. When OpenAI retired GPT-3.5 in favor of GPT-4o-mini, thousands of deployments needed migration. With local models, you own the weights — no one can sunset your model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Latency Tax on Automation&lt;/strong&gt;&lt;br&gt;
Cloud-based AI adds 200-800ms per inference. For a rule that chains 3 AI decisions (detect anomaly → classify severity → determine action), that's 600-2400ms of pure inference latency. On a factory floor where a conveyor belt moves at 2m/s, that delay translates to 1.2-4.8 meters of unmonitored production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Cloud AI Still Wins
&lt;/h2&gt;

&lt;p&gt;Edge AI isn't universally better. Cloud retains advantages in specific scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontier model access&lt;/strong&gt;: GPT-5.4, Claude Sonnet, and other proprietary models offer capabilities that no open-weight model matches yet (though the gap narrows monthly)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Burst capacity&lt;/strong&gt;: Seasonal spikes or one-off analysis tasks that would require over-provisioning local hardware&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training and fine-tuning&lt;/strong&gt;: Large-scale model training still requires datacenter GPUs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-language at scale&lt;/strong&gt;: If you need 50+ languages at high quality, proprietary models still lead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NeoMind's architecture handles this gracefully: use local models for 95% of operations, and route complex or burst queries to cloud APIs when needed. The &lt;code&gt;cloud-optional&lt;/code&gt; design means you're never locked into either approach.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiwo0qc07he7f6mbkpy70.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiwo0qc07he7f6mbkpy70.jpg" alt="Edge AI Hardware Options" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hardware Guide: What to Buy in 2026
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Budget&lt;/th&gt;
&lt;th&gt;Hardware&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;Raspberry Pi 5 (8GB)&lt;/td&gt;
&lt;td&gt;Phi-4-mini (3.8B)&lt;/td&gt;
&lt;td&gt;Basic monitoring, alerts, simple Q&amp;amp;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$400&lt;/td&gt;
&lt;td&gt;Intel NUC i5 (16GB)&lt;/td&gt;
&lt;td&gt;Qwen3 8B&lt;/td&gt;
&lt;td&gt;Full device management, automation, natural language&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$800&lt;/td&gt;
&lt;td&gt;Mini PC + RTX 4060 (24GB)&lt;/td&gt;
&lt;td&gt;Qwen3.6 27B&lt;/td&gt;
&lt;td&gt;Complex analysis, multi-camera vision, coding tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$2,500&lt;/td&gt;
&lt;td&gt;Workstation + RTX 4090 (24GB)&lt;/td&gt;
&lt;td&gt;Gemma 4 31B&lt;/td&gt;
&lt;td&gt;Production-grade, multi-model, high-throughput&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;NeoMind's resource footprint adds ~120MB idle RAM and &amp;lt;5% CPU overhead on top of the LLM runtime. The single-process architecture means no microservice overhead — one binary handles everything from MQTT to dashboards to AI inference.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Decision Framework
&lt;/h2&gt;

&lt;p&gt;Ask these questions to determine your optimal approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is internet connectivity guaranteed?&lt;/strong&gt; If no → edge AI is mandatory, not optional&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the latency requirement?&lt;/strong&gt; If &amp;lt;100ms → edge AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Are there data residency requirements?&lt;/strong&gt; If yes → edge AI (or regional cloud, at higher cost)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the query volume?&lt;/strong&gt; If &amp;gt;10K/day → edge AI breaks even within months&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do you need frontier-model capabilities?&lt;/strong&gt; If yes → hybrid (local for routine, cloud for complex)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For most IoT deployments in 2026, the answer is &lt;strong&gt;edge-first, cloud-optional&lt;/strong&gt; — exactly the architecture NeoMind was designed for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NeoMind v0.9.18&lt;/strong&gt;: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt; (Apache 2.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wiki &amp;amp; Docs&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/product-overview/what-is-neomind" rel="noopener noreferrer"&gt;wiki.camthink.ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Minute Quick Start&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/quick-start/five-minute-guide" rel="noopener noreferrer"&gt;wiki.camthink.ai/docs/neomind/quick-start&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community&lt;/strong&gt;: &lt;a href="https://discord.gg/gkM7cc8gKb" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Stop paying per-token for data that never needed to leave your building. Run AI where your devices live.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>edgeai</category>
      <category>llm</category>
      <category>iot</category>
      <category>ai</category>
    </item>
    <item>
      <title>Running LLM Agents at the Edge: A Practical Guide with NeoMind + Ollama</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Wed, 19 Aug 2026 10:16:52 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/running-llm-agents-at-the-edge-a-practical-guide-with-neomind-ollama-nh8</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/running-llm-agents-at-the-edge-a-practical-guide-with-neomind-ollama-nh8</guid>
      <description>&lt;h1&gt;
  
  
  Running LLM Agents at the Edge: A Practical Guide with NeoMind + Ollama
&lt;/h1&gt;

&lt;p&gt;Everyone's building AI agents right now. Most of them live in the cloud — you send a request to OpenAI or Anthropic, get a response back, and hope the latency and cost stay reasonable. But what if your agent needs to control physical devices? Monitor factory sensors? Respond to security camera events in under 100ms?&lt;/p&gt;

&lt;p&gt;Cloud-based agents add 200-800ms of round-trip latency per inference call. For a conversational chatbot, that's fine. For an autonomous agent monitoring a production line, it's the difference between catching a defect and shipping it.&lt;/p&gt;

&lt;p&gt;This guide walks through building production-grade LLM agents that run &lt;strong&gt;entirely on edge hardware&lt;/strong&gt; using NeoMind + Ollama. No cloud API keys. No data leaving your network. Sub-100ms inference on a $200 device.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Build
&lt;/h2&gt;

&lt;p&gt;By the end of this guide, you'll have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A local LLM agent that monitors IoT device telemetry in real-time&lt;/li&gt;
&lt;li&gt;Natural language interaction with your agent via chat&lt;/li&gt;
&lt;li&gt;Autonomous decision-making based on sensor data patterns&lt;/li&gt;
&lt;li&gt;Multi-tier memory so the agent learns your environment over time&lt;/li&gt;
&lt;li&gt;Zero cloud dependency — everything runs on your LAN&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardware&lt;/strong&gt;: Any x86_64 or ARM64 machine with ≥8GB RAM (Raspberry Pi 5, Intel NUC, old laptop all work)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OS&lt;/strong&gt;: Linux (Ubuntu 22.04+), macOS, or Windows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPU&lt;/strong&gt;: Optional but recommended. Ollama runs on CPU for smaller models (7B), but 13B+ benefits from GPU acceleration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NeoMind&lt;/strong&gt;: The edge AI platform (handles device connectivity, automation, UI)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt;: The local LLM runtime (handles model serving and inference)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Install NeoMind + Ollama
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install Ollama
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ollama.com/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pull a model suited to your hardware:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hardware&lt;/th&gt;
&lt;th&gt;Recommended Model&lt;/th&gt;
&lt;th&gt;VRAM/RAM Needed&lt;/th&gt;
&lt;th&gt;Inference Speed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Raspberry Pi 5 (8GB)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;llama3.2:3b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~4 GB&lt;/td&gt;
&lt;td&gt;~8 tokens/sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intel NUC (16GB)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;llama3.1:8b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~6 GB&lt;/td&gt;
&lt;td&gt;~15 tokens/sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPU (RTX 3060+)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;llama3.1:70b&lt;/code&gt; (Q4)&lt;/td&gt;
&lt;td&gt;~12 GB VRAM&lt;/td&gt;
&lt;td&gt;~40 tokens/sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Apple Silicon (M1+)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;llama3.1:8b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~8 GB unified&lt;/td&gt;
&lt;td&gt;~25 tokens/sec&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull llama3.1:8b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install NeoMind
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/camthink-ai/NeoMind/main/scripts/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure NeoMind to Use Ollama
&lt;/h3&gt;

&lt;p&gt;Edit NeoMind's config (typically &lt;code&gt;~/.config/neomind/config.toml&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[ai]&lt;/span&gt;
&lt;span class="py"&gt;backend&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ollama"&lt;/span&gt;
&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"llama3.1:8b"&lt;/span&gt;
&lt;span class="py"&gt;api_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"http://localhost:11434"&lt;/span&gt;
&lt;span class="py"&gt;max_tokens&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2048&lt;/span&gt;
&lt;span class="py"&gt;temperature&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start NeoMind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;neomind start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the web UI at &lt;code&gt;http://localhost:9375&lt;/code&gt; and you'll see the AI chat panel ready to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Connect Your First Device
&lt;/h2&gt;

&lt;p&gt;Before the agent can monitor anything, it needs devices to talk to. NeoMind supports MQTT, BLE, and Webhook protocols out of the box.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simulate a Device (for Testing)
&lt;/h3&gt;

&lt;p&gt;If you don't have physical IoT devices yet, use NeoMind's device simulator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;neomind device simulate &lt;span class="nt"&gt;--type&lt;/span&gt; temperature-sensor &lt;span class="nt"&gt;--interval&lt;/span&gt; 5s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a virtual temperature sensor that publishes readings to NeoMind's embedded MQTT broker every 5 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connect a Real Device
&lt;/h3&gt;

&lt;p&gt;For real devices, configure MQTT in NeoMind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[mqtt]&lt;/span&gt;
&lt;span class="py"&gt;enabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;port&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1883&lt;/span&gt;
&lt;span class="c"&gt;# Devices connect to neomind-host:1883&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use the auto-discovery feature — plug in a USB IoT gateway and NeoMind will detect and register it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Build Your First Autonomous Agent
&lt;/h2&gt;

&lt;p&gt;Here's where it gets interesting. Instead of just chatting with the AI, we'll create an agent that &lt;strong&gt;autonomously monitors devices and takes action&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Define the Agent's Mission
&lt;/h3&gt;

&lt;p&gt;In NeoMind's web UI, navigate to AI → Agents → New Agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Temperature&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Guardian"&lt;/span&gt;
&lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;every&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;minutes"&lt;/span&gt;
&lt;span class="na"&gt;mission&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;You are monitoring temperature sensors across a building.&lt;/span&gt;
  &lt;span class="s"&gt;Your responsibilities:&lt;/span&gt;
  &lt;span class="s"&gt;1. Check all temperature readings from the last 5 minutes&lt;/span&gt;
  &lt;span class="s"&gt;2. Flag any reading above 28°C or below 16°C as anomalous&lt;/span&gt;
  &lt;span class="s"&gt;3. If a sensor shows 3+ consecutive anomalous readings, alert the operator&lt;/span&gt;
  &lt;span class="s"&gt;4. Log a summary of findings to the knowledge base&lt;/span&gt;

&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;query_device_metrics&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;send_notification&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;update_knowledge_base&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What Happens at Runtime
&lt;/h3&gt;

&lt;p&gt;Every 5 minutes, NeoMind's agent runtime:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Wakes the agent&lt;/strong&gt; and injects the current context (device states, recent history, knowledge base entries)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runs inference&lt;/strong&gt; via Ollama — the LLM analyzes the data and decides what actions to take&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Executes tool calls&lt;/strong&gt; — the agent queries specific device metrics, sends notifications if thresholds are breached, and updates its memory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Goes back to sleep&lt;/strong&gt; until the next cycle
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────────────┐
│            Agent Runtime Loop                     │
│                                                   │
│  ┌─────────┐    ┌──────────┐    ┌─────────────┐  │
│  │ Wake +  │───►│ LLM      │───►│ Execute     │  │
│  │ Inject  │    │ Inference│    │ Tool Calls  │  │
│  │ Context │    │ (Ollama) │    │ (typed)     │  │
│  └─────────┘    └──────────┘    └──────┬──────┘  │
│                                        │         │
│  ┌─────────────────────────────────────▼──────┐  │
│  │  Memory Update + Sleep until next cycle    │  │
│  └────────────────────────────────────────────┘  │
└──────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Type-Safe Tool Dispatch
&lt;/h3&gt;

&lt;p&gt;A critical design decision: NeoMind's agent tools are &lt;strong&gt;not&lt;/strong&gt; string-based function calls. When the LLM decides to "query device temperature," it produces a structured command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The LLM output is deserialized into a typed enum&lt;/span&gt;
&lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;AgentToolCall&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;QueryDeviceMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;since&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;SendNotification&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;severity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Severity&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;UpdateKnowledgeBase&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;ControlDevice&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;DeviceAction&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Dispatch is a type-safe match — no eval(), no shell exec&lt;/span&gt;
&lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;tool_call&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;AgentToolCall&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;QueryDeviceMetrics&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;since&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;readings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;device_manager&lt;/span&gt;&lt;span class="nf"&gt;.query_range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;since&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;ToolResult&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;MetricReadings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;readings&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This eliminates injection attacks, hallucinated command strings, and the fragile JSON-to-shell pipelines that plague other agent frameworks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Multi-Tier Memory — Making the Agent Learn
&lt;/h2&gt;

&lt;p&gt;A stateless agent is just a fancy cron job. NeoMind's memory system gives your agent &lt;strong&gt;persistent context&lt;/strong&gt; across sessions:&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory Tiers
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Retention&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Profile&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;User preferences and environment&lt;/td&gt;
&lt;td&gt;"Operator prefers Celsius, works 8AM-6PM"&lt;/td&gt;
&lt;td&gt;Permanent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Knowledge&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Accumulated domain facts&lt;/td&gt;
&lt;td&gt;"Server room #3 runs 2°C hotter than average"&lt;/td&gt;
&lt;td&gt;Long-term&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Current mission state&lt;/td&gt;
&lt;td&gt;"Monitoring anomaly on sensor-07 since 14:30"&lt;/td&gt;
&lt;td&gt;Per-task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Session&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Active conversation context&lt;/td&gt;
&lt;td&gt;"User just asked about yesterday's temperature trends"&lt;/td&gt;
&lt;td&gt;Per-session&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxr4nt2ct9vo3lpk3ibif.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxr4nt2ct9vo3lpk3ibif.jpg" alt="Multi-Tier Memory System" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Automatic Memory Extraction
&lt;/h3&gt;

&lt;p&gt;The agent doesn't need explicit "save this" commands. NeoMind's memory engine automatically extracts and compresses important information from agent interactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent observes: "Sensor-07 has shown elevated readings (29.1°C, 29.4°C, 28.8°C) 
                 for the last 3 cycles. This is above the 28°C threshold."

→ Auto-extracted to Knowledge Base:
  "Sensor-07 recurring thermal anomaly, first detected 2026-08-19T14:30Z,
   readings consistently 28-30°C, may indicate HVAC issue in Zone 3"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Memory Compression
&lt;/h3&gt;

&lt;p&gt;Long-running agents accumulate massive context. NeoMind compresses memory using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temporal deduplication&lt;/strong&gt; — merge repeated observations into time ranges&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Importance scoring&lt;/strong&gt; — prioritize security events over routine readings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hierarchical summarization&lt;/strong&gt; — compress daily summaries into weekly overviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This keeps the context window manageable even after months of operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Natural Language Interaction
&lt;/h2&gt;

&lt;p&gt;While the autonomous agent runs in the background, you can also chat with it conversationally:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;: "What's the situation with sensor-07?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent&lt;/strong&gt;: "Sensor-07 in Zone 3 has been running hot since yesterday at 14:30. Readings have been consistently 28-30°C, which is 4-6°C above the zone average of 24°C. I've logged 12 anomalous readings. Based on the pattern, this looks like an HVAC degradation rather than a transient spike. Want me to create a maintenance ticket?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;: "Yes, and also set up hourly monitoring for the next 48 hours"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent&lt;/strong&gt;: "Done. I've created a maintenance ticket for Zone 3 HVAC inspection and scheduled myself for hourly checks on sensor-07 through August 21st. I'll alert you immediately if readings exceed 32°C."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent's response is grounded in its &lt;strong&gt;actual memory and device data&lt;/strong&gt; — not hallucinated. NeoMind enforces this by injecting only verified data into the LLM context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Benchmarking — Real Numbers
&lt;/h2&gt;

&lt;p&gt;Here's what we measured on common edge hardware running &lt;code&gt;llama3.1:8b&lt;/code&gt; via Ollama:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Raspberry Pi 5&lt;/th&gt;
&lt;th&gt;Intel NUC i5&lt;/th&gt;
&lt;th&gt;Apple M1&lt;/th&gt;
&lt;th&gt;RTX 3060&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First token latency&lt;/td&gt;
&lt;td&gt;1,200ms&lt;/td&gt;
&lt;td&gt;400ms&lt;/td&gt;
&lt;td&gt;350ms&lt;/td&gt;
&lt;td&gt;150ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tokens/sec (gen)&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full agent cycle (5 devices)&lt;/td&gt;
&lt;td&gt;6s&lt;/td&gt;
&lt;td&gt;2.5s&lt;/td&gt;
&lt;td&gt;1.8s&lt;/td&gt;
&lt;td&gt;0.9s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAM usage (idle)&lt;/td&gt;
&lt;td&gt;4.2 GB&lt;/td&gt;
&lt;td&gt;3.8 GB&lt;/td&gt;
&lt;td&gt;3.5 GB&lt;/td&gt;
&lt;td&gt;3.2 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAM usage (inference)&lt;/td&gt;
&lt;td&gt;6.1 GB&lt;/td&gt;
&lt;td&gt;5.4 GB&lt;/td&gt;
&lt;td&gt;5.0 GB&lt;/td&gt;
&lt;td&gt;4.8 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Agent cycle&lt;/strong&gt; = wake + context injection + inference + tool execution + memory update.&lt;/p&gt;

&lt;p&gt;For comparison, the same agent using OpenAI's &lt;code&gt;gpt-4o-mini&lt;/code&gt; API (cloud) adds ~800ms of network latency per inference call, plus $0.15 per 1M input tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced: Skill-Based Agent Customization
&lt;/h2&gt;

&lt;p&gt;NeoMind's &lt;strong&gt;Skill System&lt;/strong&gt; lets you fine-tune agent behavior without retraining:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# skills/factory-safety.yaml&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Factory&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Floor&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Safety&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Monitor"&lt;/span&gt;
&lt;span class="na"&gt;trigger&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;scheduled:every&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;2&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;minutes"&lt;/span&gt;
&lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;You are a safety monitor for an industrial facility.&lt;/span&gt;

  &lt;span class="s"&gt;Critical rules (NEVER override):&lt;/span&gt;
  &lt;span class="s"&gt;- If CO2 &amp;gt; 1000ppm in any zone, immediately alert + activate ventilation&lt;/span&gt;
  &lt;span class="s"&gt;- If temperature &amp;gt; 45°C near equipment, trigger emergency shutdown&lt;/span&gt;
  &lt;span class="s"&gt;- If unauthorized motion detected after 22:00, alert security&lt;/span&gt;

  &lt;span class="s"&gt;Normal operations:&lt;/span&gt;
  &lt;span class="s"&gt;- Log all readings to knowledge base&lt;/span&gt;
  &lt;span class="s"&gt;- Flag anomalies (&amp;gt;2σ from 7-day rolling average)&lt;/span&gt;
  &lt;span class="s"&gt;- Generate daily safety summary at 18:00&lt;/span&gt;

&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;query_device_metrics&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;send_notification&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;control_device&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;update_knowledge_base&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Skills are YAML + Markdown files that the agent runtime injects into the LLM context. They provide guardrails and domain knowledge without requiring model fine-tuning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with a smaller model&lt;/strong&gt; — &lt;code&gt;llama3.2:3b&lt;/code&gt; is fast enough for monitoring tasks and leaves headroom for the OS and NeoMind services&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use GPU offloading selectively&lt;/strong&gt; — if you have a GPU, use it for the agent inference while keeping NeoMind's core services on CPU&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set memory limits&lt;/strong&gt; — configure &lt;code&gt;max_knowledge_entries&lt;/code&gt; and &lt;code&gt;max_session_history&lt;/code&gt; to prevent memory bloat on long-running deployments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor agent cycles&lt;/strong&gt; — NeoMind's dashboard shows agent execution time, token usage, and tool call success rates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layer models&lt;/strong&gt; — use a fast small model for routine monitoring and a larger model (or cloud API) for complex analysis tasks&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Edge AI Stack, Simplified
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│              Your Edge Device                │
│                                              │
│  ┌──────────┐  ┌──────────┐  ┌───────────┐  │
│  │ NeoMind  │  │  Ollama  │  │  IoT      │  │
│  │ Platform │──│  LLM     │──│  Devices  │  │
│  │          │  │  Runtime │  │  (MQTT)   │  │
│  └──────────┘  └──────────┘  └───────────┘  │
│                                              │
│  Everything local. Zero cloud dependency.    │
└─────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fligx42y2of03y7cnwb22.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fligx42y2of03y7cnwb22.jpg" alt="Edge AI Stack" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's the entire stack. Two components. One machine. No Kubernetes, no service mesh, no cloud account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NeoMind&lt;/strong&gt;: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt; (Apache 2.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt;: &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;ollama.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick Start Guide&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/quick-start/five-minute-guide" rel="noopener noreferrer"&gt;wiki.camthink.ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community&lt;/strong&gt;: &lt;a href="https://discord.gg/gkM7cc8gKb" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Run your AI agents where your data lives — at the edge. No cloud required.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>llm</category>
      <category>edgeai</category>
    </item>
    <item>
      <title>Connecting 3000+ Smart Home Devices to Edge AI: Building a Home Assistant Bridge with NeoMind</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Tue, 18 Aug 2026 09:50:51 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/connecting-3000-smart-home-devices-to-edge-ai-building-a-home-assistant-bridge-with-neomind-1gek</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/connecting-3000-smart-home-devices-to-edge-ai-building-a-home-assistant-bridge-with-neomind-1gek</guid>
      <description>&lt;h1&gt;
  
  
  Connecting 3000+ Smart Home Devices to Edge AI: Building a Home Assistant Bridge with NeoMind
&lt;/h1&gt;

&lt;p&gt;Home Assistant is the undisputed king of open-source home automation. It supports over 3000 integrations — from Philips Hue bulbs to Tesla Powerwalls to Daikin heat pumps. But there's a gap that no integration can fill: &lt;strong&gt;intelligence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Home Assistant can tell you "the living room temperature is 24°C." It can't tell you "based on the last 3 weeks of occupancy patterns, your HVAC is running 40% longer than needed, and here's a schedule adjustment that would save you $18/month."&lt;/p&gt;

&lt;p&gt;That's where NeoMind comes in. Its Home Assistant bridge imports every entity from your HA instance, feeds them to an LLM-powered AI agent running on your local hardware, and lets you interact with your entire smart home through natural language — no cloud, no subscription, no data leaving your network.&lt;/p&gt;

&lt;p&gt;Here's how it works, what you can build, and the technical details under the hood.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture: HA as the Device Layer, NeoMind as the Brain
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ex72q1fie0thhyxgox2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ex72q1fie0thhyxgox2.png" alt="NeoMind Platform Overview" width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────┐
│                    Your Local Network                     │
│                                                          │
│  ┌──────────────┐        ┌──────────────────────────┐   │
│  │ Home Assistant│◄──────►│  NeoMind (Edge AI)       │   │
│  │  (3000+      │  REST  │  ┌──────────────────┐    │   │
│  │  integrations)│  API   │  │ HA Bridge Ext.   │    │   │
│  └──────┬───────┘        │  │ Entity Import    │    │   │
│         │                │  │ State Sync       │    │   │
│  ┌──────┴───────┐        │  │ Command Dispatch │    │   │
│  │ Your Devices │        │  └────────┬─────────┘    │   │
│  │ Lights, HVAC,│        │           │               │   │
│  │ Sensors, ... │        │  ┌────────▼─────────┐    │   │
│  └──────────────┘        │  │ AI Agent Runtime │    │   │
│                          │  │ LLM + Memory     │    │   │
│                          │  │ + Automation     │    │   │
│                          │  └──────────────────┘    │   │
│                          └──────────────────────────┘   │
└─────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bridge is &lt;strong&gt;bidirectional&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HA → NeoMind&lt;/strong&gt;: All entities (sensors, switches, lights, climate, cameras, etc.) are imported with their current states, attributes, and history. NeoMind sees your entire home as a structured data model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NeoMind → HA&lt;/strong&gt;: AI-generated commands flow back through the HA REST API. "Turn off everything on the ground floor after midnight" becomes a series of precise service calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setup: 5 Minutes to a Smarter Home
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install NeoMind
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/camthink-ai/NeoMind/main/scripts/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you already have NeoMind running, skip to step 2.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Enable the Home Assistant Extension
&lt;/h3&gt;

&lt;p&gt;In NeoMind's web UI (&lt;a href="http://localhost:9375" rel="noopener noreferrer"&gt;http://localhost:9375&lt;/a&gt;), navigate to Extensions → Marketplace and enable "Home Assistant Bridge." Or via the config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[extensions.home_assistant]&lt;/span&gt;
&lt;span class="py"&gt;enabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"http://homeassistant.local:8123"&lt;/span&gt;
&lt;span class="py"&gt;token&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"your-long-lived-access-token"&lt;/span&gt;
&lt;span class="py"&gt;sync_interval&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;  &lt;span class="c"&gt;# seconds between state refreshes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate a long-lived access token in Home Assistant: Profile → Security → Long-Lived Access Tokens.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Configure Your LLM Backend
&lt;/h3&gt;

&lt;p&gt;For fully local AI (recommended for privacy):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[ai]&lt;/span&gt;
&lt;span class="py"&gt;backend&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ollama"&lt;/span&gt;
&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"llama3.1:8b"&lt;/span&gt;
&lt;span class="py"&gt;api_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"http://localhost:11434"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or connect to a cloud model for more capable reasoning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[ai]&lt;/span&gt;
&lt;span class="py"&gt;backend&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"openai"&lt;/span&gt;
&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"gpt-4o-mini"&lt;/span&gt;
&lt;span class="py"&gt;api_key&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"sk-..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Start Talking to Your Home
&lt;/h3&gt;

&lt;p&gt;Open the NeoMind chat interface and start asking questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;: "What's the energy consumption looking like today?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NeoMind&lt;/strong&gt;: "Your home has used 14.2 kWh so far today, which is 12% above your daily average. The main contributors are the HVAC (6.8 kWh, running since 6 AM due to the cold snap) and the EV charger (4.1 kWh, charging the Tesla from 32% to 78%)."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;: "Can you optimize the HVAC schedule for this week?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NeoMind&lt;/strong&gt;: "Based on your occupancy patterns over the last 14 days, nobody is home between 8:30 AM and 5:15 PM on weekdays. I can create an automation rule that sets the thermostat to eco mode (18°C) during those hours and pre-heats to 22°C at 4:45 PM. Estimated savings: ~$22/week. Shall I create this rule?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Entity Import: How 3000+ Devices Become AI-Readable
&lt;/h2&gt;

&lt;p&gt;When the bridge connects to Home Assistant, it imports the full entity registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simplified: what NeoMind sees for each HA entity&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;HomeAssistantEntity&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;entity_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// "light.living_room_main"&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;              &lt;span class="c1"&gt;// "light"&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;friendly_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;// "Living Room Main Light"&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;               &lt;span class="c1"&gt;// "on" / "off" / "24.5"&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;attributes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;HashMap&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// brightness, color_temp, etc.&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;area&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// "Living Room"&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;device_class&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// "temperature" / "humidity" / etc.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AI agent uses this structured model to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Answer questions&lt;/strong&gt; — "Which lights are currently on?" queries the state of all &lt;code&gt;light.*&lt;/code&gt; entities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyze patterns&lt;/strong&gt; — "How has the bedroom humidity changed over the past week?" reads time-series data from &lt;code&gt;sensor.bedroom_humidity&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create automations&lt;/strong&gt; — "Turn off all lights when the last person leaves" combines &lt;code&gt;person.*&lt;/code&gt; presence with &lt;code&gt;light.*&lt;/code&gt; control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suggest optimizations&lt;/strong&gt; — "Your bathroom fan runs 6 hours daily but humidity rarely exceeds 55%" identifies waste&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdltqjr8etqziwwiqmeo1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdltqjr8etqziwwiqmeo1.png" alt="AI Chat Interface" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Natural Language → HA Service Calls
&lt;/h2&gt;

&lt;p&gt;The most powerful feature is turning conversational intent into precise Home Assistant service calls. Here's what happens when you say "Dim the living room to 30% and turn on the reading lamp":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;User Input: "Dim the living room to 30% and turn on the reading lamp"
    │
    ▼
AI Agent parses intent into structured commands:
    │
    ├── Command 1: light.turn_on
    │   entity_id: light.living_room_main
    │   brightness_pct: 30
    │
    └── Command 2: light.turn_on
        entity_id: light.reading_lamp
    │
    ▼
HA Bridge dispatches via REST API:
    POST http://ha:8123/api/services/light/turn_on
    {"entity_id": "light.living_room_main", "brightness_pct": 30}
    POST http://ha:8123/api/services/light/turn_on
    {"entity_id": "light.reading_lamp"}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't regex matching or keyword spotting. The LLM understands context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Turn off the kitchen" → resolves to all entities in the "Kitchen" area&lt;/li&gt;
&lt;li&gt;"Set the thermostat to what it was yesterday morning" → looks up historical state&lt;/li&gt;
&lt;li&gt;"If the garage door is open after 10 PM, close it and notify me" → creates an automation rule with condition + action + notification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuuj89m5sp3i6dvespipg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuuj89m5sp3i6dvespipg.png" alt="Automation Rules Engine" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automation Rules: Beyond HA's Native Automations
&lt;/h2&gt;

&lt;p&gt;Home Assistant's YAML automations are powerful but verbose. NeoMind lets you create them conversationally:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;: "Every weekday at 7 AM, if it's raining, turn on the entryway light and send me a reminder to bring an umbrella"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;NeoMind generates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Rainy Morning Routine"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"condition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"operator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"and"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"conditions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"time"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"operator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"equals"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"07:00"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"time"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"operator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"day_of_week"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"tue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"wed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"thu"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"fri"&lt;/span&gt;&lt;span class="p"&gt;]},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"device:weather.home:condition"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"operator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"equals"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rainy"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ha_service"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"light.turn_on"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"entity_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"light.entryway"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"notify"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"channel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"push"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Rainy morning — don't forget your umbrella!"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cooldown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;86400&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rule runs in NeoMind's engine — not in HA's automation system — which means it can incorporate AI analysis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Smart Energy Saver"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"trigger"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"schedule"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"interval"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1h"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ai_agent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Analyze the last hour of energy consumption. If any device used more than 2x its typical hourly average, explain why and suggest whether it should be turned off or scheduled differently."&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Multi-Room Voice Control Without the Cloud
&lt;/h2&gt;

&lt;p&gt;Combine NeoMind's Home Assistant bridge with the voice extensions (CosyVoice TTS + multilingual ASR) for a fully local voice assistant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Hey NeoMind, what's the air quality in the bedroom?"
    │
    ▼ (local ASR → text)
    │
    ▼ (AI Agent → query sensor.bedroom_air_quality)
    │
    ▼ (LLM generates natural response)
    │
    ▼ (local TTS → audio)
    │
"The bedroom AQI is 42 — good air quality. The PM2.5 level dropped significantly 
after you turned on the purifier at 3 PM."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No Alexa. No Google. No audio sent to the cloud. Everything runs on your hardware.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Forjy7xa8eijxswivn9nd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Forjy7xa8eijxswivn9nd.png" alt="Extensions Marketplace" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Scaling: From a Studio Apartment to a Smart Campus
&lt;/h2&gt;

&lt;p&gt;The bridge handles anything Home Assistant supports:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scale&lt;/th&gt;
&lt;th&gt;Entities&lt;/th&gt;
&lt;th&gt;NeoMind Performance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Studio&lt;/td&gt;
&lt;td&gt;~20 entities&lt;/td&gt;
&lt;td&gt;&amp;lt; 50ms response, ~80MB RAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-bedroom house&lt;/td&gt;
&lt;td&gt;~150 entities&lt;/td&gt;
&lt;td&gt;&amp;lt; 100ms response, ~150MB RAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large villa&lt;/td&gt;
&lt;td&gt;~500 entities&lt;/td&gt;
&lt;td&gt;&amp;lt; 200ms response, ~300MB RAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small office&lt;/td&gt;
&lt;td&gt;~1500 entities&lt;/td&gt;
&lt;td&gt;&amp;lt; 500ms response, ~600MB RAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smart campus (multi-HA)&lt;/td&gt;
&lt;td&gt;~5000+ entities&lt;/td&gt;
&lt;td&gt;Run multiple NeoMind instances, one per HA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For multi-site deployments, each NeoMind instance connects to its own Home Assistant, and you coordinate across instances through shared dashboards and cross-instance queries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy: Your Home Data Stays Home
&lt;/h2&gt;

&lt;p&gt;This is the killer feature for privacy-conscious users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No cloud processing&lt;/strong&gt; — LLM runs locally via Ollama (Llama 3, Mistral, Qwen, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No telemetry&lt;/strong&gt; — NeoMind doesn't phone home. Ever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No third-party access&lt;/strong&gt; — Your HA entities never leave your LAN&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline capable&lt;/strong&gt; — Works even when your internet is down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compare this to cloud-based smart home AI (Google Home, Alexa, etc.), where every voice command and device state is transmitted to external servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NeoMind&lt;/strong&gt;: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt; (Apache 2.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home Assistant Bridge docs&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/product-overview/what-is-neomind" rel="noopener noreferrer"&gt;wiki.camthink.ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Minute Quick Start&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/quick-start/five-minute-guide" rel="noopener noreferrer"&gt;wiki.camthink.ai/docs/neomind/quick-start&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community&lt;/strong&gt;: &lt;a href="https://discord.gg/gkM7cc8gKb" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Already running Home Assistant? Install NeoMind, enable the bridge, and ask your home a question. The AI is local, the integration is instant, and your data never leaves your network.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>iot</category>
      <category>ai</category>
      <category>smarthome</category>
    </item>
    <item>
      <title>Single-Process Architecture in Rust: Why We Rejected Microservices for an Edge AI Platform</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Mon, 17 Aug 2026 09:50:56 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/single-process-architecture-in-rust-why-we-rejected-microservices-for-an-edge-ai-platform-3he6</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/single-process-architecture-in-rust-why-we-rejected-microservices-for-an-edge-ai-platform-3he6</guid>
      <description>&lt;h1&gt;
  
  
  Single-Process Architecture in Rust: Why We Rejected Microservices for an Edge AI Platform
&lt;/h1&gt;

&lt;p&gt;In 2026, "microservices" is practically a reflex answer for any new project. Split your system into independently deployable services, orchestrate with Kubernetes, glue them with a message bus. It works — until you're deploying to a $200 edge device in a factory with no reliable internet.&lt;/p&gt;

&lt;p&gt;NeoMind is an open-source edge AI platform built in Rust that deliberately chose a &lt;strong&gt;single-process architecture&lt;/strong&gt;. One binary. One process. Everything — the HTTP API, MQTT broker, storage engine, AI agent runtime, rule engine, and extension host — running in a single OS process.&lt;/p&gt;

&lt;p&gt;This is the story of why, the trade-offs we accepted, and what we learned building it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Microservices at the Edge
&lt;/h2&gt;

&lt;p&gt;Most AI platforms today follow the microservices playbook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[API Gateway] → [Auth Service] → [Device Service] → [AI Service]
                     ↓                ↓                  ↓
               [PostgreSQL]      [TimescaleDB]      [Redis]
                     ↑                ↑                  ↑
              [Kafka/RabbitMQ] ← [Event Bus] ← [Notification Svc]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works beautifully in the cloud. But at the edge, you hit a wall:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource overhead.&lt;/strong&gt; Every microservice needs its own process, memory allocation, file descriptors, and network sockets. On a Raspberry Pi 5 with 8GB RAM, running 8 Docker containers with health checks, log aggregation, and service mesh proxies consumes 2-3GB before your application even starts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment complexity.&lt;/strong&gt; &lt;code&gt;docker-compose up&lt;/code&gt; sounds simple until you're SSH'ing into 50 factory floor devices to update certificates, debug a failing sidecar, or explain why the health-check probe is timing out on a flaky network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency accumulation.&lt;/strong&gt; A device telemetry reading that flows through Device Service → Event Bus → AI Service → Rule Engine → Notification Service touches 5 network hops. Each hop adds serialization, deserialization, and queue wait time. For real-time industrial monitoring, those milliseconds compound.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operational burden.&lt;/strong&gt; Twelve services means twelve log streams, twelve health endpoints, twelve restart policies, and twelve ways for a partial failure to cascade into a confusing debugging session at 3 AM.&lt;/p&gt;

&lt;h2&gt;
  
  
  The NeoMind Approach: One Process, Everything Inside
&lt;/h2&gt;

&lt;p&gt;NeoMind's architecture looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────┐
│                  Single Process                      │
│                                                      │
│  ┌─────────┐  ┌──────────┐  ┌───────────────────┐  │
│  │  Axum   │  │ Embedded │  │  AI Agent Runtime  │  │
│  │  HTTP   │  │  MQTT    │  │  (LLM + Memory +   │  │
│  │  Server │  │  Broker  │  │   Tools + Skills)  │  │
│  └────┬────┘  └────┬─────┘  └─────────┬─────────┘  │
│       │            │                   │             │
│  ┌────┴────────────┴───────────────────┴──────────┐  │
│  │              Event Bus (channels)               │  │
│  └────┬────────────┬───────────────────┬──────────┘  │
│       │            │                   │             │
│  ┌────┴────┐  ┌────┴─────┐  ┌────────┴──────────┐  │
│  │ Rule    │  │ Device   │  │  Extension Host    │  │
│  │ Engine  │  │ Manager  │  │  (Process-Isolated)│  │
│  └────┬────┘  └────┬─────┘  └─────────┬─────────┘  │
│       │            │                   │             │
│  ┌────┴────────────┴───────────────────┴──────────┐  │
│  │         Storage Layer (redb)                    │  │
│  │  Time-Series | State | LLM Memory | Logs       │  │
│  └────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One &lt;code&gt;cargo build --release&lt;/code&gt; produces a single binary. One &lt;code&gt;./neomind&lt;/code&gt; starts everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why redb Instead of PostgreSQL
&lt;/h2&gt;

&lt;p&gt;The storage layer uses &lt;strong&gt;redb&lt;/strong&gt;, a pure-Rust embedded key-value store inspired by LMDB. This is a deliberate rejection of the "just use Postgres" default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero external dependencies.&lt;/strong&gt; No database server to install, no connection pooling to configure, no migration runner to orchestrate. The database is a file on disk, opened by the same process that serves HTTP requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B+ tree indexes with ACID transactions.&lt;/strong&gt; redb provides serializable isolation, crash-safe writes, and efficient range scans — the same guarantees you'd expect from a traditional RDBMS, without the process overhead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time-series optimized.&lt;/strong&gt; Telemetry data from IoT devices follows a write-heavy, append-mostly pattern. redb's B+ tree handles sequential inserts efficiently, and range queries over time windows are O(log n).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory-mapped reads.&lt;/strong&gt; Hot data stays in the OS page cache without explicit caching logic. Cold data stays on disk. No Redis layer, no separate cache invalidation strategy.&lt;/p&gt;

&lt;p&gt;The trade-off: no SQL. Queries are expressed in Rust with type-safe key ranges. For our access patterns (device state lookups, time-series scans, LLM memory retrieval), this is more efficient than an ORM layer over Postgres. For ad-hoc analytics, users export to their preferred tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Event Bus: channels, Not Kafka
&lt;/h2&gt;

&lt;p&gt;Inter-module communication uses Rust's &lt;code&gt;tokio::sync::broadcast&lt;/code&gt; channels — in-process, zero-copy, backpressure-aware.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simplified: device telemetry event&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;DeviceEvent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Any module can subscribe&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;rx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;event_bus&lt;/span&gt;&lt;span class="py"&gt;.subscribe&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;DeviceEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Any module can publish — no serialization, no network hop&lt;/span&gt;
&lt;span class="n"&gt;event_bus&lt;/span&gt;&lt;span class="nf"&gt;.publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DeviceEvent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"sensor-01"&lt;/span&gt;&lt;span class="nf"&gt;.into&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"temperature"&lt;/span&gt;&lt;span class="nf"&gt;.into&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;28.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compared to Kafka or RabbitMQ:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Kafka/RabbitMQ&lt;/th&gt;
&lt;th&gt;In-Process Channels&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Latency&lt;/td&gt;
&lt;td&gt;1-10ms per hop&lt;/td&gt;
&lt;td&gt;&amp;lt; 1μs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;Separate process + JVM/BEAM&lt;/td&gt;
&lt;td&gt;Shared address space&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Serialization&lt;/td&gt;
&lt;td&gt;JSON/Protobuf required&lt;/td&gt;
&lt;td&gt;Zero-copy struct passing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Durability&lt;/td&gt;
&lt;td&gt;Built-in (disk-backed)&lt;/td&gt;
&lt;td&gt;Optional (redb persistence)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-node&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (single-node by design)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The durability gap is closed by persisting critical events to redb before publishing. If the process crashes, the event log survives on disk and replays on restart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extension Isolation: Processes, Not Containers
&lt;/h2&gt;

&lt;p&gt;Here's where the single-process model gets nuanced. Extensions (YOLO object detection, Home Assistant bridge, Modbus adapter, etc.) run as &lt;strong&gt;separate OS processes&lt;/strong&gt;, communicating with the core via FFI and a capability-based permission system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│  Core Process (Rust, single binary)          │
│  ┌─────────┐ ┌──────────┐ ┌──────────────┐  │
│  │ HTTP    │ │ MQTT     │ │ AI Agent     │  │
│  │ Server  │ │ Broker   │ │ Runtime      │  │
│  └─────────┘ └──────────┘ └──────────────┘  │
│                                              │
│  Extension Host                              │
│  ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐       │
│  │Spawn │ │Spawn │ │Spawn │ │Spawn │       │
│  └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘       │
└─────┼────────┼────────┼────────┼────────────┘
      │        │        │        │
  ┌───┴──┐ ┌──┴───┐ ┌──┴───┐ ┌──┴───┐
  │ YOLO │ │ HA   │ │Modbus│ │BACnet│
  │(Rust)│ │Bridge│ │(Rust)│ │(Rust)│
  └──────┘ └──────┘ └──────┘ └──────┘
  separate processes, FFI + capabilities
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why not run extensions in-process?&lt;/strong&gt; Because extensions are where third-party code lives. A buggy YOLO model loader or a misbehaving MQTT bridge shouldn't crash the core. Process boundaries give us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Crash isolation&lt;/strong&gt; — &lt;code&gt;kill -9&lt;/code&gt; the extension, core keeps running&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory isolation&lt;/strong&gt; — an extension's memory leak doesn't starve the core&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capability enforcement&lt;/strong&gt; — extensions declare what they need (network, filesystem, device access) and get only those permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hot reload&lt;/strong&gt; — restart an extension without restarting the whole system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is Erlang's "let it crash" philosophy, adapted for Rust: the core almost never crashes (ownership + borrow checker), but extensions might — and that's fine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why not containers?&lt;/strong&gt; Docker adds ~50MB overhead per container (runc, containerd-shim, cgroup setup). On edge devices, that's unacceptable. OS process spawning is ~1ms with negligible memory overhead beyond the extension's own footprint.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI Agent Runtime: In-Process LLM Orchestration
&lt;/h2&gt;

&lt;p&gt;The AI agent is the most complex subsystem, and it runs entirely in-process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LLM backends&lt;/strong&gt; (Ollama, OpenAI, Anthropic, Google, DeepSeek, etc.) are HTTP clients making external calls, but the orchestration logic, prompt construction, and response parsing stay in-process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-tier memory&lt;/strong&gt; (Profile, Knowledge, Task, Session) is stored in redb with automatic extraction and compression — no external vector database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool calling&lt;/strong&gt; dispatches in-process via typed command structs, not string-based APIs. The AI says "query device temperature" and the runtime calls &lt;code&gt;DeviceManager::get_metric("sensor-01", "temperature")&lt;/code&gt; directly.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Type-safe tool dispatch — no eval(), no shell, no string parsing&lt;/span&gt;
&lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;AgentCommand&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;QueryDevice&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;CreateRule&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;RuleDefinition&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;ListDevices&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;DeviceFilter&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;ControlDevice&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;DeviceAction&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// The AI's intent is deserialized into a typed enum, then matched&lt;/span&gt;
&lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;AgentCommand&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;QueryDevice&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metric&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;device_manager&lt;/span&gt;&lt;span class="nf"&gt;.get_metric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This eliminates an entire class of injection vulnerabilities that plague string-based agent frameworks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Gave Up
&lt;/h2&gt;

&lt;p&gt;Honesty demands we acknowledge the trade-offs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No horizontal scaling.&lt;/strong&gt; A single process means a single node. If you need to process telemetry from 100,000 devices across 10 geographic sites, you run 10 instances — each managing its own fleet. There's no shared state between instances (by design). For multi-site coordination, you layer a separate aggregation tier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No polyglot runtime.&lt;/strong&gt; Everything in the core is Rust. If you want to contribute a core feature, you write Rust. Extensions can be any language that speaks the FFI protocol, but the core is monolingual.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No independent deployability.&lt;/strong&gt; A bug in the rule engine requires redeploying the entire binary. There's no "just update the rule engine service." For edge deployments, this is actually simpler (one binary to distribute), but it means CI/CD is all-or-nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No built-in multi-tenancy.&lt;/strong&gt; Each instance serves one tenant. Multi-tenant setups run multiple instances behind a reverse proxy — simpler than building tenant isolation into every module.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmarking: Single Process vs. Microservices
&lt;/h2&gt;

&lt;p&gt;On a Raspberry Pi 5 (8GB RAM), we measured:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;NeoMind (Single Process)&lt;/th&gt;
&lt;th&gt;Equivalent Microservices (8 containers)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Idle memory&lt;/td&gt;
&lt;td&gt;~120 MB&lt;/td&gt;
&lt;td&gt;~1.8 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cold start&lt;/td&gt;
&lt;td&gt;&amp;lt; 2 seconds&lt;/td&gt;
&lt;td&gt;~45 seconds (all containers healthy)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Telemetry latency (device → rule → action)&lt;/td&gt;
&lt;td&gt;~3 ms&lt;/td&gt;
&lt;td&gt;~85 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Binary size&lt;/td&gt;
&lt;td&gt;~35 MB&lt;/td&gt;
&lt;td&gt;~2.1 GB (all images)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;1 file copy + systemd&lt;/td&gt;
&lt;td&gt;docker-compose + registry + certs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The memory difference alone makes single-process viable on hardware where microservices simply aren't.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Choose Single-Process
&lt;/h2&gt;

&lt;p&gt;This isn't a "microservices are bad" take. Microservices are the right choice for large teams, high-scale cloud workloads, and systems that need independent scaling. But single-process is the right choice when:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deployment target is constrained hardware&lt;/strong&gt; — edge devices, IoT gateways, embedded systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operational simplicity matters more than architectural purity&lt;/strong&gt; — no SRE team on the factory floor&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency is critical&lt;/strong&gt; — real-time device control, industrial automation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The team is small&lt;/strong&gt; — one codebase, one language, one deployment artifact&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline operation is required&lt;/strong&gt; — no service mesh, no cloud dependency&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;NeoMind hits all five criteria. Your project might not — and that's fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;NeoMind is open source (Apache 2.0). One command to get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/camthink-ai/NeoMind/main/scripts/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source&lt;/strong&gt;: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docs&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/product-overview/what-is-neomind" rel="noopener noreferrer"&gt;wiki.camthink.ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community&lt;/strong&gt;: &lt;a href="https://discord.gg/gkM7cc8gKb" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If you've built edge systems that rejected microservices, I'd love to hear about your trade-offs in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>architecture</category>
      <category>iot</category>
      <category>ai</category>
    </item>
    <item>
      <title>NeoMind: A Rust-Powered Edge AI Platform That Talks to Your IoT Devices</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Fri, 07 Aug 2026 07:30:25 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/neomind-a-rust-powered-edge-ai-platform-that-talks-to-your-iot-devices-ida</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/neomind-a-rust-powered-edge-ai-platform-that-talks-to-your-iot-devices-ida</guid>
      <description>&lt;h1&gt;
  
  
  NeoMind: A Rust-Powered Edge AI Platform That Talks to Your IoT Devices
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Talk to your devices in natural language. The AI understands your intent, queries device states, creates automation rules, and takes action — all on your own hardware, with zero cloud dependency.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Problem We're Solving
&lt;/h2&gt;

&lt;p&gt;Edge AI is stuck between two extremes. On one side, you have cloud-first platforms that ship every sensor reading to a remote server — introducing latency, bandwidth costs, and privacy concerns that make industrial customers cringe. On the other, you have bare-metal inference frameworks that run a single model well but offer no device management, no automation, no natural language interface.&lt;/p&gt;

&lt;p&gt;What's missing is the &lt;strong&gt;middleware layer&lt;/strong&gt; — something that sits on your edge hardware, connects to real devices, runs intelligent agents, and lets operators interact with the whole system conversationally. That's what NeoMind is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is NeoMind?
&lt;/h2&gt;

&lt;p&gt;NeoMind is an open-source, edge-deployed AI platform built in Rust. It brings together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LLM-powered agents&lt;/strong&gt; that run directly on your hardware (via Ollama or cloud backends)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Device connectivity&lt;/strong&gt; through MQTT, BLE, and Webhook protocols&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A JSON rule engine&lt;/strong&gt; for automation with recursive conditions and debouncing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time dashboards&lt;/strong&gt; with drag-and-drop widgets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;22 official extensions&lt;/strong&gt; spanning vision AI (YOLO, face recognition, OCR), voice (TTS/ASR), and IoT bridges (Home Assistant, Modbus, BACnet, ONVIF, OPC-UA, LoRaWAN)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All packaged in a single binary. No Docker Compose. No external database. No message broker to install.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# One command. Everything runs.&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/camthink-ai/NeoMind/main/scripts/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Architecture: Single-Process, Self-Contained
&lt;/h2&gt;

&lt;p&gt;NeoMind's most distinctive design choice is its &lt;strong&gt;single-process architecture&lt;/strong&gt;. The API server (Axum), embedded MQTT broker, redb storage, rule engine, AI agent runtime, and extension runner all live in one process.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────────────────────┐
│               Desktop App / Web UI                       │
│                React 18 + TypeScript                     │
├──────────────────────────────────────────────────────────┤
│              Tauri 2.x / Browser                         │
└────────────────────────┬─────────────────────────────────┘
                         │ REST / WebSocket / SSE
                         ▼
┌──────────────────────────────────────────────────────────┐
│                   API Gateway (Axum)                      │
│  ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐            │
│  │  Auth  │ │Devices │ │Automate│ │Messages│            │
│  └────────┘ └────────┘ └────────┘ └────────┘            │
├──────────────────────────────────────────────────────────┤
│                     Event Bus                             │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐ │
│  │ Devices  │ │Automation│ │ AI Agent │ │ Extensions │ │
│  │ MQTT/BLE │ │ Rules    │ │ Chat     │ │ Isolated   │ │
│  │ Webhook  │ │ Transform│ │ Tools    │ │ Native+WASM│ │
│  └──────────┘ └──────────┘ │ Memory   │ └────────────┘ │
│                            └──────────┘                  │
├──────────────────────────────────────────────────────────┤
│                  Storage Layer (redb)                     │
│  Time-Series │ State │ LLM Memory │ Push Logs            │
└──────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deployment simplicity&lt;/strong&gt; — &lt;code&gt;cargo run&lt;/code&gt; and you're done. No orchestrating 12 microservices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource efficiency&lt;/strong&gt; — One process shares memory, file descriptors, and connection pools. Critical on constrained edge hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operational clarity&lt;/strong&gt; — One log stream, one PID to monitor, one binary to update.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three Design Philosophies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Edge-First, Cloud-Optional
&lt;/h3&gt;

&lt;p&gt;NeoMind defaults to local LLMs via Ollama — your data never leaves your LAN. When you need frontier-model capabilities, switch to OpenAI, Anthropic, Google, or any OpenAI-compatible endpoint with a single config change. The agent runtime is backend-agnostic.&lt;/p&gt;

&lt;p&gt;This isn't just a privacy play. For industrial IoT deployments on factory floors or remote campuses, reliable internet isn't guaranteed. NeoMind works fully offline.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Crash-Isolated Extensions
&lt;/h3&gt;

&lt;p&gt;Extensions run in &lt;strong&gt;separate processes&lt;/strong&gt; and communicate with the core via FFI with capability-based permissions. If your YOLO object detection extension crashes, the main service and all other extensions are completely unaffected.&lt;/p&gt;

&lt;p&gt;This is modeled after Erlang's "let it crash" philosophy, adapted for a Rust codebase where the core itself rarely crashes — but third-party extensions might.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Type-Safe End-to-End
&lt;/h3&gt;

&lt;p&gt;The Rust backend provides compile-time guarantees across the entire stack. Agent CLI commands dispatch in-process with structured data types — no fragile string parsing, no &lt;code&gt;eval()&lt;/code&gt;, no shell injection vectors.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Agents: More Than a Chatbot
&lt;/h2&gt;

&lt;p&gt;NeoMind's AI layer goes beyond simple Q&amp;amp;A:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Natural Language Chat&lt;/strong&gt; — Conversational interface to query device states, create automation rules, and control hardware. "Turn off all cameras on Floor 3 after 10 PM" becomes a real command.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous Agents&lt;/strong&gt; — Scheduled or event-driven agents that monitor telemetry, analyze patterns, and trigger actions independently. Think: "Watch the temperature sensors and alert me if any reading exceeds 30°C for more than 5 minutes."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-tier Memory&lt;/strong&gt; — Profile memory, knowledge base, task history, and session context with automatic extraction and compression. The AI remembers your facility layout and past incidents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill System&lt;/strong&gt; — YAML + Markdown skill files that guide agent behavior for specific scenarios. Write a skill for "factory floor safety check" and the agent follows it precisely.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Supported backends include Ollama, OpenAI, Anthropic, Google, xAI, Qwen, DeepSeek, GLM, MiniMax, and any OpenAI-compatible endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Device Management: MQTT, BLE, and Beyond
&lt;/h2&gt;

&lt;p&gt;NeoMind treats IoT devices as first-class citizens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Embedded MQTT Broker&lt;/strong&gt; — with mTLS and CA certificate support. Your devices connect directly, no external broker needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BLE Provisioning&lt;/strong&gt; — Zero-touch device setup via Bluetooth (Tauri native + Web Bluetooth). Walk up to a device, pair, configure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Discovery&lt;/strong&gt; — Plug in a new device and NeoMind detects it, registers its type, and offers AI-assisted onboarding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Device Types&lt;/strong&gt; — Define metrics and commands via JSON type definitions. No code changes required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The extension ecosystem adds bridges for &lt;strong&gt;Home Assistant&lt;/strong&gt; (3000+ entity integrations), &lt;strong&gt;Modbus&lt;/strong&gt; (TCP/RTU PLCs), &lt;strong&gt;BACnet&lt;/strong&gt; (building automation), &lt;strong&gt;ONVIF&lt;/strong&gt; (IP cameras), &lt;strong&gt;OPC-UA&lt;/strong&gt; (industrial servers), and &lt;strong&gt;LoRaWAN&lt;/strong&gt; (ChirpStack/TTN sensors).&lt;/p&gt;

&lt;h2&gt;
  
  
  Automation Without Code
&lt;/h2&gt;

&lt;p&gt;The JSON rule engine supports recursive conditions with comparison, range, and logical operators:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"condition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"device:sensor:temperature"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"operator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"greater_than"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"threshold"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"notify"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"channel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"slack"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Temperature alert!"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"execute"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"device:fan:turn_on"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cooldown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"for_duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Combine rules with &lt;strong&gt;data transforms&lt;/strong&gt; (JavaScript-based virtual metrics) and &lt;strong&gt;scheduled AI agents&lt;/strong&gt; to build sophisticated automation pipelines — all without writing backend code.&lt;/p&gt;

&lt;h2&gt;
  
  
  22 Extensions and Growing
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/camthink-ai/NeoMind-Extensions" rel="noopener noreferrer"&gt;extension marketplace&lt;/a&gt; ships with production-ready integrations:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Extensions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vision&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;YOLO object detection, face recognition, OCR, visual grounding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Voice&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CosyVoice TTS, voice cloning, multilingual ASR, voice assistant pipeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;IoT Bridges&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Home Assistant, Modbus, BACnet, ONVIF, OPC-UA, LoRaWAN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Utilities&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Weather forecast, stream player, WASM demo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each extension is process-isolated with capability-based permissions. Build your own following the &lt;a href="https://wiki.camthink.ai/docs/neomind/developer-guide/overview" rel="noopener noreferrer"&gt;Extension Development Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-Platform: Desktop, Server, Mobile
&lt;/h2&gt;

&lt;p&gt;NeoMind ships native desktop apps via Tauri 2.x for macOS (Apple Silicon + Intel), Windows, and Linux. The responsive web UI is optimized for phone and tablet. Server deployments support Docker, systemd, and nginx reverse proxy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Docker — multi-arch, pulls official image&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; neomind &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 9375:9375 &lt;span class="nt"&gt;-p&lt;/span&gt; 1883:1883 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; neomind-data:/app/data &lt;span class="se"&gt;\&lt;/span&gt;
  camthink/neomind:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Download&lt;/strong&gt;: &lt;a href="https://github.com/camthink-ai/NeoMind/releases/latest" rel="noopener noreferrer"&gt;GitHub Releases&lt;/a&gt; (&lt;code&gt;.dmg&lt;/code&gt;, &lt;code&gt;.msi&lt;/code&gt;, &lt;code&gt;.AppImage&lt;/code&gt;, &lt;code&gt;.deb&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Minute Quick Start&lt;/strong&gt;: &lt;a href="https://wiki.camthink.ai/docs/neomind/quick-start/five-minute-guide" rel="noopener noreferrer"&gt;wiki.camthink.ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code&lt;/strong&gt;: &lt;a href="https://github.com/camthink-ai/NeoMind" rel="noopener noreferrer"&gt;github.com/camthink-ai/NeoMind&lt;/a&gt; (Apache 2.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community&lt;/strong&gt;: &lt;a href="https://discord.gg/gkM7cc8gKb" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; · &lt;a href="https://github.com/camthink-ai/NeoMind/issues" rel="noopener noreferrer"&gt;GitHub Issues&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;NeoMind is open source and actively seeking contributors. Four ways to get involved:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Build an Extension&lt;/strong&gt; — New AI models, data sources, or integrations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a Device Type&lt;/strong&gt; — Define metrics and commands for your IoT hardware&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a Dashboard Widget&lt;/strong&gt; — Reusable React components for the community&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core Contributions&lt;/strong&gt; — Rust backend, React frontend, documentation&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;NeoMind is developed by &lt;a href="https://camthink.ai" rel="noopener noreferrer"&gt;CamThink AI&lt;/a&gt;. Licensed under Apache 2.0.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>iot</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Technical Implementation and Architectural Analysis of an ESP32-S3-Based Deep Sleep Outdoor Camera</title>
      <dc:creator>Ming</dc:creator>
      <pubDate>Mon, 03 Nov 2025 15:16:38 +0000</pubDate>
      <link>https://dev.to/mingming_shen_85ea2348fec/technical-implementation-and-architectural-analysis-of-an-esp32-s3-based-deep-sleep-outdoor-camera-kkk</link>
      <guid>https://dev.to/mingming_shen_85ea2348fec/technical-implementation-and-architectural-analysis-of-an-esp32-s3-based-deep-sleep-outdoor-camera-kkk</guid>
      <description>&lt;p&gt;In Internet of Things (IoT) applications, particularly in outdoor or edge deployment scenarios (such as smart agriculture, wildlife monitoring, and infrastructure inspection), providing a stable power supply for monitoring devices remains a core challenge. Traditional network cameras, which typically operate 24/7, have high power consumption and rely on external power sources, making deployment difficult in many situations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbukxn8wcoj8jv40mznfo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbukxn8wcoj8jv40mznfo.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article will share the technical decisions and architectural design behind our development of the CamThink NeoEyes NE101. We will focus on how to leverage the features of the ESP32-S3 to implement an "on-demand" ultra-low-power camera, solving the battery life challenges inherent in battery-powered scenarios.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Core Challenge: The "Impossible Triangle" of Power Consumption
When developing a battery-powered outdoor camera, we face several key technical trade-offs:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Standby Power vs. Response Speed: The system needs to remain in an extremely low-power "deep sleep" state for long periods but must also respond and wake up quickly to external events (like PIR sensors or timers). This efficiency is, of course, related to chip performance.&lt;/p&gt;

&lt;p&gt;Image Processing vs. Power Consumption: Image acquisition, Auto Exposure (AE) adjustment, encoding, and processing are compute-intensive tasks that cause instantaneous power spikes.&lt;/p&gt;

&lt;p&gt;Data Transmission vs. Power Consumption: Wireless communication modules like Wi-Fi and Cat-1 (4G) are notorious "power hogs" when searching for networks and transmitting data.&lt;/p&gt;

&lt;p&gt;Traditional solutions are either "always-on," leading to high power draw, or "completely dormant," resulting in slow wake-up times and missed events. Our goal was to achieve an "on-demand" working model.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Technical Selection: Why the ESP32-S3?
We selected the ESP32-S3 as the main controller (MCU) primarily for its unique dual-core heterogeneous architecture:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;High-Performance Main Cores: Two Xtensa® LX7 dual-core processors at up to 240MHz.&lt;/p&gt;

&lt;p&gt;Ultra-Low-Power (ULP) Coprocessor: A RISC-V-based coprocessor.&lt;/p&gt;

&lt;p&gt;This architecture is the technical cornerstone for achieving ultra-low power consumption. Our design philosophy is "task separation":&lt;/p&gt;

&lt;p&gt;LX7 High-Performance Cores: Are only awakened when needed. They handle the "heavy lifting," including:&lt;/p&gt;

&lt;p&gt;Data acquisition and processing from the image sensor (CPI/USB).&lt;/p&gt;

&lt;p&gt;Auto Exposure (AE) and image parameter adjustments.&lt;/p&gt;

&lt;p&gt;Running the network stack (Wi-Fi, TCP/IP, MQTT).&lt;/p&gt;

&lt;p&gt;Executing complex logic like data uploads and OTA updates.&lt;/p&gt;

&lt;p&gt;RISC-V ULP Coprocessor: Remains "on duty" 24/7. It continues to run while the main cores are in deep sleep, handling the "light work," such as:&lt;/p&gt;

&lt;p&gt;Monitoring external GPIO triggers (e.g., connected PIR sensors, sound sensors, or buttons).&lt;/p&gt;

&lt;p&gt;Managing the RTC (Real-Time Clock) for timed wake-ups.&lt;/p&gt;

&lt;p&gt;Deciding whether to wake the main cores based on specific conditions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Architectural Design: An Event-Driven Operational Flow
Our firmware is not a "dumb" loop but a strict, event-driven state machine.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3cfdg4ydv2id0mu2yr2.png" alt=" " width="800" height="191"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;State 1: Deep Sleep This is the state the system is in 99.9% of the time. In this state, the LX7 main cores, most peripherals, and the Flash memory are powered down. Only the ULP coprocessor and the RTC are running on an extremely low current (around 22µA, according to our test data), awaiting a trigger signal.&lt;/p&gt;

&lt;p&gt;State 2: Trigger &amp;amp; Wake-up When the ULP detects a predefined trigger condition (e.g., a level change on the PIR interface or an RTC timer expiration), it immediately sends a signal to the power management unit (PMU) to wake up the LX7 main cores.&lt;/p&gt;

&lt;p&gt;State 3: Active Cycle This is the highest power consumption phase, and our core optimization goal is to minimize its duration.&lt;/p&gt;

&lt;p&gt;System Initialization &amp;amp; Sensor Power-On: The main core wakes from Deep Sleep and boots up quickly.&lt;/p&gt;

&lt;p&gt;Image Acquisition &amp;amp; AE Convergence: This is an often-overlooked time-consuming point. To capture clear, properly exposed photos in variable lighting conditions (dawn, dusk, high noon), the system requires a few seconds (the NE101 firmware defaults to 5 seconds) for Auto Exposure (AE) to converge. (Note: Developers can adjust this time based on scene requirements, balancing power consumption and image quality).&lt;/p&gt;

&lt;p&gt;Capture &amp;amp; Processing: A single snapshot is taken.&lt;/p&gt;

&lt;p&gt;Communications Module Power-On &amp;amp; Connection: Based on the configuration (Wi-Fi / Cat-1 / Wi-Fi HaLow), the communication module is activated and connects to the network.&lt;/p&gt;

&lt;p&gt;Data Transmission: The image data is uploaded to the cloud via MQTT or another protocol.&lt;/p&gt;

&lt;p&gt;Enter Sleep: Once the task is complete, the system immediately executes a command to clear its state and return to State 1 (Deep Sleep).&lt;/p&gt;

&lt;p&gt;Based on new test data, the entire "Active Cycle" takes approximately 30 seconds for the Cat-1 version, depending on network conditions, while other versions can be controlled within 20 seconds.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Key Technical Points: Hardware Modularization and Interface Design
To adapt this low-power platform to different developer needs, we adopted a modular and open-interface design for the hardware.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qsmr8f9by0yj9whm775.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qsmr8f9by0yj9whm775.png" alt=" " width="800" height="979"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.1. Pluggable Communication Solutions&lt;br&gt;
The mainboard does not have the communication module soldered directly. Instead, it reserves standardized interfaces, allowing developers to choose based on the deployment scenario:&lt;/p&gt;

&lt;p&gt;Wi-Fi: For near-field scenarios with existing Wi-Fi coverage.&lt;/p&gt;

&lt;p&gt;LTE Cat-1: For wide-area scenarios without Wi-Fi but with cellular network access.&lt;/p&gt;

&lt;p&gt;Wi-Fi HaLow (IEEE 802.11ah): For long-distance (up to 1km), low-power private network scenarios, requiring a gateway for connectivity.&lt;/p&gt;

&lt;p&gt;4.2. Flexible Sensor and Camera Interfaces&lt;br&gt;
Camera Support: The mainboard supports both CPI and USB interface cameras.&lt;/p&gt;

&lt;p&gt;CPI (OV5640): Lower power consumption, simple interface, suitable for regular snapshots.&lt;/p&gt;

&lt;p&gt;USB (SC200AI): Higher bandwidth, supports 1080P, but occupies additional I/O resources and the USB host function.&lt;/p&gt;

&lt;p&gt;Trigger Source Expansion: We have opened up multiple hardware interfaces to be used as "triggers":&lt;/p&gt;

&lt;p&gt;PIR Interface: A 4-pin Wafer connector dedicated to PIR sensor integration.&lt;/p&gt;

&lt;p&gt;16-pin IO Interface: Reserves GPIO, DI, DO, etc., allowing developers to connect their own sensors (e.g., radar, sound, vibration, temperature/humidity) as wake-up sources.&lt;/p&gt;

&lt;p&gt;Alarm Interface: A 2-pin Wafer connector for alarm input. By default, the PIR interface is used; this interface requires soldering an additional resistor for use.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Power Consumption Data and Battery Life Analysis
The theoretical architecture must ultimately be validated by data. In a typical use scenario of 5 snapshots per day (with the fill light off), the NE101's battery life performance (based on test data) is:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Wi-Fi Version: Can support up to 2.73 years.&lt;/p&gt;

&lt;p&gt;Wi-Fi HaLow Version: Up to 2.59 years.&lt;/p&gt;

&lt;p&gt;Cat-1 Version: Can operate stably for 1.24 years.&lt;/p&gt;

&lt;p&gt;This longevity is primarily due to the extreme optimization of both sleep and operating power.&lt;/p&gt;

&lt;p&gt;5.1. Sleep Power&lt;br&gt;
This is the power consumed when the device is not capturing images (deep sleep) and is the foundation for long battery life.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ysuty34zif7lmf0j7vo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ysuty34zif7lmf0j7vo.png" alt=" " width="740" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1qewrqqcoaeixeee3v0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1qewrqqcoaeixeee3v0.png" alt=" " width="740" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Technical Analysis:&lt;/p&gt;

&lt;p&gt;The base sleep power consumption is nearly identical across all three communication modes, with annual consumption at around 8%.&lt;/p&gt;

&lt;p&gt;This implies that in a pure standby (theoretical) scenario, the battery life could exceed 12 years (2500mAh / 195.79mAh ≈ 12.8 years).&lt;/p&gt;

&lt;p&gt;This demonstrates the effectiveness of the ESP32-S3's ULP coprocessor architecture in achieving ultra-low base power consumption.&lt;/p&gt;

&lt;p&gt;5.2. Operating Power&lt;br&gt;
This refers to the total power required for the device to wake up, acquire an image, and complete the upload. This is the key factor determining the battery life differences between communication solutions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8ku8rlzse5nx8rr9pix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8ku8rlzse5nx8rr9pix.png" alt=" " width="740" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkyo7y7gca1c949xgut1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkyo7y7gca1c949xgut1.png" alt=" " width="740" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdia1fn15cz8dzxaw7rjr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdia1fn15cz8dzxaw7rjr.png" alt=" " width="740" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key Operating Parameters Test Data: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiyy50bmv66f47y11rks.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiyy50bmv66f47y11rks.png" alt=" " width="740" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Technical Analysis:&lt;/p&gt;

&lt;p&gt;Sleep Power: Again validates that the base sleep power for all versions is extremely low, in the 22-23.5µA range.&lt;/p&gt;

&lt;p&gt;Fill Light Impact: Turning the fill light on or off has a noticeable impact on single-event power consumption (an increase of ~10-15%). It should be avoided when pursuing extreme battery life.&lt;/p&gt;

&lt;p&gt;Operating Time: Cat-1 takes the longest "active cycle" (approx. 30 seconds) due to the need to search for and register on the cellular network, while Wi-Fi and HaLow are much faster (&amp;lt;20 seconds).&lt;/p&gt;

&lt;p&gt;Cat-1 Power: The Cat-1 module's average current during operation (76.1mA) and its longer operating time (~30s) are both significantly higher than the Wi-Fi solutions. This is the primary reason its total battery life (1.24 years) is lower than the Wi-Fi version (2.73 years).&lt;/p&gt;

&lt;p&gt;5.3. Power Estimation Model&lt;br&gt;
Based on the data above, we can derive the technical model for battery life estimation:&lt;/p&gt;

&lt;p&gt;Total Daily Power Consumption = (Base Sleep Power × 24h) + (Single Event Operating Power × Number of Daily Events)&lt;/p&gt;

&lt;p&gt;It is precisely because the base sleep power (~22µA) has been pushed to an extremely low level that the first half of the equation (sleep consumption) becomes minimal. The system's total power consumption is therefore primarily determined by the second half (number of operating events). This is what enables us to achieve battery life measured in "years" in low-frequency scenarios like "5 snapshots per day."&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faq5ov9xmbij3pues0zn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faq5ov9xmbij3pues0zn4.png" alt=" " width="778" height="1174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Implementing a deep-sleep outdoor camera based on the ESP32-S3 is entirely feasible. The technical core lies in fully leveraging its heterogeneous architecture (LX7 high-performance cores + RISC-V ULP coprocessor).&lt;/p&gt;

&lt;p&gt;By designing the system in an "event-driven" mode, allowing the main core to be in Deep Sleep (at ~22µA) 99.9% of the time, with only the ULP coprocessor handling low-power "sentry" tasks, we fundamentally solve the power bottleneck of traditional IPCs. The latest real-world test data strongly supports this, providing developers with a clear basis for making battery life trade-offs between different communication solutions (Wi-Fi, Cat-1, HaLow).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Known Drawbacks of Using the ESP32-S3
The ESP32-S3's image processing performance is relatively weak, making it difficult to support the processing of large images. Simultaneously, this lack of image processing power can lead to a longer time from wake-up to handling the image sensor, resulting in low real-time performance for image capture. However, for applications that do not require high-frequency image acquisition, this product architecture remains highly practical and balanced.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl15yhtwj4j7azgnjpkx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl15yhtwj4j7azgnjpkx.png" alt=" " width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firmware code：&lt;a href="https://github.com/camthink-ai/lowpower_camera" rel="noopener noreferrer"&gt;https://github.com/camthink-ai/lowpower_camera&lt;/a&gt;&lt;br&gt;
Hardware Info：&lt;a href="https://wiki.camthink.ai/docs/neoeyes-ne101-series/ne100-mb01-development-board/dev-guide" rel="noopener noreferrer"&gt;https://wiki.camthink.ai/docs/neoeyes-ne101-series/ne100-mb01-development-board/dev-guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are looking for developers in the community to work with us to explore low-power camera products. We look forward to your participation in the community construction. If you have any intention, you are welcome to join us!!&lt;/p&gt;

&lt;p&gt;We have prepared a gift for the developers.&lt;br&gt;
&lt;a href="https://near.tl/sm/uCT0JnK9e" rel="noopener noreferrer"&gt;https://near.tl/sm/uCT0JnK9e&lt;/a&gt;&lt;/p&gt;

</description>
      <category>esp32</category>
      <category>camera</category>
      <category>deepsleep</category>
      <category>lowpower</category>
    </item>
  </channel>
</rss>
