npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@framers/agentos-ext-channel-instagram

v0.1.3

Published

Instagram channel adapter for AgentOS — post photos, reels, stories, carousels, DMs, hashtag research, and engagement analytics via Instagram Graph API with browser automation fallback.

Readme

Instagram channel

This pack gives an agent media publishing, comments, hashtag lookup and engagement analytics through the Instagram Graph API using axios.

Installation

npm install @framers/agentos-ext-channel-instagram

Peer dependency: @framers/agentos >=0.10.40.

Usage

import { AgentOS } from '@framers/agentos';

const agentos = await AgentOS.create({
  extensionManifest: {
    packs: [
      {
        package: '@framers/agentos-ext-channel-instagram',
        options: {
          accessToken: process.env.INSTAGRAM_ACCESS_TOKEN,
          igUserId: process.env.INSTAGRAM_USER_ID,
        },
      },
    ],
  },
});

Configuration

| Option | Secret id | Environment variable | Required | Default | | --- | --- | --- | --- | --- | | accessToken | instagram.accessToken | INSTAGRAM_ACCESS_TOKEN | Yes, manifest | Empty string | | igUserId | instagram.igUserId | INSTAGRAM_USER_ID | No | None | | secrets | | | No | Context secrets, then {} | | | instagram.username | | No | Unused manifest secret | | | instagram.password | | No | Unused manifest secret |

Options take precedence over secrets, then environment variables. Option secrets takes precedence over context secrets. On activation, an empty access token triggers a lookup in FileTokenStore for instagram; stored metadata can also supply igUserId. Without igUserId, the service reads the account id from /me.

Tools

| Tool | What it does | | --- | --- | | instagramPost | Posts a photo or image carousel with a caption. | | instagramReel | Uploads a video as an Instagram Reel. | | instagramStory | Posts an image as an Instagram Story. | | instagramDm | Requests a direct message, but returns a permissions error. | | instagramLike | Requests a like, but only logs the intent. | | instagramComment | Posts a comment on an Instagram media item. | | instagramFollow | Requests a follow or unfollow, but returns an unsupported-action error. | | instagramHashtags | Searches hashtags and retrieves their top media. | | instagramExplore | Reads recent media from the authenticated account. | | instagramAnalytics | Reads post or account engagement analytics. |

instagramPost

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | imageUrls | string[] | Yes | Image URLs for a single post or carousel. | | caption | string | No | Post caption with hashtags |

instagramReel

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | videoUrl | string | Yes | URL of the video file | | caption | string | No | Reel caption with hashtags | | coverUrl | string | No | Cover image URL |

instagramStory

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | imageUrl | string | Yes | URL of the image to post as a story |

instagramDm

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | action | string, enum: send | Yes | DM action | | recipientId | string | Yes | Instagram user ID to message | | text | string | Yes | Message text |

instagramLike

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | mediaId | string | Yes | Instagram media ID to like |

instagramComment

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | mediaId | string | Yes | Instagram media ID to comment on | | text | string | Yes | Comment text |

instagramFollow

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | userId | string | Yes | Instagram user ID to follow/unfollow | | unfollow | boolean | No | Set to true to unfollow; default: false. |

instagramHashtags

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | hashtag | string | Yes | Hashtag to research (without #) | | action | string, enum: search, topMedia | No | search to find hashtag, topMedia to get its top posts; default: search. | | hashtagId | string | No | Hashtag ID (required for topMedia action) |

instagramExplore

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | limit | number | No | Number of recent posts to fetch |

instagramAnalytics

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | scope | string, enum: post, account | No | Whether to get post-level or account-level analytics; default: account. | | mediaId | string | No | Media ID to analyze (required for post scope) |

Channel adapter

The adapter registers platform instagram and initializes an authenticated Graph API client. It maps image, carousel, reel, story and video blocks to media publishing, using a text block as the caption. Text-only messages fail. It stores event handlers but has no inbound event delivery code. Typing indicators do nothing; reactions call the logging-only like method.

Notes

Publishing and commenting write to Instagram. Reel publishing polls media processing every 3000 ms for up to 60000 ms and throws on failure or timeout. The DM and follow tools return errors directing the caller to browser automation; this pack does not implement that fallback. The like tool reports success after logging, without an API request.

The manifest requires an access token, but the factory does not reject an empty token locally. Activation attempts the token-store fallback and then initializes the service. Calls requiring a client fail before initialization. Missing media insights are returned as zero-valued metrics.

License

Apache-2.0