Skip to content

Multi-Domain Voice Automation Platform - The Swiss Army Knife of Voice Automation. One voice interface enables unlimited automation across weather, system monitoring, network infrastructure, trading, DevOps, and more via iPhone Shortcuts + Siri integration.

Notifications You must be signed in to change notification settings

the9ines/tinyintent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 TinyIntent v2.0.0 - Voice-Activated AI Assistant

A streamlined, production-ready AI platform that connects your iPhone to local AI models via voice commands.

⚑ Quick Start

# Install TinyIntent (one-time setup)
./install.sh

# Start TinyIntent server
tinyintent

# Your server is now running at http://YOUR_IP:8787
# Ready for iPhone voice shortcuts!

πŸ“± iPhone Voice Setup

  1. Open Shortcuts app on your iPhone

  2. Create new shortcut with these actions:

    • Dictate Text (Stop Listening: After Pause)
    • Get Contents of URL:
      • URL: http://YOUR_IP:8787/shortcut/route
      • Method: POST
      • Headers: X-Shortcut-Token: tinyintent-shortcut-token-123
      • JSON Body: {"text": "[Dictated Text]", "return_format": "text"}
    • Get Text from Contents of URL (extract speak field)
    • Speak Text
  3. Test: Say "Show me system logs" and hear the response!

🎯 Simple Commands

tinyintent              # Start server (default: port 8787)
tinyintent --port 9000  # Start on custom port
tinyintent status       # Show system status
tinyintent --help       # Show all options

πŸ“ Project Structure

tinyintent/
β”œβ”€β”€ tinyintent/           # Main CLI package
β”‚   β”œβ”€β”€ cli.py           # Streamlined CLI entry point
β”‚   β”œβ”€β”€ config.py        # Configuration management
β”‚   └── simple_server.py # Fallback server
β”œβ”€β”€ bridge/              # FastAPI service core
β”‚   β”œβ”€β”€ routes/          # Modular route organization
β”‚   β”‚   β”œβ”€β”€ shortcut.py  # iPhone Shortcut API (M11.0)
β”‚   β”‚   β”œβ”€β”€ health.py    # Health check endpoints
β”‚   β”‚   β”œβ”€β”€ helpers.py   # Helper management
β”‚   β”‚   β”œβ”€β”€ agents.py    # Agent lifecycle
β”‚   β”‚   └── system.py    # System operations
β”‚   β”œβ”€β”€ tinyrpc.py       # Main FastAPI app
β”‚   β”œβ”€β”€ security.py      # Authentication & authorization
β”‚   └── provenance.py    # Agent signing & tamper detection
β”œβ”€β”€ router/              # SmallIntent.mlmodel routing
β”‚   β”œβ”€β”€ SmallIntent.mlmodel  # CoreML intent classifier
β”‚   β”œβ”€β”€ train_router.swift  # Model training
β”‚   └── data/            # Training datasets
β”œβ”€β”€ helpers/             # Sandboxed task execution
β”‚   β”œβ”€β”€ bot_guard/       # Crypto trading helper
β”‚   β”œβ”€β”€ log_tailer/      # System log analysis
β”‚   β”œβ”€β”€ registry.py      # Helper discovery
β”‚   └── executor.py      # Sandboxed execution
β”œβ”€β”€ data/episodes/       # Episode logging & storage
β”œβ”€β”€ tests/               # Comprehensive test suites
β”œβ”€β”€ scripts/             # Utility & automation scripts
β”œβ”€β”€ docs/                # Documentation
β”œβ”€β”€ install.sh           # One-command installation
└── pyproject.toml       # Python packaging

πŸš€ Key Features

  • 🧠 SmallIntent.mlmodel - Local CoreML intent routing
  • πŸ“± iPhone Shortcut Integration - Voice commands via Siri
  • πŸ”’ Security Framework - Authentication, sandboxing, audit logging
  • πŸ€– Helper System - Extensible action execution
  • πŸ“Š System Monitoring - Health checks and metrics
  • 🌐 Tailscale Ready - Works anywhere with secure networking

🎯 Core Components

πŸ“± iPhone Shortcut API (M11.0)

  • Endpoint: /shortcut/route
  • Auth: X-Shortcut-Token header
  • Features: Voice-optimized text formatting, TTS optimization
  • Integration: Seamless Siri voice command processing

🧠 SmallIntent Router

  • Model: SmallIntent.mlmodel (CoreML, runs on Neural Engine)
  • Classification: gen (generative) vs act (action execution)
  • Training: Swift + CreateML β†’ CoreML artifacts
  • Performance: Sub-10ms inference on Apple Silicon

πŸ€– Helper Framework

  • Runtime: Node.js sandboxed execution with capability isolation
  • Security: CPU/memory limits, filesystem restrictions, network controls
  • Registry: YAML-based discovery with lifecycle management
  • Available Helpers:
    • bot_guard - Crypto trading position management
    • log_tailer - System log analysis and monitoring

πŸ“‹ Voice Commands

Try saying these to your iPhone:

  • "Show me recent error logs"
  • "Check system health"
  • "What's my server status?"
  • "Get my trading positions"

πŸ§ͺ Testing & Development

# Run comprehensive test suite
make test

# Individual test suites
./tests/health.sh         # System health checks
./tests/auth.sh           # Authentication testing
./tests/routes.smoke.sh   # API endpoint validation
./tests/router_smoke.sh   # Router model testing
./tests/helpers_smoke.sh  # Helper framework testing

# Advanced commands
tinyintent --reload       # Development mode with auto-reload
make doctor              # System diagnostic report
make router-train        # Train new intent classification model

πŸ”§ Configuration

Environment variables (auto-configured with defaults):

TINYINTENT_PORT=8787                              # Server port
SHORTCUT_TOKEN=tinyintent-shortcut-token-123      # iPhone auth token
TINYINTENT_EXECUTION_ENABLED=1                    # Enable helper execution
TINYINTENT_SECRET=your-secret-here                # API authentication

πŸ“š API Documentation

  • GET /health - Health check
  • GET /shortcut/ping - iPhone Shortcut health check
  • POST /shortcut/route - Voice command routing
  • GET /docs - Interactive API documentation
  • GET /helpers - Available helpers list
  • POST /helpers/{id}/preview - Helper preview mode

πŸ” Security & Privacy

  • πŸ”’ Local-First: All inference runs locally (no cloud calls)
  • πŸ›‘οΈ Sandboxed Execution: Helpers run in isolated environments with CPU/memory limits
  • πŸ”‘ Multi-Layer Auth: Token-based authentication for iPhone + API secret for advanced access
  • πŸ“‹ Audit Logging: Full request/response/error logging with tamper detection
  • 🚦 Lifecycle Gates: Agent staging, approval workflows, and emergency kill switches
  • πŸ” Provenance Tracking: Cryptographic signing and tamper-evidence for all agents

🧠 System Architecture

iPhone (Siri) β†’ Shortcuts β†’ TinyIntent Bridge β†’ SmallIntent.mlmodel β†’ Helpers β†’ Response

πŸ” Troubleshooting

"Command not found": Run ./install.sh first
"Connection refused": Check firewall and network settings
"Invalid token": Verify X-Shortcut-Token header matches configuration
"Module not found": Ensure you're in the TinyIntent project directory

πŸ“š Documentation

  • README_STREAMLINED.md - Quick start guide
  • docs/iOS_SHORTCUTS.md - iPhone Shortcut setup
  • PRD.md - Complete product requirements
  • CLAUDE.md - AI assistant context

πŸ› οΈ Advanced Operations

# System diagnostics
make doctor

# Security operations  
./scripts/rotate_secret.sh      # Rotate API secret
./scripts/print_urls_and_secret.sh  # Show current config

# Data management
./scripts/export_episodes.sh    # Export training data

TinyIntent v2.0.0 - Built with ❀️ for voice-first AI interaction

Note: This is a local-first platform. No data leaves your Mac.

About

Multi-Domain Voice Automation Platform - The Swiss Army Knife of Voice Automation. One voice interface enables unlimited automation across weather, system monitoring, network infrastructure, trading, DevOps, and more via iPhone Shortcuts + Siri integration.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published