Unified learner for all coding agents (Claude Code, Codex, Gemini CLI, Goose, OpenCode).
Each agent has a provider module under Recollect.Learner.CodingAgent.*
that knows how to read that agent's specific directory layout. This module
implements the Recollect.Learner behaviour, dispatches to all enabled
providers, and aggregates results.
Adding a new agent
- Create
lib/recollect/learning/coding_agent/my_agent.ex - Implement the provider callbacks (see
Recollect.Learner.CodingAgent.Provider) - Add the module to
@providersbelow
Provider registry
| Agent | Module | Default data dir(s) |
|---|---|---|
| Claude Code | CodingAgent.ClaudeCode | ~/.claude/projects/ |
| Codex | CodingAgent.Codex | ~/.codex/ |
| Gemini CLI | CodingAgent.Gemini | ~/.gemini/ |
| OpenCode | CodingAgent.OpenCode | ~/.local/share/opencode/ |
| Goose | CodingAgent.Goose | ~/.config/goose/ |
Data paths can be overridden by passing an :agent_configs map
(keyed by agent name) through the opts. This allows the caller
(e.g. Worth) to inject paths from a central registry (e.g. AgentEx)
without creating a circular dependency.
Summary
Functions
Fetch events only from providers that pass the given filter.
Fetch events from authorized providers with optional project and time filtering.
Build [{module, config}] tuples for all providers.
Get the list of provider modules.
Run the full coding agent learning pipeline.
List available providers and their status.
Callback implementation for Recollect.Learner.summarize/2.
Functions
Fetch events only from providers that pass the given filter.
filter_fn receives the provider module and returns true to include it.
Used by Worth to gate providers behind user permission checks.
Fetch events from authorized providers with optional project and time filtering.
Options
:projects— map of%{agent_name => [project_slug, ...]}to filter by. If a provider has no entry, all its projects are included.:since— map of%{agent_name => %{project_slug => timestamp_string, ...}}to only fetch events newer than the given timestamps.:agent_configs— map of%{agent_name => %{data_paths: [...]}}to override default data paths. Injected by Worth from agent_ex's central registry.
Build [{module, config}] tuples for all providers.
overrides is a map of %{agent_name => %{data_paths: [...]}}.
Providers not in the overrides map use their default_data_paths/0.
Get the list of provider modules.
Run the full coding agent learning pipeline.
List available providers and their status.
Callback implementation for Recollect.Learner.summarize/2.