Here is the complete Markdown text for your Devpost submission. You can copy and paste this directly into the "About the project" text box.
Inspiration
We are entering the era of "Agentic AI," where bots don't just chat—they do things. But this creates a massive Trust Gap.
Most users are terrified to give an AI "Admin Access" to their lives. You might want a Gym Coach to set aggressive alarms to wake you up, but you definitely don't want that same bot reading your private work calendar or emails. Current solutions are "all or nothing"—either the AI has access to your phone, or it doesn't.
We built SpunkAi to solve the Privacy Paradox. We wanted to create a system where Agency is Configurable. We were inspired by mobile operating system permissions (like when an app asks for "Camera Access"), but applied to AI personalities. We wanted to build a world where creators can build specialized, high-utility agents that are safe by design, not just by promise.
What it does
SpunkAi is the first Permission-Aware Operating System for AI Agents. It is a mobile-native marketplace where users can "hire" specialized AI Coaches.
Unlike generic chatbots, every Coach on SpunkAi has a hard-coded set of "Allowed Skills".
- The Drill Sergeant: Has permission to
[x] Set Alarmsand[x] Send Notifications, but cannot access your calendar. - The Soft Life Mentor: Has permission to
[x] Read Calendarto schedule breaks, but cannot access your tasks or alarms.
For the user, it’s a seamless chat interface where they can talk to these experts. For the AI, it is a strictly sandboxed environment. If a user asks the Drill Sergeant to "Read my emails," the AI simply cannot do it—not because it refuses, but because the tool definition was never physically given to the model.
How we built it
We architected SpunkAi as a secure "Gatekeeper" system rather than just a wrapper.
1. The Mobile Frontend (React Native + Expo)
We built a high-performance native app using React Native and Expo.
- UI/UX: We used
tamaguifor a beautiful, unified component system that looks great on iOS and Android. - Chat Interface: Implemented
react-native-gifted-chatfor a familiar messaging experience. - Monetization: Integrated RevenueCat (
react-native-purchases) to handle subscriptions and "Coach Pack" unlocks.
2. The Intelligent Backend (Node.js + Hono)
This is the brain of the operation. We used Hono for an ultra-fast, edge-ready Node.js server.
- The Gatekeeper Logic: Before every message, the server checks the User's Entitlements (via RevenueCat) and the Coach's Permissions (via Supabase).
- Dynamic Tool Injection: This is our core innovation. The server looks at the
allowed_skillsarray in the database (e.g.,['create_task']). It then dynamically constructs the API payload for the LLM, injecting only the specific tool definitions that are allowed.
3. The AI Engine (AWS Bedrock)
We chose AWS Bedrock accessing Claude 3 Haiku.
- Why Haiku? It offers the perfect balance of blistering speed (crucial for chat) and high-fidelity tool usage.
- Tool Use: The model receives the user's chat and the filtered list of tools. It decides whether to reply with text or issue a
tool_useJSON command.
4. The Data Layer (Supabase)
- PostgreSQL: Stores user profiles, coach personas, and the critical
allowed_skillsJSON configuration. - pgvector: We implemented vector embeddings to give coaches "Long Term Memory," allowing them to recall details from conversations weeks ago.
Challenges we ran into
- The "Hallucination" of Tools: Early on, if a user asked a Coach to do something it didn't have permission for (like "Check my calendar"), the AI would sometimes hallucinate a response pretending it did. We solved this by refining the System Prompt to strictly acknowledge its limitations and by physically omitting the tool schemas from the API call, making it impossible for the model to construct a valid tool request for unauthorized actions.
- Latency vs. Security: Adding a permission-check layer between the user and the AI introduced potential lag. We optimized this by using Hono (which is incredibly lightweight) and keeping our permission logic in-memory or cached where possible, keeping response times under 1.5 seconds.
- React Native Compatibility: Getting
tamaguiandpgvectorlogic to play nicely required some deep debugging of our build pipeline, specifically around environment variable injection in the Expo build.
Accomplishments that we're proud of
- True "Hardware-Level" Constraints: We didn't just tell the AI "don't do this." We built a system where the AI cannot do it. Seeing the logs show the AI trying to find a tool and failing because we filtered it out was a huge win for security.
- The Marketplace UI: The app looks and feels like a production-ready product. The "Coach Cards" showing icons for their specific skills (Tasks, Calendar) makes the security model visible and understandable to non-technical users.
- Seamless Monetization: We successfully integrated the ability for creators to lock specific bots behind paywalls, creating a real business model for AI configurators.
What we learned
- Guardrails are a Product: Safety isn't just a backend feature; it's a selling point. Users are more willing to engage with an AI when they can see exactly what permissions it has.
- Claude 3 is a Tool Beast: We learned that Claude 3 Haiku is exceptionally good at strictly adhering to provided tool schemas, making it ideal for this kind of "Agentic OS" architecture.
- State Management is Key: Coordinating the state between the Chat UI, the optimistic updates (showing a message immediately), and the actual tool execution result required disciplined state management in React Native.
What's next for SpunkAi
- Multi-Agent Collaboration: We want to allow a "Nutrition Coach" and a "Fitness Coach" to share a secure "Health Data" permission bucket so they can coordinate without exposing that data to a "Finance Coach."
- On-Device Actions: We plan to use the Expo
IntentLauncherto allow Coaches to trigger deep links into other apps (e.g., opening the actual Uber app with the destination pre-filled). - Creator Studio Web App: Currently, we add coaches via the database. The next step is a web portal where anyone can create, configure, and monetize their own SpunkAi Coach without writing code.
Built With
- expo.io
- node.js
- react-native
- revenuecat
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.