mars

In development · Design phase

Instagram messaging infrastructure for developers and agencies.

Mars is a bridge between Instagram DMs and the backend, or AI agent, a developer already runs. It receives every message, keeps it, delivers it, and sends the reply back.

How a message travels through Mars

  1. DM received

    Mars checks Meta's signature and stores the event before doing anything else.

  2. Signed webhook

    Delivered to your backend in conversation order, retried with backoff until it lands.

  3. POST /v1/messages

    Your agent replies through one API. Mars answers 202 queued and keeps the request.

  4. provider_accepted

    Mars sends the reply through Instagram and reports how it ended.

Why it should exist

Agencies are putting AI agents, many of them built on models like Claude, into their clients' Instagram inboxes. The agent is the interesting part. Everything around it is plumbing: verifying Meta's webhooks, not losing messages while a server restarts, keeping each conversation in order, storing every client's tokens safely, and replying without sending anything twice.

Today each team rebuilds that plumbing, often once per client. Mars is an attempt to build it once, carefully, while developers keep their own backend and their own agent.

What Mars will do

Built only on Meta's official Instagram API, with no scraping and no unofficial clients. Businesses authorize their accounts through Facebook Login for Business, and Mars will go through Meta's App Review and business verification to operate as a tech provider for agencies.

Delivery that recovers
Every incoming event is stored before it is forwarded. Signed webhooks retry with backoff, each conversation stays in order, and failed deliveries can be inspected and replayed.
Replies that don't guess
POST /v1/messages answers 202 queued and takes an idempotency key. Every send ends as provider_accepted, failed or unknown, and an unknown result is reported, never retried blindly.
One project per client
Each project has its own API keys, webhook and Instagram connections. Meta tokens stay encrypted inside Mars and never reach the developer's code. One stable contract, with the raw Meta event still available.
An operations viewbeta
Connection status, deliveries and their attempts, send results, and errors that say what to do next.

Decisions so far

Mars is in its design phase. The architecture is written down as thirteen decision records; these are the ones that shape it most.

  1. 0001

    Delivery is Mars's responsibility.Events are kept, retried automatically within limits, and can be replayed by hand. In exchange, consumers must tolerate duplicates.

  2. 0003

    Projects are the isolation boundary.Keys from one project never authorize access to another, so an agency can separate every client.

  3. 0004

    One active connection per Instagram account.Two independent integrations should never answer the same DM.

  4. 0005

    Accepting a send is not sending it.Mars answers with an ID right away; the result arrives later by API and webhook.

  5. 0010

    No blind retries on an uncertain result.If Mars can't tell whether Meta accepted a message, it says so and lets the developer decide. Avoiding a duplicate reply wins over automatic recovery.

  6. 0012

    Mars holds the Meta credentials.Encrypted, available only to the backend, and kept out of webhooks, logs and API responses.

  7. 0013

    Ordered delivery per conversation.The next message in a conversation waits until the previous one is confirmed. Other conversations keep moving.

Where it stands

  1. Done

    DesignDomain model, architecture and decision records.

  2. Now

    First working loopOne organization, one project, one Instagram connection, end to end.

  3. Next

    First agenciesMeta App Review and business verification, then onboarding the first agencies personally.

Get in touch

If you build AI agents for Instagram DMs, or run an agency that does, I'd like to hear how you handle delivery and replies today.

Email fran@francoescob.com