Instagram

Reading and answering an Instagram DM

Read what someone wrote to the account on Instagram and answer it in matt's voice, with text or a meme, on the account's own session through vendor/instagrapi. No browser, ever (rule 128).

How the owner asks for it: "read my instagram dms", "what did <someone> say on instagram", "reply to <someone> on instagram", "send <someone> a meme on instagram"

Run it from a fresh context

Say: "go on docs/useCases/instagram/dmReply.md for <someone>". The agent reads this page and runs the steps.

The steps

#StepToolDone when
1Session checkinstagramSessionCheck { account }loggedIn as the account's handle
2The inbox, or the thread with theminstagramDms { account }, then instagramDms { account, with: "<handle>" }their latest message and what came before it
3Pull how matt writes to them, then draft only from facts matt gavevoice { to: "<handle>", with: "<who>", context } (no text)a draft that answers what they said
4For a meme, find one that fits the moment, ranked by matt's taste, and save its picturememelordSearch { query: ["<the moment>"], method: "fulltext", type: "meme" }a template that fits, saved as a JPEG
5Gate the draft or the memevoice { to, with, context, text: "<draft or media url>" }it passes
6Send it: text one message per line, a meme as photoinstagramSendLive { account, with: "<handle>", text and/or photo: "<file>", approvedBy: "matt", confirmLive: true }Instagram answers each message with its id
7Tell the owner what they said and what went outthe reply to the ownerboth quoted with their times

New messages arrive by themselves: the inbox hook keeps log instagram watch --inbox open for every signed-in Instagram account on Instagram's realtime connection and puts each new DM in front of the agent (>>> NEW INSTAGRAM MESSAGE).

What the runs taught

  • Never the browser. On 2026-11-04 a meme went out through the account's AdsPower browser and matt said that is not the way: read, send and watch are the engine's (rule 128).
  • A meme goes as the picture. Memelord answers with a media URL; save it as a JPEG and send it as photo, never the link.
  • Pick from the top of the taste ranking, with judgement. A template built on a stereotype is skipped even when it ranks first.