ai newsDo., 15. Okt.
EilmeldungMeta and Apple team up to make Muse AI models run better on Macs

DeskBreak: The AI Agent That Wants You to Stop Looking at It (with Sentry Agent Tracing)

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass competing in the **Best Use of Sentry Agent Tracing * prize category.* 🌿 What I Built: The Anti-Screen Agent We’ve all been there: you’ve been sitting at your desk for seven hours straight. Your eyes burn from

dev.toFreitag 07:02 · 09.10.7 Min. Lesezeit
Bild: dev.to

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass competing in the **Best Use of Sentry Agent Tracing * prize category.*

We’ve all been there: you’ve been sitting at your desk for seven hours straight. Your eyes burn from monitor blue light, your neck is locked stiff, and your brain is utterly fatigued.

You tell yourself: "I need to step outside for 5 minutes and get some fresh air."

And what is the first thing you do? You reach for your phone or open a browser tab.

You check three weather apps to see the humidity index. You search Reddit for neighborhood walking loops. You check your email notifications. Twenty-five minutes later, you are still sitting in your office chair doomscrolling, the sun has dipped below the horizon, and you haven't taken a single step outside.

The problem with modern "wellness" tech is that it demands more screen time to solve a crisis caused by excessive screen time.

I decided to invert this entire equation. I built DeskBreak: an open-source AI agent whose primary design goal is to make the screen the shortest part of the experience (under 350 milliseconds), prescribe a zero-screen outdoor sensory reset, and immediately lock your monitor so you actually step away and touch grass.

The complete codebase is 100% open-source under the MIT license on GitHub: 👉 github.com/amanmaurya92/deskbreak

DeskBreak is built as an autonomous, multi-step pipeline that maps directly into Sentry's OpenTelemetry AI hierarchical span model:

flowchart TD A[User Selects Break Duration] --> B["ai.pipeline: deskbreak.prescribe_break"] B --> C["ai.tool_call: checkSunlightAndWeather"] C --> D["ai.tool_call: craftSensoryMission"] D --> E["ai.chat_completions.create: gemma-2-2b-instruct"] E --> F[Offline Screen Lock Card with Live Countdown] Sentry Trace Hierarchy: ai.pipeline: The root transaction measuring end-to-end user dispatch latency. ai.tool_call: Child spans measuring individual tool executions ( checkSunlightAndWeather, craftSensoryMission ). ai.chat_completions.create: Child inference span recording prompt tokens, completion tokens, temperature, and cost ($0.00). Setting Up Sentry Agent Tracing in the Browser: import * as Sentry from " @sentry/browser "; Sentry. init ({ dsn: userDsn || process. env. SENTRY_DSN, tracesSampleRate: 1.0, sendDefaultPii: true, // Captures mission context and prompt inputs in Sentry's AI dashboard release: " deskbreak@1.0.0 ", initialScope: { tags: { " agent.type ": " touch-grass-optimizer ", " challenge.week ": " week-1-touch-grass ", } } }); Enter fullscreen mode Exit fullscreen mode Wrapping Custom Tool Calls: recordToolSpan ( toolName, inputData, outputData, durationMs ) { const span = { op: " ai.tool_call ", description: `tool: ${ toolName } `, durationMs, input: inputData, output: outputData }; if ( window.

Sentry ) { window. Sentry. addBreadcrumb ({ category: " ai.tool_call ", message: `Executed tool: ${ toolName } `, \ n data: { toolName, durationMs, outputData } \ n }); \ n } \ n return span; \ n } \ n ``` \n\n---\n\n## 🧠 Why Open Innovation Matters\n\nThe Week 1 prompt asks: *Why does open innovation matter for what you built?* \n\nFor DeskBreak, open-source AI wasn’t a convenient buzzword—it was a philosophical and architectural necessity:\n\n### 1. Freedom from Predatory Attention Metrics\nCommercial AI platforms are funded by advertising impressions, retention funnels, and time-on-page metrics.

Their core incentive is to keep you typing into a chatbot for as long as possible. An open-source agent can be designed with the exact opposite mandate: **succeed by terminating screen time as fast as possible**.\n\n### 2. Complete Privacy for Health & Daily Routines\nYour daily work schedule, breaks, local sunrise/sunset patterns, and stress resets should never be streamed to third-party ad networks or telemetry brokers.

DeskBreak runs entirely in your local browser runtime—zero remote tracking of your personal habits.\n\n### 3. $0.00 Cost to Run (No Subscription Toll)\nNobody should have to pay a $20/month SaaS fee just to get reminded to take a walk. By relying on open-weights inference and deterministic local tools, DeskBreak costs **$0.00** to execute forever.\n\n### 4. Backcountry & Offline Resilience\nWhen you step out onto a trail or into a park with no cellular data connection, closed commercial APIs fail.

Because DeskBreak's tool chain is local-first, the sensory mission synthesizer and countdown timer function flawlessly with zero internet connection.\n\n---\n\n## 🔍 Best Use of Sentry Agent Tracing: Debugging Story\n\nObservability is the difference between guessing why an agent is sluggish and knowing exactly what broke. During initial development, Sentry Agent Tracing immediately exposed two critical performance bugs:\n\n### Bug #1: The 4.2-Second Sequential Tool Waterfall\n* **What Sentry Showed:** In the first prototype, the environmental tool made three separate, sequential synchronous calls to calculate solar declination, sunset windows, and air freshness. In Sentry's flame graph, this manifested as a **4,200 ms blocking waterfall**!\n* **The Root Cause:** The agent was blocking on unmemoized astronomical calculations before deciding what sensory mission to pick.\n* **The Fix:** Consolidated the ambient calculation into a single deterministic evaluation pass.\n* **The Result:** Tool execution plummeted from **4,200 ms down to under 8 ms**, making the agent virtually instantaneous (-92.3% overall pipeline latency).\n\n### Bug #2: The 2,800-Token Prompt Bloat\n* **What Sentry Showed:** Sentry's ` gen_ai. usage. prompt_tokens ` graph revealed that the synthesis step was consuming **2,800 tokens** per break request!\n* **The Root Cause:** My early system prompt was dumping entire textbook paragraphs explaining the neuroscience of optical ciliary eye spasm into the prompt context on every single run.\n* **The Fix:** Stripped the static academic dump from the system prompt and relied on dynamic, 2-line physiological anchors passed directly from the ` craftSensoryMission ` tool output.\n* **Result:** Token consumption dropped by **81.4%** (down to 520 tokens), resulting in blazing-fast generation on local consumer devices.\n\n---\n\n## 📊 Before vs. After: Sentry Observability Benchmark\n\n| Performance Metric | Unoptimized (What Sentry Caught) | Optimized (Production) | Improvement | Sentry Span Op |\n|:--- |:---: |:---: |:---: |:--- |\n| **Pipeline Latency** | ` 4, 200 ms ` | ` 320 ms ` | **-92.3% faster** | ` ai. pipeline ` |\n| **Total Token Footprint** | ` 2, 800 tokens ` | ` 520 tokens ` | **-81.4% fewer tokens** | ` ai. chat_completions. create ` |\n| **Tracing Spans Recorded** | ` 12 spans ` | ` 4 spans ` | **Clean & concise** | ` distributed_trace ` |\n| **Inference Cost** | ` $0.

00 ` | ` $0. 00 ` | **$0.00 (Open-Weights)** | ` gen_ai. cost ` |\n\n---\n\n## 🖥️ Live Trace Inspector in the UI\n\nTo let judges and developers experience the observability without needing to log into Sentry, DeskBreak features an **Interactive Sentry Trace Inspector & Flame Graph** right below the break generator on the [live demo](https://amanmaurya92.github.io/deskbreak/).\n\nWhen you generate a break, the UI renders the live OpenTelemetry span waterfall in real time:\n- The root ` ai. pipeline ` bar in emerald green.\n- Child ` ai. tool_call ` bars in electric cyan.\n- Child ` ai. chat_completions. create ` bar in sunlight gold.\n- A settings gear (⚙️) allows judges to plug in their own Sentry DSN to stream spans directly to their organization's dashboard!\n\n---\n\n## 🌿 Taking It Outside: Field Test\n\nI tested DeskBreak during a marathon 6-hour coding session. I hit **\"5 Min: The 300-Pace Reset\"**.\n\nIn **320 milliseconds**, the agent prescribed:\n> *\"Walk at least 200 paces away from your front door.

Find the nearest living tree and place your palm against it. Take 5 deep breaths through your nose. Leave your phone in your pocket.\"*\n\nThe screen immediately locked with the countdown timer.

I stood up, walked outside to the courtyard tree, felt the cool breeze, and took five slow breaths. When I returned, the timer hit zero. My eyes had completely stopped straining, and my mental focus was reset.\n\n---\n\n## 💭 Final Thoughts\n\nThe greatest irony of AI in 2026 is that so much of it is engineered to keep us hooked to glass screens.\n\nWith **DeskBreak**, we proved that an open-source agent can do the opposite: do its job in 300 milliseconds, get out of your way, and encourage you to step outside.

Expand Women health Women health Women health Follow Joined Oct 4, 2026 • Oct 9 Dropdown menu Copy link Hide Nice work

Quelle: dev.to (dev.to). Original öffnen