stemedb/latent/ingest-reddit/adk-agent/config.py
jordan b3e8a9a058 feat: Multi-application expansion with chaos testing and community UI
Major additions:
- Community Next.js app (port 18187) for browsing claims with API docs
- stemedb-chaos crate: Fault injection, chaos testing, CRDT properties
- Latent ingestion system: Reddit/FDA ingesters with ADK-Go agents
- Disputed claims handling: Manual review workflows and validation
- Aphoria security scanner: New extractors (SQL injection, command
  injection, weak crypto, TLS version), policy-based ignores, UAT reports
- Docker infrastructure: Dockerfile, docker-compose.yml for full stack
- VulnBank demo: Intentionally vulnerable multi-language test corpus

SDK & API enhancements:
- Source registry handlers for tracking data provenance
- Metrics endpoint
- Skeptic filtering improvements

Code quality:
- Split 14 large files (>500 lines) into focused modules
- All files now under 500-line limit per project guidelines

Documentation:
- Chaos testing guide, circuit breakers, observability docs
- Phase 7 UAT documentation updates
- Martin Kleppmann technical writer agent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:24:14 -07:00

54 lines
1.2 KiB
Python

"""Configuration constants for the Reddit Adverse Event Agent."""
import os
# StemeDB API
STEMEDB_URL = os.getenv("STEMEDB_URL", "http://localhost:18180")
# Reddit scraping
TARGET_SUBREDDITS = ["Ozempic", "Mounjaro", "Semaglutide", "Wegovy"]
ADVERSE_EVENT_KEYWORDS = [
"stomach",
"paralysis",
"gastroparesis",
"vomit",
"nausea",
"emergency",
"hospital",
"pain",
"stopped working",
"hair loss",
"side effect",
"adverse",
"reaction",
]
# Reddit HTTP headers
REDDIT_HEADERS = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
"Accept": "application/json",
}
# StemeDB Source Class for Social/Anecdotal (Tier 5)
SOURCE_CLASS_SOCIAL = "Anecdotal"
# Confidence limits for Tier 5 data
# Per plan: 0.3-0.7 max for anecdotal data
MIN_CONFIDENCE = 0.3
MAX_CONFIDENCE = 0.7
# Lifecycle stage - all assertions start as Proposed
DEFAULT_LIFECYCLE = "Proposed"
# Drug name mappings (subreddit -> canonical drug name)
DRUG_MAP = {
"ozempic": "semaglutide",
"wegovy": "semaglutide",
"mounjaro": "tirzepatide",
"semaglutide": "semaglutide",
}
# Environment variable names
ENV_STEMEDB_AGENT_SEED = "STEMEDB_AGENT_SEED"
ENV_GOOGLE_API_KEY = "GOOGLE_API_KEY"