← All workin-progress

The Social Layer

The same agents, inside Instagram and Facebook

Role

Meta platform integration, webhook architecture

Timeline

2025 - now

Status

In active development

Stack

Instagram APIFacebook MessengerFastAPIRedisPython

Harrir's customers spend more time in Instagram than in the app, so the agents went there. The integration is built and wired end to end; it is waiting on Meta app review before it carries real traffic.

Return 200 before you think

Every handler verifies the HMAC signature, drops echoes and payload-less events, and returns 200 immediately. The agent run happens afterwards in a background task, because Meta retries non-2xx deliveries aggressively and an LLM's latency inside a webhook window is how you end up answering the same message three times.

One private reply per comment

Meta allows exactly one private reply per public comment, within seven days. That single rule shaped the whole comment path: comments run a small classifier rather than the full stylist, which either ignores noise, answers publicly when no product or policy is involved, or spends the one-shot reply on a teaser.

The customer's original question is stashed in Redis with a TTL matching Meta's window. When they reply in the DM, that stashed query is popped and fed to the normal agent pipeline, so they get an answer to what they actually asked rather than to the word 'yes'.

Next systemRiddhi Siddhi