Your shop lives on Instagram: products in posts, prices in captions or in reels, and customers asking "how much?" in DMs. This repo reads your own Instagram profile (posts, reels, captions, covers), turns the last 10–100 posts into a product catalog, and puts a Claude sales agent in front of it — a widget for your site, a shareable chat page (/c/<slug>) for the link in bio, and an owner console with staged, approved edits.
Built on Anthropic's The anatomy of effective commerce agents patterns: one agent loop, tools over your data, server-issued product IDs, fenced third-party text, staged merchant writes.
No server? The hosted edition does the same from a cabinet: comag.vibevox.pro. Author: t.me/GuruAppSheet.
owner login (username + password, 2FA code if asked) ──► services/ig-gateway (Python, instagrapi) keeps one session on disk
──► GET /sessions/:tenant/profile?limit=N → profile + last N posts (caption, cover, video link)
──► "deep": video ≤3 min → Gemini: speech, on-screen text, prices
──► Claude emit_catalog ──► products / services ──► covers saved locally
──► commerce_posts: the agent shows the original post on request
- Meta Graph API is not used. The sidecar is an unofficial private-API client (instagrapi), so it works with any account and needs no app review — but it is against Instagram's terms. Use a separate business account, a residential proxy with the account's geo, and keep the read-only usage this repo ships with. Details and the risk model:
services/ig-gateway/README.md. - The password is never stored: only the session file in
IG_SESSIONS_DIR; the console shows the session status and asks for the 2FA / challenge code when Instagram wants one. - Prices only when stated; otherwise price on request and the agent collects a lead.
Code: services/ig-gateway/app.py (sidecar), server/src/igp_client.ts, server/src/commerce/social.ts (igFetchProfile, startSocialAnalysis), console card web/src/pages/commerce/SocialImportCard.tsx.
git clone https://github.com/DanikVR/instagram-sales-agent.git && cd instagram-sales-agent
cp .env.example .env # ANTHROPIC_API_KEY, ADMIN_TOKEN, APP_SECRET, IG_GATEWAY_SECRET; GEMINI_API_KEY for reels
docker compose up --build # Postgres + app + ig-gateway sidecar → http://localhost:3001Open http://localhost:3001/commerce → Settings → Sources → Instagram → Connect (username, password, code if asked) → choose 10 / 25 / 50 / 100 posts and fast / deep → Analyze. Products land in Catalog; the widget snippet and the /c/<slug> link are in Widget.
Without Docker: run the sidecar from services/ig-gateway (python -m venv .venv && pip install -r requirements.txt && IG_GATEWAY_SECRET=... uvicorn app:app --port 8788) and set IG_GATEWAY_URL=http://127.0.0.1:8788 + the same secret in .env.
Node.js 20+, Postgres 13+, Python 3.11+ for the sidecar, Anthropic API key; a Gemini API key and ffmpeg for reels.
The agent, the owner console, the widget, the site crawlers (Shopify, WooCommerce, Magento, JSON-LD, feeds), guardrails and the API are the same as in the core repository — see effective-commerce-agents for the full README, the mapping to Anthropic's The anatomy of effective commerce agents, configuration and the security model. This repository is a complete copy of that code with the Instagram importer front and centre, so you can clone it alone.
comag.vibevox.pro runs this agent for you: connect a Instagram profile in the cabinet, get the widget and the share page, notifications in Telegram, 108 interface languages, updates and support. Contact the author: t.me/GuruAppSheet.
Apache-2.0 © DanikVR. Built on the patterns and guardrails of anthropics/commerce-agents (Apache-2.0), see NOTICE. Russian README: README.ru.md.