Agents

Agents are the main component of the Automation Pipeline. They are the tool that receives events (in most cases) and processes them, emitting events.

The general Agent has the following configuration information:

  • description (required) = a description that will be shown on the front end

  • schedule (required) = how often that agent should run

  • keep_events_for (required) = how long before we delete its events

  • criteria (agent-dependent) = the criteria that is configured by the end user.

  • group_criteria (agent-dependent) = whether the agent subscribes to only certain events.

Agents have a "process" method that, in all cases, performs all of their processing. It is expected that, unless necessary, they will have an "process_event" as well. This will process each event. It is expected that the event's payload will be passed on downstream as well (unless the proces_event returns a false).

Agents, unless customized, use a "search_query" that will find their events to process. This query is run, and a list of "results" is produced. They are fed into a loop that runs the process_event on each of them.

Given all this "commonality", a child agent will have often just a "process_event" implemented. the rest can be inherited by the basic system.

Segment-based Agents

For segment-based agents (InfluencerSegment), they also take a "segment_id" as part of their configuration. They do not receive events. They only produce them. By default, they emit a new event every time a new object (Influencer, Mention, Backlink, Page) matches their segment criteria.

Conditional/Grooming Agents

There a a number of agents that are built to split events, limit the reate of events, filter events, etc. These are built as agents as well.

Update and Edit Information Agents

Currently there are Update Field (updates an object's field) and AddField (updates an event with data that is passed downstream). These are so we can update information. There is also a "Add to Negatives List" that will add an Influencer to the project's negatives list. This should have the consequence that it will take it out of processing across all project pipelines.

Service-based Agents

Based on our Service models (Twitter, Facebook GooglePlus, etc.) we can take actions with an object based on usage of this service (follow, unfollow, send messages, etc.). These use our existing message templates.

Connections

Agents are connected using a "connection". Both agents have to be saved first (so they have ids). These connections are what the agent uses to determine what events to listen for.

Last updated