Agent dev question

Hi all,

 

Wanna develop an agent for localized information like title, casts and summary, but I want fetch some info from other agents, like artworks, posters.

 

So how to call another agents' functions from this agent?

 

Thanks

I moved this to the Metadata Agents forum (instead of the channel forum).  Hopefully you'll get more response in here.

I moved this to the Metadata Agents forum (instead of the channel forum).  Hopefully you'll get more response in here.

Thanks. I found this mistake just after posting

So how to call another agents' functions from this agent?

Hi!

Agents do not call eachother. They all do a search and contribute to the "big pile of metadata". The order in which the agents are listed in the settings determines what piece of metadata is used from each agent.

There's always a primary agent (Freebase is one for example) and zero or more secondary agents. The primary agent is reponsible for looking up a unique id for a file, based on the information extracted from the filename (usually a title and a year). In case of Freebase, this unique id is the id used by IMDb. Freebase also retrieves a title, duration, genres, directors, writers, actors, studio, tagline, content_rating, year, originally_available_at and countries.

The seconday agents make use of the id found by the primary agent and can do their own lookups based on this id. MoviePosterDB is an example of a secondary agent that can work together with Freebase. Searches done by the MoviePosterDB agent are all based on the IMDb id.

If you want to create your own agent, you have 3 options:

  1. Create your own primary agent that gets you all the metadata you need/want without the help of any other agent. In this case it doesn't really matter what unique id you're using to identify a movie (as long as it's unique);
  2. Create your own primary agent and see what other (existing) agents can work together with your agent. This requires that your own agent uses an id that can be used by the other agent(s), for exampe:
     - IMDb id: to make use of MoviePosterDB and/or OpenSubtitltes;
     - The Movie Database id: to make use of The Movie Database;
     - TheTVDB id: to make use of TheTVDB and/or Plex Theme Music.
  3. Create your own secondary agent for an existing primary agent.

There's always a primary agent (Freebase is one for example) and zero or more secondary agents. The primary agent is reponsible for looking up a unique id for a file, based on the information extracted from the filename (usually a title and a year). In case of Freebase, this unique id is the id used by IMDb. Freebase also retrieves a title, duration, genres, directors, writers, actors, studio, tagline, content_rating, year, originally_available_at and countries.

The seconday agents make use of the id found by the primary agent and can do their own lookups based on this id. MoviePosterDB is an example of a secondary agent that can work together with Freebase. Searches done by the MoviePosterDB agent are all based on the IMDb id.

Hi,

Thanks for the detailed reply.

If I follow this manner, I still have a question:

Since I want my primary agent provide some localized info, but it cannot provide too much, thus I want the secondary one to complement it. How can I make sure the secondary agent does not overwrite the localized info provided by the primary one

Or should I make my agent the secondary agent and last one in the setting, so it can overwrite what I want?

Since I want my primary agent provide some localized info, but it cannot provide too much, thus I want the secondary one to complement it. How can I make sure the secondary agent does not overwrite the localized info provided by the primary one

This can be done by putting your own agent at the top of the list with agents.

Here's an example: both Freebase and Moviepilot (a secondary agent that grabs German metadata) will contribute a title.

If Freebase is listed above Moviepilot, the title contributed by Freebase will be used:

40674924.jpg

However, if we change the order of the agents and drag Moviepilot above Freebase, the title contributed by Moviepilot will be used:

62334887.jpg

This can be done by putting your own agent at the top of the list with agents.

Great. I have managed to solve this.

Last question: If I understand correctly, The order you mentioned does affect agents' update functions, how about the search functions? I think the primary agent's search should be called first, am I right?

Thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.