ROOT CAUSE: The bot was systematically sabotaging its own navigation. The HD Map planned correct 2-step routes (Home→Profile→FollowList), but _execute_action() validated each INTERMEDIATE step against the FINAL goal. Step 1 (tap profile tab → OWN_PROFILE) got rejected because the goal said 'following', triggering aversive learning that permanently burned the only valid route. SIX COMPOUNDING FIXES: 1. SSOT Consolidation (_is_goal_achieved): Replaced 12-line hardcoded if-chain with ScreenTopology.goal_to_target_screen(). Single source of truth for all goal→screen mappings. 2. Step-Aware Navigation Validation (_execute_action): Replaced goal_screen_map keyword-scan with ScreenTopology.expected_screen_for_action(action, pre_action_screen). Now validates: 'did this step land where IT should?' not 'did I reach my goal yet?' 3. Topology Guard (aversive learning): ScreenTopology.is_structural_action() prevents burning HD Map actions. VLM may fail to find the element, but the route itself is structurally valid. 4. Fast-Path Threshold Fix (telepathic_engine): 100% match threshold now applies only to NAV_TAB_KEYWORDS (actual tabs), not NAV_ZONE_BYPASS_KEYWORDS. 'tap following list' was blocked because 'following' triggered the tab threshold on a non-tab action. 5. navigate_to_screen SSOT: Replaced 8-entry goal_map dict with ScreenTopology.screen_name_to_goal(). 6. QNavGraph Name Map Dedup: Replaced 2 inline screen_name_map/name_to_screen dicts with ScreenTopology.SCREEN_NAME_MAP reverse lookups. Before: 4 competing goal→screen mappings. Self-sabotage loop. After: 1 SSOT. Step-aware validation. Topology-protected routing. 141 unit tests pass. Zero regressions.
GramPilot
Full Self-Driving for Instagram.
An autonomous Agentic Engine that navigates the Instagram App like a human.
Originally derived from GramAddict, completely re-architected.
Created by Marc Mintel <marc@mintel.me>
🏎️ What is GramPilot?
GramPilot is not a traditional script. Traditional bots rely on fixed UI locators (like XPaths) or external APIs, causing them to crash with every Instagram update or get banned within days.
GramPilot introduces a Telepathic Full Self-Driving (FSD) approach to UI navigation: It uses a 3-Stage Resolution Cascade backed by CPU Fast-Paths, Ollama Vector Similarity, and OpenRouter LLMs (Gemini/Qwen) to "read" the screen, understand context, and learn new UI layouts asynchronously.
If Instagram updates its app and moves a button, GramPilot doesn't crash. It falls back to its Agentic LLM reasoning, dynamically reasons about the new layout using raw XML structure, clicks the right button, and never hallucinates on that button again.
✨ Core Features
- 🚫 Zero Limits Configuration: Forget about configuring "max_likes" or "delays". GramPilot uses a Dopamine Pacing Engine to simulate human boredom. If the content isn't interesting, it skips it or ends the session early.
- ⚖️ Active Inference (Shadow Mode): The bot continuously predicts the outcome of its clicks. If it lands on a popup instead of a profile, it registers a "Prediction Error", presses back, and dynamically recalibrates without panicking.
- ⛩️ Telepathic Engine: A strictly tiered resolution cascade (Keyword -> Vectors -> LLM) that ensures 90% of navigation happens at 0-token cost while maintaining fallback AI resilience.
- 🧬 Resonance Oracle: The bot only interacts with content that matches a pre-defined persona aesthetic, completely bypassing spam or low-quality content.
- 🛡️ Honeypot Radome: Instagram plants invisible, 1x1 pixel trap buttons for bots. Our Radome Sensor sanitizes the XML view before the agent ever sees it, mathematically guaranteeing evasion of tracker traps.
🚀 Quick Start
Prerequisites
- A physical Android device or emulator
- Python 3.10+
adb(Android Debug Bridge) installed and added to your PATH
Installation
-
Clone the repository:
git clone https://github.com/marcmintel/grampilot.git cd grampilot -
Initialize Environment & Dependencies:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Start the Engine:
python3 run.py --config config.yml
Note
Unlike legacy bots, GramPilot requires zero maintenance. It will automatically re-learn the UI over time using its integrated Qdrant memory vectors.