Skip to content

514-labs/agent-adsb

Repository files navigation

ADS-B Flight Anomaly Monitor

Real-time military aircraft monitoring with AI-powered anomaly detection. Built on the MooseStack typescript-agent template.

Flight Anomaly Dashboard

What you get:

  • Live dashboard with aircraft map, altitude/time charts, and emergency breakdown
  • AI chat agent that can identify aircraft types, detect anomalies, and explain squawk codes
  • Semantic query layer — same metrics power both the dashboard and the chat
  • Bedrock Guardrails blocking harmful prompts before the model is called
  • Full Langfuse tracing on every tool call

Langfuse trace

Setup

Prerequisites: Docker Desktop, Node.js >= 20, pnpm 10.33+

# Install CLIs
bash -i <(curl -fsSL https://fiveonefour.com/install.sh) 514,moose

# Clone and set up
git clone https://github.com/514-labs/agent-adsb.git
cd agent-adsb
pnpm install
pnpm env:prepare

Edit packages/web-app/.env.local with your provider credentials:

AI_PROVIDER=anthropic          # or bedrock, openai
ANTHROPIC_API_KEY=sk-ant-...   # or AWS credentials for bedrock

Optionally add Langfuse keys for tracing:

LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_BASE_URL=https://us.cloud.langfuse.com

Start everything:

pnpm dev:start

Sign in as "NORAD Watch" at http://localhost:3000. Data flows immediately — no seed step needed.

Try asking:

  • "How many aircraft are in the air?"
  • "What type of plane is SNY04?"
  • "Are there any emergency squawks?"
  • "Show me aircraft with rapid descent rates"

Architecture

adsb.lol ──30s poll──> Workflow ──> IngestApi ──> Stream ──> ClickHouse
                                                                  |
                                                       defineQueryModel
                                                      /              \
                                                Dashboard        MCP Tools
                                                (toSql)     (registerModelTools)
                                                                  |
                                                            AI Chat Agent
                                                                  |
                                                         Langfuse + Guardrails
Component File
Data model packages/moosestack-service/app/ingest/models.ts
Polling workflow packages/moosestack-service/app/workflows/poll-adsb.ts
Semantic layer packages/moosestack-service/app/semantic/aircraft-metrics.ts
MCP server packages/moosestack-service/app/mcp/server.ts
Agent prompt packages/agent-runtime/src/prompts/default-system.ts
Dashboard packages/web-app/src/app/page.tsx

Key patterns

  • Semantic layer as single source of truthdefineQueryModel powers dashboard (toSql), chat agent (registerModelTools), and REST APIs (buildQuery)
  • ClickHouse best practices — schema optimized with the clickhouse--best-practices skill (cardinality ordering, defaults over nullable, LowCardinality)
  • Bedrock Guardrails — prompts checked via ApplyGuardrailCommand before agent execution
  • Live data pipeline — 30s polling workflow with field mapping and error handling

How it was built

This app was built step-by-step following TUTORIAL.md, which walks through customizing the typescript-agent template for a real use case. See the tutorial for the full walkthrough.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages