Skip to content

Latest commit

Β 

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


AstraGuard AI Logo

πŸ›°οΈ AstraGuard AI

Autonomous Fault Detection & Recovery for CubeSats Powered by Pathway's Streaming Engine & Biologically-Inspired Memory

License: MIT Python Version Code style: black Built with Pathway Hackathon


Explore the Project:

🌐 Live Site | πŸ“Š Dashboard Prototype | πŸ“š Documentation | πŸŽ₯ Intro | πŸ—‚οΈ Resources (GDrive)

πŸ“Œ View Official Report


πŸš€ Mission Brief

Space is unforgiving. AstraGuard makes it manageable.

AstraGuard AI is an intelligent autonomous system designed to protect CubeSats from catastrophic failure. Unlike traditional "alert-only" systems, AstraGuard uses agentic reasoning to detect anomalies in real-time streams, recall historical context using adaptive memory, and execute autonomous recovery actionsβ€”all with sub-second latency.

"Streaming anomalies. Self-updating memory. Decisions that trigger actions."


🎯 What's Different Here

  • βœ… Works on streams, not static input - Real-time telemetry processing
  • βœ… Memory evolves and prunes itself - Temporal weighting with decay curves
  • βœ… Agent reasons before acting - Explainable decision traces
  • βœ… Actions feed back into memory - Continuous learning loop
  • βœ… Dashboard outputs are structured - Validated, predictable responses

✨ Key Features

Component Description
πŸ›°οΈ Real-time Streaming Pathway Engine processes data continuously at 5Hz
🧠 Adaptive Memory Temporal weighting + recurrence scoring + safe decay
πŸ€– Agentic Decisions detect β†’ recall β†’ reason β†’ act β†’ learn loop
⚑ Auto-Recovery Concrete actions (not just alerts) with < 2s latency
πŸ“Š Premium Dashboard Glassmorphism UI with Frontier Mode visualization
πŸ”¬ Experimental Feature Anomaly Recurrence Resonance Score (signal reinforcement)

πŸ—οΈ System Architecture

graph TD
    A["πŸ›°οΈ Telemetry Stream (Pathway)"] -->|Live Data| B["πŸ“Š Embedding Encoder"]
    B -->|Vectors| C["🧠 Adaptive Memory Store"]
    C -->|Context| D["πŸ€– Anomaly Reasoning Agent"]
    B -->|Current Event| D
    D -->|Decision| E["⚑ Response Orchestrator"]
    E -->|Actions| F["πŸ›°οΈ System Recovery"]
    F -->|Feedback| C
    
    D -.->|Reasoning Trace| G["πŸ“Š Dashboard"]
    C -.->|Memory State| G
    E -.->|Action Status| G
Loading

Modular Architecture

AstraGuard/
β”œβ”€β”€ memory_engine/          # Adaptive memory with temporal weighting
β”œβ”€β”€ anomaly_agent/          # Decision loop + reasoning engine
β”œβ”€β”€ response_orchestrator/  # Workflow registry + action triggers
β”œβ”€β”€ encoder/                # Event embedding
β”œβ”€β”€ pathway_ingestion/      # Stream handlers
β”œβ”€β”€ dashboard/              # Streamlit UI
β”œβ”€β”€ tests/                  # Comprehensive test suite
β”œβ”€β”€ examples/               # Run-ready demos
└── docs/                   # Architecture & design docs

πŸš€ Getting Started

Prerequisites

  • Python 3.9+
  • pip & git

Installation

git clone https://github.com/sr-857/AstraGuard.git
cd AstraGuard
pip install -r requirements.txt

Verify Installation

python verify_install.py

Quick Start

Run the demo:

python examples/run_demo.py

Launch dashboard:

streamlit run dashboard/app.py

Tip

Enable Frontier Mode in the dashboard to visualize adaptive memory flow and BDH neural activity!


πŸ“Š Performance Metrics

Metric Target Actual
Detection β†’ Decision β†’ Action < 2s ~325ms
Memory Retrieval < 50ms ~38ms
Embedding Encoding < 20ms ~12ms
Memory Updates Auto βœ“ Real-time
Explainability LLM-assisted βœ“ Plain language

πŸ† Build-athon Tracks

πŸ€– Track 1: Agentic AI (Applied GenAI)

Mission: Reactive AI agent system for live threat detection and autonomous response.

Workflow:

Live Input β†’ Anomaly Detection β†’ Memory Recall β†’ Intelligent Decision β†’ Automated Action

Key Technologies:

  • Pathway Engine for streaming
  • Adaptive memory with temporal weighting
  • LLM-assisted reasoning
  • Concrete action workflows

🧠 Track 2: The Frontier (Research & Deep Tech)

Mission: Biologically-inspired memory using Dragon Hatchling (BDH) architecture.

Innovation:

  • Sparse neural activation
  • Evolving memory (not static context)
  • First-principles memory dynamics
  • Continuous learning without retraining

πŸ† Innovation & Differentiators

We moved beyond static RAG to build a system that learns from the stream.

Feature The Old Way (Static) The AstraGuard Way (Adaptive)
Data Processing Batch processing (slow) Streaming Intelligence (5Hz) via Pathway
Memory Static vector databases Evolving Memory with decay & pruning
Response Passive Alerts Agentic Action (detect β†’ reason β†’ act)
Explainability Black box "magic" Transparent Decision Traces
User Interface Terminal logs Frontier Dashboard with neural viz

πŸ”¬ Experimental Feature: Recurrence Resonance

Concept: Signal reinforcement inspired by physics

Formula:

resonance = base_importance Γ— (1 + 0.3 Γ— log(1 + recurrence_count)) Γ— time_decay

Impact: ~10 lines of code, demonstrates first-principles thinking


πŸ§ͺ Testing

Run all tests:

pytest tests/ -v

Run specific tests:

pytest tests/test_memory_store.py -v
pytest tests/test_recurrence_scorer.py -v

Test coverage:

pytest tests/ --cov=memory_engine --cov=anomaly_agent

πŸ“š Documentation

Core Documentation:

Additional Resources:


πŸ”§ Configuration

Defense Thresholds

Edit classifier/fault_classifier.py:

  • Power Threat: Voltage < 7.3V
  • Thermal Threat: Temperature > 32Β°C
  • Attitude Threat: |Gyro| > 0.05 rad/s

Memory Parameters

Edit memory_engine/memory_store.py:

  • Decay Lambda: 0.1 (temporal decay rate)
  • Max Capacity: 10,000 events
  • Retention: 24 hours (critical events exempt)

Resonance Tuning

Edit memory_engine/recurrence_scorer.py:

  • Resonance Factor: 0.3 (amplification for recurrence)

πŸ“ˆ System Components

Memory Engine (memory_engine/)

  • Adaptive Memory Store: Temporal weighting, auto-pruning, persistence
  • Recurrence Scorer: Signal reinforcement for repeated patterns
  • Decay Policy: Safe pruning with critical event protection
  • Replay Engine: Security flight recorder functionality

Anomaly Agent (anomaly_agent/)

  • Decision Loop: detect β†’ recall β†’ reason β†’ act β†’ learn
  • Reasoning Engine: Plain-language decision summaries
  • Confidence Scorer: Decision confidence calculation

Response Orchestrator (response_orchestrator/)

  • Workflow Registry: Maps decisions to concrete actions
  • Action Implementations: Real system commands (not just prints)
  • Cooldown Manager: Prevents action spam

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

Guidelines:

  • Follow PEP 8
  • Add type hints
  • Include docstrings
  • Write unit tests
  • Update documentation

πŸ“„ Citation

If you use AstraGuard AI in your research, please cite it using the following BibTeX:

@misc{AstraGuardAI,
  author = {Roy, Subhajit},
  title = {AstraGuard AI: Autonomous Fault Detection \& Recovery System for CubeSats},
  year = {2025},
  month = {11},
  url = {https://github.com/sr-857/AstraGuard-AI},
  note = {GitHub repository},
  license = {MIT}
}

πŸ“ License

MIT License - see LICENSE


πŸ™ Acknowledgments

  • Pathway: Real-time streaming engine
  • Streamlit: Dashboard framework
  • scikit-learn: ML algorithms
  • NumPy: Numerical computing
  • pytest: Testing framework

πŸ“§ Contact

Author: Subhajit Roy
Institution: Indian Institute of Technology (IIT), Madras
Hackathon: Synaptix Frontier AI Hack
Repository: https://github.com/sr-857/AstraGuard


** πŸ“š Documentation |πŸ“Έ Intro |πŸ—‚οΈ GDrive**


AstraGuard AI | Protecting spacecraft through intelligent autonomy πŸ›°οΈβœ¨

About

πŸš€ Autonomous Fault Detection & Recovery System for CubeSats | πŸ€– Real-Time Telemetry Simulation β€’ πŸ›°οΈ Anomaly Detection β€’ πŸ”§ State Machine β€’ πŸ“Š Streamlit Dashboard β€’ πŸŽ₯ 3D Attitude Visualizer

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Contributors

Languages