Pennyworth

Context Sensing for Mac OS X

Download Pennyworth 1.4
(Requires Mac OS X 10.5)

Introduction

Pennyworth is a system developed for Mac OS X that provides contextual information about its user to other applications. This contextual information may be used to drive adaptive user interfaces, take specific actions on context changes, or create fine-grained logs about the user's context throughout the day.

Pennyworth gathers contextual information from its user using a variety of sensors to continually capture clues about the user's context. A machine learner processes these clues and generates predictions about the user's location, activity, and social context. When the system notices that an element of the user's context has changed, it broadcasts the change to compatible applications and executes scripts on the user's behalf.

Pennyworth is designed to be useful to both software developers and end-users. Software developers can implement context-aware functionality by including code that listens for Pennyworth's context broadcasts. End-users may make their own computer environments context-aware by creating AppleScripts that manipulate other applications on context changes. Using these mechanisms, both developers and users with a wide variety of technical experience and skills can realize the promise of context-aware computing.

(Click here to read more about context-aware computing.)

How it works

Unlike similar systems like MarcoPolo, Pennyworth eschews a rule-based approach to modeling your context in favor of more flexible machine learning and artificial intelligence techniques. The heart of Pennyworth is a C4.5 decision tree that learns your context through supervised training.

When you launch Pennyworth for the first time, it will not know you, and it will require you to teach it about yourself by providing labels that describe your context. For example, as I type this paragraph, I would tell Pennyworth that I am at Home, my activity is Writing, and I am Alone. Pennyworth does not dictate the labels that you must use to describe your context -- it uses the descriptions that work best for you.


Pennyworth's current predictions display

As you go to other places, engage in other activities, or find yourself in the presence of other people, you would update your labels accordingly. As you provide Pennyworth with more examples of your context, the more intelligent Pennyworth becomes. After a short training period, it becomes intelligent enough to predict your context based upon what it senses in your environment. Training becomes less and less necessary.

Pennyworth can learn to distinguish between various contexts because it constantly observes you and your surroundings in order to discover the best features of your environment that can be used to predict your context. For example, it may learn your location based upon the wireless access points that it observes. It can predict your activity based upon the combination of applications you are running at one time. It may predict your social context by recognizing your acquaintances' mobile devices using Bluetooth device discovery. (A full list of Pennyworth's sensors with accompanying rationales is available here.)

Getting started

If you would like to begin Pennyworth, please follow these steps:

  1. Download Pennyworth.
    (I also recommend that you download and install Growl as well.)

  2. Uncompress the downloaded .tbz file by double-clicking it in the Finder window. The Pennyworth application will appear. (It uses a bell icon.)

  3. Copy Pennyworth to its permanent location.
    (This is usually the Applications folder.)

  4. Launch Pennyworth and begin training it.

  5. Begin exploring Pennyworth-compatible applications or check out the AppleScript repository for scripts to control applications such as iTunes and Growl.

Questions, comments, or suggestions?

If you have any questions, comments, or suggestion, please send them via e-mail to

If you would like to discuss Pennyworth with other users, I created a Google Group for this purpose. You can join this group by visiting this link. On the Google Groups page, you may subscribe to the discussion via e-mail.

I also maintain a research weblog dedicated to thinking about context-sensitive applications and devices. If you would like to follow this discussion, please see The Context Blog, located at

I use this site to track my current thoughts and plans for Pennyworth and other context-aware systems.

Developing and extending Pennyworth

Pennyworth is an Objective-C application made available under the BSD license. Source code is available via Subversion from Google Code. The Pennyworth source code may be found under Tools/Applications/Pennyworth.

If you are an application developer and would like to add support for context sensing with your application, please see the developer documentation for details.

If you would like to learn more about how to use Pennyworth to control existing applications, please see the AppleScripting documentation.

If you have any questions about developing for Pennyworth, please send an e-mail to the address above. Since I am primarily interested in facilitating the creation of context-aware systems, I take user and developer feedback very seriously.