# AI use cases for Thinking Orbs (haplollc/ThinkingOrbs)

Repo: [haplollc/ThinkingOrbs](https://github.com/haplollc/ThinkingOrbs) | Use cases: 4 | Page: https://dedupedai.com/use-cases/haplollc-thinkingorbs/

ThinkingOrbs is a Swift package that provides dotted, 3D-looking loading indicators for AI and agent interfaces in SwiftUI.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Show live agent status in a SwiftUI chat app: https://dedupedai.com/use-cases/haplollc-thinkingorbs/show-agent-phase-status-in-swiftui/
- Show a listening indicator during voice input: https://dedupedai.com/use-cases/haplollc-thinkingorbs/show-voice-input-activity-indicator/
- Draw orb geometry in SpriteKit, Metal or another surface: https://dedupedai.com/use-cases/haplollc-thinkingorbs/draw-orb-geometry-in-custom-renderer/
- Run the test suite and parity sweep on the orb engine: https://dedupedai.com/use-cases/haplollc-thinkingorbs/verify-orb-engine-parity-with-tests/

## How to show live agent status in a SwiftUI chat app with Thinking Orbs

Repo: [haplollc/ThinkingOrbs](https://github.com/haplollc/ThinkingOrbs) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Map each agent step to a matching orb so users see what the AI is doing.

**Who it is for:** An iOS developer building a chat or assistant screen where the agent moves between searching, reasoning, calling tools and writing.

**The problem:** A plain spinner says nothing about what the agent is doing, so users cannot tell a web lookup from a long reasoning step.

**The outcome:** Each agent phase shows its own orb design, with a smooth crossfade between phases and a status line beside it.

### Steps

1. In Xcode, choose File > Add Package Dependencies and paste https://github.com/haplollc/ThinkingOrbs, or add the package line to Package.swift and add Thinking Orbs to your target's dependencies.
2. Define an enum for your agent phases and a computed property that returns an OrbDesign for each case, such as .searching for web lookups and .solving for reasoning.
3. Place ThinkingOrb(phase.orb) in a ZStack with .id(phase.orb) and a .transition(.opacity.animation(.easeInOut(duration: 0.25))) so the old and new orb share one slot.
4. Add ThinkingOrbLabel("Searching the web…", design: .searching) next to the orb where the status text should appear.
5. Run the app in a simulator and step through each phase to confirm the orb and label change together.

### Prompt to paste into your agent

```text
In the ThinkingOrbs repo (https://github.com/haplollc/ThinkingOrbs), read the README's Recipes section and add a phase-to-OrbDesign mapping for <target agent app>. Output the Swift enum, the ZStack view code and one ThinkingOrbLabel per phase. Verify that every case in the enum returns a valid OrbDesign case from the README table.
```

### Caveat

The package only draws the indicator, so your app still has to decide which agent phase is active and when it changes.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/haplollc-thinkingorbs/show-agent-phase-status-in-swiftui/

## How to show a listening indicator during voice input with Thinking Orbs

Repo: [haplollc/ThinkingOrbs](https://github.com/haplollc/ThinkingOrbs) | Difficulty: Beginner | Time: 45 minutes | Basis: From the README

Display a pausable listening orb that freezes when recording stops.

**Who it is for:** A developer adding voice input or transcription to an app who needs visible feedback while the microphone is active.

**The problem:** Users do not know whether the app is still hearing them, and a static icon gives no sign of live activity.

**The outcome:** A listening orb animates while recording and freezes on its current frame when recording stops.

### Steps

1. Add the Thinking Orbs package to your Xcode project using File > Add Package Dependencies with https://github.com/haplollc/ThinkingOrbs.
2. Import Thinking Orbs in the view that handles recording.
3. Place ThinkingOrb(.listening, isPaused: !isRecording) where the indicator should appear, with isRecording set by your recording state.
4. Optionally add speed: 1.5 to the same call to change the tempo as a multiplier on the tuned speed.
5. Start and stop recording on a device or simulator and check that the orb freezes when recording stops.

### Prompt to paste into your agent

```text
Using the ThinkingOrbs repo (https://github.com/haplollc/ThinkingOrbs), add a ThinkingOrb(.listening, isPaused:) indicator bound to the recording state of <target voice screen>. Return the SwiftUI view code and confirm the orb pauses when isRecording is false.
```

### Caveat

The indicator only shows motion. It does not record or transcribe audio, so your app must provide the recording state.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/haplollc-thinkingorbs/show-voice-input-activity-indicator/

## How to draw orb geometry in SpriteKit, Metal or another surface with Thinking Orbs

Repo: [haplollc/ThinkingOrbs](https://github.com/haplollc/ThinkingOrbs) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Read the public frame data and render it in a non-SwiftUI target.

**Who it is for:** A developer building a watch complication, a Metal or SpriteKit scene, or a plotter output who needs the orb shapes outside SwiftUI.

**The problem:** SwiftUI views cannot be placed in some targets, but the orb still needs to appear there in the same design.

**The outcome:** A custom renderer draws the lines and dots of an orb frame, following the draw order from the package.

### Steps

1. Add the Thinking Orbs package to your project with File > Add Package Dependencies and paste https://github.com/haplollc/ThinkingOrbs.
2. Call OrbDesign.connecting.frame(size: .regular, at: seconds) with seconds set to a running time in seconds, such as a TimelineView date's timeIntervalSinceReferenceDate.
3. Loop over frame.lines first and draw each line using x1, y1, x2, y2 and w in points, with white and a for ink and opacity.
4. Loop over frame.dots next and draw each dot at x, y and r in a 64 by 64 box, mirroring white on dark backgrounds.
5. Run the target and confirm the dots appear in the expected positions and draw order.

### Prompt to paste into your agent

```text
Read the Draw it yourself section of the ThinkingOrbs repo (https://github.com/haplollc/ThinkingOrbs) and write a <target renderer> function that draws OrbDesign.<design>.frame(size:at:) lines then dots. Return the drawing code and confirm that the output contains the same number of dots as the frame.
```

### Caveat

The README documents the frame data, but you must handle the mirrored ink on dark backgrounds and your own drawing code yourself.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/haplollc-thinkingorbs/draw-orb-geometry-in-custom-renderer/

## How to run the test suite and parity sweep on the orb engine with Thinking Orbs

Repo: [haplollc/ThinkingOrbs](https://github.com/haplollc/ThinkingOrbs) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Check the Swift engine against the original web geometry before you rely on it.

**Who it is for:** A maintainer or contributor who needs proof that the Swift port matches the original engine before shipping or changing it.

**The problem:** A port of a 3D animation engine can drift from the original in small ways that are hard to spot by eye.

**The outcome:** The unit tests and the differential sweep both run, reporting pass or fail on the geometry checks.

### Steps

1. Clone https://github.com/haplollc/ThinkingOrbs and open the folder in Terminal.
2. Run `xcodebuild test -scheme ThinkingOrbs -destination "platform=iOS Simulator,name=iPhone 17 Pro"` to run the golden vector tests.
3. Run `Scripts/differential-sweep.sh` to compare the Swift engine with the original engine under Node.
4. Read the output and note any frame that does not match.
5. If you change the engine, rerun both commands before you commit.

### Prompt to paste into your agent

```text
In the ThinkingOrbs repo (https://github.com/haplollc/ThinkingOrbs), run `xcodebuild test -scheme ThinkingOrbs -destination "platform=iOS Simulator,name=iPhone 17 Pro"` and `Scripts/differential-sweep.sh`, then report the pass or fail result for each. Verify that the sweep reports zero mismatched frames before you claim parity.
```

### Caveat

The sweep needs the original engine running under Node and an iPhone simulator, so it will not run on a machine without them.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/haplollc-thinkingorbs/verify-orb-engine-parity-with-tests/
