Fair Supply LogoFair Supply - Docs

Issues Agent

The Issues Agent analyses news articles related to an organisation and generates clustered ESG issues. It identifies adverse environmental, social, and governance impacts, classifies the organisation's level of involvement, and creates structured issue records in the database.

Architecture

Agent Workflow

The agent processes articles through four sequential steps:

Step 1: Filter

Each article is evaluated for ESG relevance. The agent skips articles about general business news, earnings, product launches, executive appointments, or industry news without ESG concerns. Only articles describing adverse impacts related to a satellite mode proceed.

Step 2: Classify

For qualifying articles, the agent walks through a structured decision tree to determine the organisation's involvement type:

InvolvementMeaning
CAUSED_BYThe organisation's own activities are sufficient to produce the adverse impact
CONTRIBUTED_TOThe organisation's activities increase the risk, but a third party must also act for the impact to occur
DIRECTLY_LINKED_TOThe organisation benefits commercially from a relationship where the impact occurs, without increasing the risk itself

The classification follows the OECD Guidelines for Multinational Enterprises and the UN Guiding Principles on Business and Human Rights. See the full Involvement Definitions for the complete framework, decision tree, and examples.

Step 3: Match

The agent compares each article against existing issues for the organisation. An article matches an existing issue if it covers the same incident, provides updates on it, or references the same event from a different source.

Step 4: Create or Update

  • Matched articles are connected to existing issues via the updateIssue tool
  • Unmatched articles are grouped into new issue clusters and created via the createIssue tool

When creating issues, the agent generates a title, a self-contained summary, assigns satellite modes, classifies involvement, and estimates a sentiment score.

Satellite Modes

Issues are tagged with one or more satellite modes that categorise the type of ESG concern:

ModeCovers
MODERN_SLAVERYLabour exploitation, forced work, human trafficking, child labour, debt bondage, sweatshops, wage theft
EMISSIONSCarbon/greenhouse gas emissions, pollution, toxic releases, environmental violations, waste dumping, chemical spills
BIODIVERSITYDeforestation, habitat destruction, wildlife trafficking, illegal logging, ecosystem damage, land clearing

Data Sources

Articles are loaded in parallel from two providers:

ProviderMethodScope
DiffbotKnowledge Graph article searchSingle query using ESG-related terms (forced labour, carbon emissions, deforestation, etc.) filtered by text content
TavilyWeb search APIThree separate searches by mode: modern slavery accusations, carbon emissions accusations, biodiversity accusations

All loaded articles are persisted via ArticleRepository before the agent processes them.

Outputs

The agent produces structured issue records stored in Neo4j:

OutputDescription
IssueTitle, summary text, date, sentiment score, involvement classification
Organisation-Issue linkConnects the issue to the organisation, tagged with satellite mode(s)
Article-Issue linkConnects supporting articles to the issue as references

Sentiment Scoring

Issues are assigned a sentiment score based on severity:

ScoreSeverity
-1.0Very negative (confirmed violations, legal action, deaths/injuries)
-0.7Negative (ongoing investigations, significant concerns, repeated incidents)
-0.5Moderately negative (allegations, potential violations)
-0.3Slightly negative (minor issues, early-stage concerns, isolated incidents)

Trigger Points

The agent can be triggered from three locations:

TriggerMechanism
Admin UIgenerateIssuesAction server action on the organisation admin page
Search enrichmentFires organisation.generate.issues event during organisation search
Analyst reportInvoked as a step within analyst report generation

The Inngest function organisation-generate-issues handles execution with a concurrency limit of 20 and a rate limit of once per organisation per 24 hours.

Key Files

FilePurpose
packages/core/src/application/ai/agents/issues-agent.tsAgent definition and system prompt
packages/core/src/application/ai/agents/tools/create-issue.tsTool for creating new issues
packages/core/src/application/ai/agents/tools/update-issue.tsTool for updating existing issues
packages/core/src/application/use-cases/issue/generate-organisation-issues.tsUse case orchestrating article loading and agent invocation
packages/core/src/application/jobs/organisation/generate-issues.tsInngest function for background execution
packages/core/src/infrastructure/repositories/issue-repository.tsIssue data access
packages/core/src/infrastructure/repositories/article-repository.tsArticle data access