Huginn is an open-source system for building agents that perform automated tasks online. Created by @cantino in 2013, it allows users to create agents that read the web, watch for events, and take actions on their behalf. Think of it as a self-hosted, hackable alternative to IFTTT or Zapier where you maintain full control over your data.

The name “Huginn” comes from Norse mythology—Huginn (“thought”) was one of Odin’s two ravens that flew across the world gathering information.

Core Concepts

Event-Driven Architecture

Huginn’s agents create and consume events, propagating them along a directed graph. This allows for complex automation workflows where:

  1. Source agents generate events (e.g., monitoring a website, receiving emails)
  2. Processing agents transform or filter events
  3. Action agents perform outputs (e.g., sending notifications, posting to APIs)

Agent Types

Huginn includes 68+ built-in agents covering various categories:

Data Sources

  • RSS feeds, websites, IMAP email, FTP sites
  • Twitter, Slack, Telegram, Jabber
  • Dropbox, S3, local files

Data Processing

  • JSON parsing, CSV handling, JavaScript execution
  • Change detection, de-duplication, peak detection
  • Sentiment analysis, translation (Google API)
  • jq processing, Liquid templating

Actions & Outputs

  • Email (single and digest), Push notifications (Pushbullet, Pushover)
  • Webhooks, HTTP POST requests
  • Slack, HipChat, Telegram, Jabber messaging
  • Shell commands, MQTT publishing
  • Google Calendar, Evernote, JIRA integration

Workflow Control

  • Scheduling, delays, manual triggers
  • Commander agents for agent management
  • Gap detection, attribute differencing

Key Features

  • Self-Hosted: Runs on your own server—you always know who has your data
  • Extensible: Agents can be written as external gems via ADDITIONAL_GEMS
  • Visual Workflow: Web interface shows event flow diagrams
  • Flexible Deployment: Docker, Heroku, OpenShift, or manual installation
  • Ruby/Rails: Built with Ruby on Rails, uses MySQL or PostgreSQL

Use Case Examples

From the official documentation:

  • Track weather and get “Don’t forget your umbrella!” emails
  • Monitor Twitter terms and detect discussion spikes (e.g., “machine learning” trending)
  • Watch for travel or shopping deals
  • Scrape websites and receive alerts on changes
  • Send digest emails at specific times
  • Track location over time
  • Create Amazon Mechanical Turk workflows (HumanTaskAgent)
  • Run custom JavaScript/CoffeeScript functions

Technical Stack

ComponentTechnology
FrameworkRuby on Rails
DatabaseMySQL or PostgreSQL
Background JobsForeman
TestingRSpec, PhantomJS
DeploymentDocker, Heroku, OpenShift

Getting Started

Docker (Recommended)

# See official Docker documentation
# https://github.com/huginn/huginn/blob/master/doc/docker/install.md

Local Development

git clone https://github.com/huginn/huginn.git
cp .env.example .env
# Edit .env (set APP_SECRET_TOKEN)
bundle install
bundle exec rake db:create db:migrate db:seed
bundle exec foreman start
# Visit http://localhost:3000 (admin/password)

Custom Agent Development

Huginn encourages writing complex/specific agents as external gems:

# See https://github.com/huginn/huginn_agent
# for the agent gem template

General-purpose agents continue to be added to core, while specialized agents can be distributed as gems.

Comparison with Alternatives

FeatureHuginnn8nZapier
Self-hosted
Open source✅ (MIT)✅ (Fair-code)
Visual editor
No-codePartial
Custom code✅ (Ruby, JS)✅ (JS)Limited
Data ownershipFullFullThird-party

Resources

License

MIT License - free for personal and commercial use.