SenseKit is an open-source iPhone context runtime for AI agents.
It listens to passive on-device signals like motion, location, workouts, power state, and lightweight calendar context, turns those signals into deterministic events, and delivers signed HTTPS payloads to OpenClaw.
The project exists to solve one practical problem: an agent cannot act intelligently around the real world if the user has to build a pile of Shortcuts automations before anything works. SenseKit aims to be useful right after install and permission approval.
Passive-first: useful events should be possible without manual Shortcuts setup.Deterministic: the runtime uses explicit rules, weights, and thresholds instead of opaque ML guesses.Local-first: raw sensor data stays on the phone by default.Policy-aware: each outbound event includes the safety context OpenClaw needs to react responsibly.OpenClaw-first: the primary integration path is signed outbound delivery, not hosting a server on the phone.
SenseKit is early, opinionated, and real.
What already exists in this repository:
- a deterministic corroboration engine for passive events
- a Swift runtime package with Motion, Location, HealthKit, power, and calendar collectors
- SQLite-backed runtime state, queueing, and audit logging
- signed webhook delivery for OpenClaw
- a SwiftUI app shell with onboarding, settings, audit log, and debug timeline scaffolding
- a separate bench harness target for field testing
- shared JSON schemas and TypeScript validation helpers
What is still being validated on real devices:
- wake detection precision
- driving detection precision
- battery impact over normal daily use
- background wake and delivery reliability
- final onboarding polish
If you are evaluating the project, start with:
flowchart LR
A["On-device collectors<br/>Motion, location, HealthKit,<br/>power, calendar"] --> B["Deterministic corroboration engine"]
B --> C["Context event<br/>confidence, reasons, policy"]
C --> D["Signed outbound queue"]
D --> E["OpenClaw webhook"]
SenseKit is a runtime, not a data exhaust pipeline. The phone keeps the raw sensor layer local and only sends small, structured events once the runtime is confident something meaningful happened.
SenseKit does not send a raw dump of everything the device sees.
| Sent to OpenClaw | Stays local by default |
|---|---|
One event at a time, such as motion_activity_observed or arrived_home |
Exact GPS coordinates |
| Event timestamp | Raw motion history |
| Confidence score | Raw HealthKit values |
Short reason codes like motion.primary.walking |
Calendar titles and attendees |
| A small snapshot with coarse state | Local debug traces |
| A policy block describing safe response modes | Tokens and secrets |
In the current bench app, motion is forwarded as coarse activity events such as walking, running, stationary, or automotive, and place transitions are forwarded as events such as arrived_home.
apps/ios: the iPhone app, bench harness, runtime package, and SwiftUI packagepackages/contracts: JSON schemas, fixtures, and TypeScript validation helperspackages/openclaw-skill: example skill packaging for OpenClawpackages/openclaw-plugin: plugin surface for later OpenClaw integration workpackages/examples: QR bootstrap and hook configuration examplesdocs: ADRs, privacy notes, release notes, runbooks, and field-test plans
Documentation entry points:
Requirements:
- Xcode with
iOS 17+SDK support - Node.js and
pnpm - Ruby only if you want to regenerate the Xcode project with
scripts/generate_ios_project.rb
Install JavaScript dependencies:
pnpm installRun the TypeScript workspace checks:
pnpm build
pnpm test
pnpm contracts:checkRun Swift package tests:
cd apps/ios/Packages/SenseKitRuntime && swift test
cd apps/ios/Packages/SenseKitUI && swift testBuild the iOS app targets:
xcodebuild -workspace apps/ios/SenseKit.xcworkspace -scheme SenseKitApp -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
xcodebuild -workspace apps/ios/SenseKit.xcworkspace -scheme SenseKitBenchApp -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO buildFor personal testing, keep OpenClaw private and use Tailscale instead of exposing the raw Gateway to the public internet.
- Keep OpenClaw on
gateway.bind: "loopback"and expose it privately with Tailscale Serve. - Use a separate
hooks.tokenfor SenseKit hooks. Do not reusegateway.auth.token. - Treat hook payloads as untrusted content even when they come from systems you control.
- If OpenClaw returns
hook mapping failed, remove any customtransformblock first and test with the example mapping unchanged.
The highest-value work for the current milestone is:
- passive wake validation on real devices
- driving detection validation on real commutes
- background wake and delivery reliability
- onboarding and debug timeline polish
Contributions are welcome. If your change affects architecture, add or update an ADR in docs/adr.
- License: Apache-2.0
- Contribution guide: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security policy: SECURITY.md
- Support guide: SUPPORT.md