Smith (Agent Smith) GitHub release (latest SemVer)

Smith Fleet Management

Smith is an open-source fleet management system built in Rust for managing distributed IoT devices at scale. Born from managing thousands of devices across healthcare facilities, Smith provides the automation and reliability you need to deploy, monitor, and update your fleet with confidence.

Why Smith?

  • Built for Scale: Manage everything from hundreds to thousands of devices
  • Reliable: Designed for >99% uptime in critical environments
  • Seamless Updates: Deploy upgrades and rollbacks with zero manual intervention
  • Transparent: Open-source infrastructure you can trust and extend

Architecture

Smith consists of five main components:

  • smithd: Daemon that runs on each device to execute deployments and report status
  • updater: Daemon that keeps smithd up to date
  • api: Backend service managing deployment configurations and fleet status
  • dashboard: Visual interface to monitor your fleet in real-time
  • cli (sm): Command-line tool for fleet administrators

Getting Started

Visit our documentation to get started with Smith.

Contributing

We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help makes Smith better for everyone. Check out our issues or submit a PR.

Security

Security is a top priority for Smith. If you discover a security vulnerability, please email security@teton.ai. We operate a bug bounty program and have paid bounties for responsibly disclosed vulnerabilities. See our Security Policy for more details.

License

The Smith source and documentation are released under the Apache License 2.0

Getting Started

Installing the Smith CLI (Command Line Interface)

Download and install

Let's install sm the Smith CLI (Command Line Interface) on your system using the terminal commands below.

curl -fsSL https://docs.smith.teton.ai/install.sh | sh

Testing your installation

After installing the sm CLI, you can test your installation by running the following command:

sm --version

Use sm help to see help text documenting Smith's flags and usage.

Integrations

The smith-api includes several pre-built integrations that can be easily configured to enhance your application.

Available Integrations

These integrations are optional and can be enabled by setting specific environment variables in your deployment configuration.

Sentry API Error Reporting

Purpose: Provides real-time error tracking and monitoring for your API.

Configuration:

  • Set the SENTRY_URL environment variable with your Sentry DSN (Data Source Name)
  • Example: SENTRY_URL=https://abc123@sentry.io/123456

Benefits:

  • Automatically captures and reports API exceptions
  • Tracks performance issues
  • Provides detailed error context for faster debugging

Slack Notifications

Purpose: Sends automated notifications to your Slack workspace when important events occur.

Configuration:

  • Set the SLACK_HOOK_URL environment variable with your Slack Incoming Webhook URL
  • Example: SLACK_HOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Benefits:

  • Real-time alerts when new devices register with the API
  • Keep your team informed of system activity
  • Customize notification content in Slack's webhook settings

Victoria Metrics

Purpose: Time-series database and monitoring solution for collecting and visualizing API metrics.

Configuration:

  • Set the VICTORIA_METRICS_URL environment variable with your Victoria Metrics instance URL
  • Set the VICTORIA_METRICS_AUTH_TOKEN environment variable with your authentication token
  • Example:
    VICTORIA_METRICS_URL=https://your-vm-instance.example.com
    VICTORIA_METRICS_AUTH_TOKEN=your-auth-token
    

Benefits:

  • High-performance metrics collection
  • Long-term storage of monitoring data
  • Compatible with Prometheus querying and visualization tools

IP-API Geolocation

Purpose: Automatically enriches device IP addresses with geolocation data including country, city, ISP, and coordinates.

Configuration:

  • Set the IP_API_KEY environment variable with your IP-API Pro key
  • Example: IP_API_KEY=your-pro-api-key

Features:

  • Smart Updates: Only updates geolocation data when it's older than 24 hours, minimizing API calls
  • Background Processing: Geolocation lookups happen asynchronously without blocking device ping responses
  • Comprehensive Data: Collects country, city, region, ISP, coordinates, proxy/hosting detection
  • Graceful Fallback: When no API key is configured, only stores IP addresses without geolocation data

Database Schema: The system automatically stores geolocation data in the ip_address table with the following fields:

  • continent, continent_code
  • country_code, country
  • region, city
  • isp
  • coordinates (PostgreSQL POINT type for latitude/longitude)
  • proxy, hosting (boolean flags)
  • created_at, updated_at (automatic timestamps)

Benefits:

  • Track device geographical distribution
  • Identify unusual network activity (proxy/hosting detection)
  • Generate location-based analytics and insights
  • Minimal impact on API performance due to smart caching

Implementation Example

Add these environment variables to your deployment configuration:

# Error Reporting
SENTRY_URL=https://your-sentry-dsn

# Event Notifications
SLACK_HOOK_URL=https://hooks.slack.com/services/your-webhook-url

# Metrics and Monitoring
VICTORIA_METRICS_URL=https://your-vm-instance.example.com
VICTORIA_METRICS_AUTH_TOKEN=your-auth-token

# IP Geolocation
IP_API_KEY=your-pro-api-key

Additional Information

For more details on configuring these integrations or for troubleshooting, refer to each provider's documentation linked above.