|KATO||Everyone needs a sidekick|
Here are some sample agents explained line by line.
The Feed Tweeter agent scans an RSS or ATOM feed and posts a tweet every time the match for a keyword search returns results.
The Email agent scans the in-box of an Email account and posts a tweet every time you recently received an email from a particular sender.
The Marketing Crossing agent provides a good example of how to code an agent that scans a job board site not yet using syndication feeds.
Let's go over, line by line, the feed tweeter agent for PHP.
Let's go over, line by line, the email checker agent for Java. Java agents in KATO depend on the JADE framework.
The Marketing Crossing agent scans a specific site (i.e. Marketing Crossing) that doesn't use syndication. It posts links to job descriptions whose title matches any of the words in the search parameter. This is a good example to build an agent of your own that scans the job boards that you are interested in. Keep in mind that this is unnecessary for those job boards that use syndication. In that scenario, the feed tweeter agent will work fine.
The code for this agent has both the KATO Java agent (MarketingCrossingAgent) and a JUnit suite (AllTests) and test (MarketingCrossingReaderTest). The MarketingCrossingReader class encapsulates all knowledge about the Marketing Crossing web site and is used by both the agent and the unit test. What this reader should do when a match is found is decoupled by calling on the ProcessPageRequest interface that both the agent and the unit test provides different handlers for. The handler for the software agent tweets the relevant links. The handler for the unit test just prints out the title and link to the console.
The software agent saves tweeted links and checks against this list to ensure that no link ever gets tweeted twice.