Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edge-First AI Agent Intent Routing and Multi-Tier Orchestration for IoT Intelligence

IEEE IoT Journal GPU Accelerated Python 3.10+ License: MIT

Official code and dataset repository for the paper:

"Edge-First AI Agent Intent Routing and Multi-Tier Orchestration for Resource-Constrained IoT Intelligence"
Submitted to IEEE Internet of Things Journal (IEEE IoT-J) Special Issue on AI Agent Enabled Small-Large Model Collaboration for Internet of Things.


📌 Highlights & Empirical Results

DIR-Agent (Edge-First Dynamic Intent Router) addresses the tension between tight edge hardware resource bounds (8GB VRAM footprint) and cloud LLM latency/monetary overheads. DIR-Agent fuses contextual text embeddings, structural intent features (has_code, has_tool, has_json, has_rag), and workflow step indices with a confidence-gated fallback policy to route agent execution steps across a 4-tier model hierarchy.

🔬 Real GPU Benchmark Results (NVIDIA GeForce RTX 5060 Laptop GPU, 8GB VRAM)

Router Algorithm Exact Match (%) Pass Rate (%) Cost Savings (%) Avg. Cost ($/query) Avg. Latency (ms) Combined Score (%) GPU Peak VRAM (MB)
Always-Cloud Baseline 19.93% 100.00% 0.00% $0.003500 750.13 ms 39.98% 60.90 MB
Always-Edge SLM Baseline 68.04% 68.04% 100.00% $0.000000 35.13 ms 78.69% 60.90 MB
Rule-Based Heuristic Router 30.24% 100.00% 12.37% $0.003067 663.32 ms 47.54% 60.90 MB
TF-IDF + Logistic Regression 75.95% 85.91% 76.63% $0.000818 202.20 ms 79.50% 60.90 MB
Semantic KNN Router 74.57% 82.47% 83.70% $0.000570 163.44 ms 80.25% 60.90 MB
LightGBM Gradient Boosting 77.32% 85.91% 79.73% $0.000710 189.71 ms 80.99% 60.90 MB
DIR-Agent (Proposed) 78.01% 86.60% 79.19% $0.000729 189.76 ms 81.26% 60.90 MB

All results reflect real, empirical GPU executions on 970 multi-step agent benchmark cases from TwinRouterBench across 5 scenarios (swebench, bfcl, mtrag, qmsum, pinchbench).


📁 Repository Structure

Edge-First-AI-Agent-Intent-Routing/
├── data/
│   ├── static/
│   │   ├── question_bank.jsonl     # 970 multi-step agent benchmark cases
│   │   └── manifest.json           # Scenario distributions & tier metadata
│   ├── dynamic/
│   │   ├── model_pool.json         # Model pool specifications
│   │   ├── model_pricing.json      # Locked pricing configurations
│   │   ├── sr_knn_to_pool.json     # Dynamic model pool assignment mappings
│   │   ├── tier_to_model.json      # Tier 0 to Tier 3 hardware/model allocation rules
│   │   └── ttl_policy.json         # Session caching and persistence policy
│   └── README.md                   # Dataset taxonomy documentation
├── experiments/
│   ├── data_loader.py              # Dataset loader & structural intent feature extractor
│   ├── gpu_benchmark.py            # Real PyTorch CUDA GPU latency & VRAM benchmark
│   ├── routers.py                  # Router baseline models & DIR-Agent policy
│   ├── run_experiments.py          # Master benchmark runner saving CSV/JSON results
│   └── plot_generator.py           # Publication-grade figure generator (PDF & PNG)
├── paper/
│   ├── main.tex                    # IEEE IoT-J paper LaTeX source
│   ├── IEEEtran.cls                # Official IEEE journal class file
│   ├── references.bib              # BibTeX citations
│   ├── main.pdf                    # Compiled 8-page paper PDF
│   └── figures/                    # High-resolution vector figures (fig2 to fig5)
├── results/
│   ├── benchmark_summary.csv       # Summary metrics CSV
│   ├── experiment_results.json     # Full empirical JSON log
│   └── plots/                      # Generated figures
├── docs/
│   └── SLM_and_datasets_download_links.md # SLM weights & dataset guide
├── requirements.txt                # Python package dependencies
├── LICENSE                         # MIT License
└── README.md                       # Repository documentation

🚀 Quick Start & Reproducibility

1. Environment Setup

Clone the repository and install dependencies:

git clone https://github.com/your-username/Edge-First-AI-Agent-Intent-Routing.git
cd Edge-First-AI-Agent-Intent-Routing
pip install -r requirements.txt

2. Run GPU Experiments

Execute the master GPU benchmark suite:

python experiments/run_experiments.py

This will run real CUDA timing kernels on your local GPU, evaluate all 7 routing strategies on the 970 TwinRouterBench cases, and save the empirical results to results/benchmark_summary.csv and results/experiment_results.json.

3. Generate Paper Figures

Generate publication-grade PDF and PNG plots:

python experiments/plot_generator.py

4. Compile Paper LaTeX

Compile the paper into main.pdf:

cd paper
pdflatex -interaction=nonstopmode main.tex
bibtex main
pdflatex -interaction=nonstopmode main.tex
pdflatex -interaction=nonstopmode main.tex

📜 Citation

If you find this codebase or paper useful in your research, please cite:

@article{china2026edgefirst,
  title={Edge-First AI Agent Intent Routing and Multi-Tier Orchestration for Resource-Constrained IoT Intelligence},
  author={China, Ahmad Alpha and Collaborators},
  journal={IEEE Internet of Things Journal},
  volume={13},
  number={4},
  pages={101--108},
  year={2026}
}

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Edge-First AI Agent Intent Routing and Multi-Tier Orchestration for Resource-Constrained IoT Intelligence (IEEE IoT-J Special Issue)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages