Global Threat Map
Map global security events, conflicts, and military presence in one situational-awareness workspace.
The README distinguishes a public Mapbox token from server-side Valyu/OpenAI secrets and identifies external APIs, OAuth PKCE, local storage, billing, and cited sources, providing useful data-flow, external-effect, and attribution visibility. Deductions apply because self-hosted mode exposes deployer-funded features to every user, while rate limits, least-privilege controls, confirmation for costly operations, token-storage safeguards, dependency auditing, retention, and rollback or revocation procedures are not documented.
The stack, routes, dependencies, and general operating flow mostly align, and required external services are identified. Deductions apply because the README says Node.js 18+ while package.json requires >=22.13.0, installation uses npm while the manifest specifies pnpm, and the stated MIT license conflicts with ISC metadata. No evidence covers error states, timeouts, retries, degradation, or actionable failure messages.
The repository thoroughly identifies target users and scenarios for map exploration, event filtering, country conflicts, entity research, alerts, self-hosting, and OAuth operation. Capability entry points and authentication gates are reasonably clear, including marking geographic alerts as forthcoming. Deductions apply because query limits, acceptable research scope, and accidental-trigger controls are not defined, while conflicting Node and package-manager guidance weakens environment fit.
The README has clear sections for features, structure, installation, usage, API routes, and authentication, with several interaction examples. Deductions apply for conflicting environment instructions, the lack of a real FAQ and comprehensive limitations, contradictory MIT/ISC licensing, and the absence of a changelog, release policy, named maintainer, or clear support path; versioning is limited to package version 1.0.0.
The interactive map, filterable feed, cited research, and CSV, PowerPoint, and PDF exports describe directly usable outputs with meaningful aggregation value over a basic news list. Deductions apply because claims of roughly 50 pages, hundreds of sources, real-time coverage, and comprehensiveness are unsupported by examples; generation takes 5–10 minutes and consumes deployer-funded API usage without cost estimates, quotas, or documented quality tradeoffs.
The README says conflict and research outputs include citations and source URLs and identifies Valyu search, answer, and deep-research services as their origin, establishing a basic traceability path. Deductions apply because no representative output, citation schema, or corroboration workflow is shown, and the documentation does not clearly separate retrieved facts from model synthesis, location inference, or threat-level classification.
- The README claims MIT while package.json declares ISC; verify the governing license before deployment or redistribution.
- Self-hosted mode exposes deployer-funded Valyu functionality to all users; add authentication, rate limits, quotas, and confirmation for expensive research before public deployment.
- The README's Node.js 18+ requirement conflicts with package.json's >=22.13.0 engine, and its npm instructions conflict with [email protected].
- OAuth user and access-token-related state is stored in localStorage, but the supplied material does not document XSS defenses, expiry, revocation, or cleanup.
- Geopolitical and threat content may contain model synthesis or inference; verify original sources, dates, and inference chains before operational, security, or policy use.
What does this agent do, and when should you use it?
Global Threat Map is a Next.js 16 situational-awareness application that presents conflicts, protests, disasters, and diplomatic developments through a dark Mapbox interface and real-time event feed. Users can filter events by category or threat level, inspect current and historical conflicts by country, and display US and NATO military bases. The application uses valyu-js for Valyu Search, Answer, and Deep Research, producing sourced conflict analysis, entity dossiers, CSV datasets, PowerPoint briefings, and PDF reports. Its server boundary includes API routes for events, entities, research tasks, reports, country conflicts, and military bases, while Zustand manages map state. It can run without user authentication in self-hosted mode or use Valyu OAuth with PKCE, although both deployment modes retain external mapping and intelligence-service dependencies.
The /api/events route retrieves global events through Valyu; lib/event-classifier.ts classifies them and lib/geocoding.ts extracts locations before components/map/threat-map.tsx and the event feed render the results. The map provides clustering, a density heatmap, navigation, eastward auto-pan, and threat-colored markers. Selecting a country opens country-conflicts-modal.tsx, backed by /api/countries/conflicts, with separate current and historical conflict views. /api/military-bases supplies US and NATO installation locations with a one-hour cache. Entity research uses /api/entities and plots known locations as purple markers. /api/deepresearch creates an asynchronous research task and /api/deepresearch/[taskId] polls its status and results, with outputs described as an approximately 50-page report, structured CSV, eight-slide PowerPoint briefing, and PDF. Alerts accept keywords and threat levels; geographic-region rules are marked as coming soon.
- An OSINT analyst monitoring conflicts, protests, natural disasters, and diplomatic events can filter a single map by category and threat severity.
- A security researcher preparing a briefing can investigate a nation, militia, PMC, cartel, or political figure and export a sourced dossier in report, CSV, PowerPoint, or PDF form.
- A geopolitical researcher can select a country to separate ongoing tensions and security threats from historical wars, participants, dates, and outcomes.
- A newsroom or risk team tracking breaking developments can create keyword and threat-level alerts, then jump from the event feed to mapped locations.
- A military-presence researcher can overlay named US bases and NATO installations and inspect their types and host countries.
What are this agent's strengths and limitations?
- Combines a filterable event feed, country conflict records, entity locations, and US/NATO base overlays in one Mapbox interface with clustering and heatmaps.
- Valyu Deep Research produces multiple usable deliverables—long-form analysis, structured CSV, an eight-slide briefing, and PDF—rather than only an on-screen answer.
- Supports both a no-login self-hosted mode using the operator's API key and a Valyu OAuth 2.0 PKCE mode for authenticated users.
- Documents concrete API boundaries for events, entities, research jobs, reports, country conflicts, and military-base data.
- Core intelligence retrieval and synthesis depend on Valyu Search, Answer, and Deep Research; changing providers would require new integration work.
- Map rendering requires a Mapbox token, while enhanced location extraction adds an optional OpenAI API dependency, creating a multi-service deployment.
- Deep-research generation takes 5–10 minutes and requires asynchronous polling, which does not suit workflows expecting immediate results.
- Geographic-region alerts are explicitly marked as coming soon, so the documented alert scope is incomplete.
- The supplied repository metadata lists the license as unknown while the README says MIT; adopters should verify the repository's actual license file.
How do you install or deploy this agent?
Install Node.js 18+ and obtain a Mapbox account and token plus a Valyu API key. Clone the repository, enter its root directory, and run npm install. Create .env.local containing at least NEXT_PUBLIC_MAPBOX_TOKEN=your_mapbox_token_here, VALYU_API_KEY=your_valyu_api_key_here, and NEXT_PUBLIC_APP_MODE=self-hosted. Optionally add OPENAI_API_KEY=your_openai_api_key_here for AI-assisted location extraction. Run npm run dev, then open http://localhost:3000. A Railway deployment button is provided, but the source does not document the complete Railway configuration procedure.
How do you use this agent?
After startup, pan or zoom the map, select an event marker for its details, select a country for current and historical conflict tabs, or select a base for its name, type, and host country. The event feed can be filtered by Critical, High, Medium, Low, or Info threat levels and by categories such as Conflict, Protest, Disaster, and Diplomatic; keyword search can also fly the map to a matching event. The bottom-left play/pause control toggles automatic map movement. For an intelligence dossier, submit a nation, organization, or person and poll the asynchronous research task; generation is documented as taking 5–10 minutes, after which report, CSV, PowerPoint, and PDF deliverables are available. Valyu OAuth deployments additionally require the documented authorization URL, client credentials, application URL, and redirect URI.
FAQ
Does self-hosted mode require users to sign in?
NEXT_PUBLIC_APP_MODE=self-hosted is the default, hides the sign-in panel, and exposes all features to users. Valyu API usage is billed to the operator's account.Which credentials are mandatory?
What can an unauthenticated user access in Valyu mode?
How are unfinished or failed deep-research tasks handled?
/api/deepresearch and polls /api/deepresearch/[taskId] for status and results. The source gives a typical duration of 5–10 minutes but does not document retry, timeout, or recovery behavior.Are military-base locations fetched afresh on every view?
/api/military-bases route uses a one-hour cache, and the map loads the base data automatically during initialization.