Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built a 17-agent AI swarm on my phone — here's how

Description and use

The author built a 17-agent AI swarm on a smartphone using Python, PyTorch Mobile, Kivy, and SQLite, employing quantization, pruning, and multithreading to operate within limited resources.

Problem

Run a complex, distributed AI system entirely on a smartphone, achieving emergent behavior while respecting mobile constraints such as limited CPU, RAM, and battery.

Outcome

The author successfully deployed a 17-agent AI swarm on a smartphone, demonstrating that distributed on-device AI is feasible with careful model optimization and system design.

Workflow

  • Define agent roles and responsibilities
  • Convert DistilBERT models to PyTorch Mobile format
  • Quantize and prune models to 8-bit
  • Implement agents in Python with Kivy UI
  • Store agent memories in SQLite
  • Set up a central message queue with tags
  • Run agents in separate threads for concurrency
  • Cache tokenization results
  • Batch processing where memory allows
  • Monitor memory and battery usage
  • Iterate on optimization techniques

Evidence

Running 17 AI models on a phone requires serious optimization.

Source

PyTorch Mobile allows you to quantize your models to 8-bit integers, significantly reducing their size and improving inference speed.

Source

The agents don’t directly call each other’s methods. Instead, they communicate through a central message queue (implemented with Python lists and locks).

Source

  • Record date: 2026-10-09T17:55:54.962Z