Introducing Primal Assistants: A framework for software agents

Posted by & filed under on May 27th, 2013.

Primal does a lot of heavy lifting in knowledge representation and content filtering. If you ask it to grab you some relevant content around your interests, it will do precisely that.

But what if you don’t want to have to ask? Search engines are fantastic, but they still require that you go to them and then try to figure out how to formulate your query in a way that gets you decent results.

Primal already has the ability to understand what you want, and we’re now working on some technology that will let Primal deliver you the content that you truly care about before you know you want it.

Read on to learn more about Primal’s new software agent and content streaming framework.

What we’ve got cooking

If you want Primal to bring you the content you care about, or send that content to someone else on your behalf, or mix it all up in a blender so you can drink it in your morning protein shake… no problem.

Let’s say you have interests in Fitness and Travel. You’ve told Primal about these interests and Primal has dutifully created an interest graph to represent them. Now, you want to filter massive amounts of content through these interests as it becomes available, and route that to various places on your behalf.

Primalblogderek

Above we see how this might be done.

  • You’ve got Primal watching some content streams for you (Travel Destinations and Fitness Blogs).
  • The information from your favourite Fitness Blogs will get routed to a personalized RSS feed.
  • You’ve also set up periodic Email sends about places to travel.
  • What’s more is that you’re letting Primal tweet to your account about places that would be great to visit because they’re beautiful and let you experience specific adventures that intersect with your Fitness interests.

At the same time, all of the regular goodness that Primal provides is going to keep happening. As you interact with your interests regarding Fitness and Travel, Primal will update any content filtering associated with these interests, ensuring that it’s continually delivering to you content that really matters to you.

The Fun Stuff

I’m a coder and architect, and the fun stuff for me is all about the technical, so I find this agent and content streaming framework very interesting.

We’re talking about creating thousands to millions of little agents that work on your behalf when you’re not looking. This speaks to architecture and code that’s right in my wheelhouse of fun:

  • Message oriented programming. All of these little bits and pieces have to communicate with each other somehow and messages are a perfect solution to the problem.
  • 100% asynchronous, non-blocking, multi-threaded power. You can’t expect to run millions of these little bits of logic and expect to make any blocking calls, and running single threaded would… well, it would suck.
  • Real time interactions. What’s the point in tweeting about something 5 minutes after it happened? What if you want to interact directly with Primal in real time? Yeah… that’s awesome.
  • Scale. Enough said there.

Scala and Akka

These days, when I think about designing such a system, the first three things that pop into my head are Akka, Akka and Akka. After that, comes the inevitable, and awesome Scala.

These two tools are reshaping how I think about writing software for the Web. It’s not just that they let you write resilient software in the face of rampant concurrency; it’s also about, or even more about, how they help you think about your software.

The Primal agent framework involves so many moving parts, and relies so much on abstract messaging, I couldn’t imagine coding it up in anything else; not while also hoping it would succeed.

The Bottom Line

Essentially, we’re going to make it easy for you to leverage the power of Primal in interesting ways that even we haven’t yet thought of. You can think of it as the execution of your own personal workflows, which Primal will execute on your behalf.

Primalblogderek2

Got the idea? All of these little bits of functionality are alive and kicking as independent Actors, speaking to each other using simple messages. And who cares if these messages are standard Scala objects sitting in actor mailboxes, JSON messages coming from browsers, messages from external processes via Camel or anything else we might want to dream up?

The flexibility of the Actor model, coupled with the power of Primal’s interest graph capabilities, is going to make for an awesome piece of new technology.

Getting Started

If you’d like to dig deeper into your interest graph and start building your own next-generation user experiences, check out our developers site.

Recommended for you
Powered by

Topics: , , , , , ,