navidrome/core/agents
Deluan 1b5c68a203 refactor(log): mark secrets on their own line and cover session keys
Mark secret values with log.WithSecrets on a separate line instead of
nesting the call in argument lists. Also mark Last.fm/ListenBrainz session
keys written through SessionKeys.Put and the PasswordEncryptionKey checksum,
which still reached trace logs, and ignore values shorter than 8 characters
so a short plaintext marked after a failed encryption cannot mangle SQL text
or the [REDACTED] marker.
2026-09-28 20:06:28 -04:00
..
agents.go feat(plugins): surface the valid agent names in logs and the Plugins UI (#5910) 2026-08-30 11:11:35 -04:00
agents_plugin_test.go refactor: streamline agents logic and remove unnecessary caching (#4298) 2025-07-05 10:11:35 -03:00
agents_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
agents_test.go feat(plugins): surface the valid agent names in logs and the Plugins UI (#5910) 2026-08-30 11:11:35 -04:00
interfaces.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
interfaces_test.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
local_agent.go refactor(persistence): stateless repositories with per-call context (#6149) 2026-09-25 18:06:10 -04:00
local_agent_test.go feat(instant-mix): support album, playlist and genre sources (#5948) 2026-08-12 23:02:13 -04:00
README.md remove built-in Spotify integration (#5197) 2026-03-15 13:18:54 -04:00
session_keys.go refactor(log): mark secrets on their own line and cover session keys 2026-09-28 20:06:28 -04:00
session_keys_test.go refactor(log): mark secrets on their own line and cover session keys 2026-09-28 20:06:28 -04:00
song_test.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00

This folder abstracts metadata lookup into "agents". Each agent can be implemented to get as much info as the external source provides, by using a granular set of interfaces (see interfaces).

A new agent must comply with these simple implementation rules:

  1. Implement the AgentName() method. It just returns the name of the agent for logging purposes.
  2. Implement one or more of the *Retriever() interfaces. That's where the agent's logic resides.
  3. Register itself (in its init() function).

For an agent to be used it needs to be listed in the Agents config option (default is "deezer,lastfm"). The order dictates the priority of the agents

For a simple Agent example, look at the local_agent agent source code.