Social collect
ivy.agent.social-collect · v0.1.0
ivyx
Reads a brand's social accounts and answers the collector's snapshot: Instagram (insights and media), Facebook (Page insights), LinkedIn (company statistics and posts), X (the account and its posts) and YouTube (the channel, its analytics and its videos), each behind an if on whether the brand has that platform, then the snapshot builder, which computes each account's headline median and every post's lift. IVYX Social's intake takes the output as social-snapshot and every analytics card draws from it. Reads only.
Steps
In the order the agent's file lists them, each with where its inputs come from and the values the file fixes. A branch or a loop is a step too.
- 01Ivy NodeWhich platforms does the brand have?ivy.node.social-plan
Reads an IVYX Social collect or inbox agent's input (a connection and an id per platform) and says which platforms are there, so the agent's if-branches run only those steps.
- takes
firmfrom the agent's inputclientfrom the agent's inputdaysfrom the agent's inputig_connectionfrom the agent's inputig_user_idfrom the agent's inputfb_connectionfrom the agent's inputfb_page_idfrom the agent's inputli_connectionfrom the agent's inputli_organization_idfrom the agent's inputli_handlefrom the agent's inputx_connectionfrom the agent's inputx_handlefrom the agent's inputyt_connectionfrom the agent's input
- 02BranchInstagram?
Lets what follows run only when has_instagram of step 1 is true.
- 03Ivy NodeInstagram: insights per dayivy.node.ig-insights
Reads an Instagram professional account's daily figures through the Graph API with a Meta connection: reach and new follows as a day series, and views, total interactions, accounts engaged and profile link taps as one total per day, for the days asked for; the account's followers, following and media counts as today's instant values.
Runs only on the then branch of step 2.
- takes
connectionfrom the agent's input,ig_connectionig_user_idfrom the agent's inputdaysfrom the agent's input
- 04Ivy NodeInstagram: posts with their insightsivy.node.ig-media
Reads an Instagram professional account's recent media (posts, reels, carousels) through the Graph API with a Meta connection, and each one's lifetime insights (reach, views, likes, comments, shares, saves, total interactions, a reel's average watch time).
Runs only on the then branch of step 2.
- takes
connectionfrom the agent's input,ig_connectionig_user_idfrom the agent's input
- 05BranchFacebook?
Lets what follows run only when has_facebook of step 1 is true.
- 06Ivy NodeFacebook: Page insightsivy.node.fb-page-insights
Reads a Facebook Page's daily figures through the Graph API with a Meta connection: impressions and new fans per day, and the Page's fan and follower counts as today's instant values.
Runs only on the then branch of step 5.
- takes
connectionfrom the agent's input,fb_connectionpage_idfrom the agent's input,fb_page_iddaysfrom the agent's input
- 07BranchLinkedIn?
Lets what follows run only when has_linkedin of step 1 is true.
- 08Ivy NodeLinkedIn: page statisticsivy.node.li-org-stats
Reads a LinkedIn company page's daily figures through the Community Management API with a LinkedIn connection: new followers (organic and sponsored), share statistics (impressions, unique impressions, clicks, reactions, comments, reposts, the engagement rate), page views and unique visitors by page, and the follower total as today's instant value.
Runs only on the then branch of step 7.
- takes
connectionfrom the agent's input,li_connectionorganization_idfrom the agent's input,li_organization_idhandlefrom the agent's input,li_handledaysfrom the agent's input
- 09Ivy NodeLinkedIn: postsivy.node.li-posts
Reads a LinkedIn company page's posts through the Community Management API with a LinkedIn connection, and each one's lifetime share statistics (impressions, clicks, reactions, comments, reposts, engagement).
Runs only on the then branch of step 7.
- takes
connectionfrom the agent's input,li_connectionorganization_idfrom the agent's input,li_organization_id
- 10BranchX?
Lets what follows run only when has_x of step 1 is true.
- 11Ivy NodeX: the account's countsivy.node.x-user
Reads an X account's public counts (followers, following, posts, listed) through the X API v2 with an X connection, as today's instant values in the collector's daily block; the signed-in account when no handle is given.
Runs only on the then branch of step 10.
- takes
connectionfrom the agent's input,x_connectionhandlefrom the agent's input,x_handle
- 12Ivy NodeX: posts with their metricsivy.node.x-posts
Reads an X account's recent posts through the X API v2 with an X connection, with the public metrics of each and, for the account's own posts under thirty days old, the private ones (impressions, engagements, profile and link clicks), as the collector's posts block with post_key x:<id>.
Runs only on the then branch of step 10.
- takes
connectionfrom the agent's input,x_connectionuser_idfrom step 11
- 13BranchYouTube?
Lets what follows run only when has_youtube of step 1 is true.
- 14Ivy NodeYouTube: the channelivy.node.yt-channel
Reads the signed-in Google account's YouTube channel through the Data API with a Google connection: its id, title, uploads playlist, and subscribers, views and videos as today's instant values in the collector's daily block.
Runs only on the then branch of step 13.
- takes
connectionfrom the agent's input,yt_connection
- 15Ivy NodeYouTube: analytics per dayivy.node.yt-analytics
Reads the channel's daily analytics through the YouTube Analytics API with a Google connection: views, minutes watched, average view duration and percentage, subscribers gained and lost, likes, comments and shares per day, as the collector's daily block; and views by traffic source over the range as the traffic_source breakdown the YouTube tab draws.
Runs only on the then branch of step 13.
- takes
connectionfrom the agent's input,yt_connectiondaysfrom the agent's input
- 16Ivy NodeYouTube: videosivy.node.yt-videos
Reads the channel's uploads through the Data API with a Google connection: each video's title, publish time, thumbnail, duration, and lifetime views, likes and comments, as the collector's posts block with post_key youtube:<video id>; and, for the newest videos, their daily views through the Analytics API as the per-video day series the YouTube tab draws (post_daily).
Runs only on the then branch of step 13.
- takes
connectionfrom the agent's input,yt_connectionuploadsfrom step 14
- 17Ivy NodeThe collector's snapshotivy.node.social-snapshot-build
Assembles the collector's schema v1 document (IVYX Social's social-snapshot) from what the platform nodes answered: the accounts with their daily rows and posts, each account's headline metric and its median over the last 365 days, each post's lift against it (10 posts at least), the per-platform spans, the metric legend, the gaps of accounts that could not be read.
Runs only on the else branch of step 13.
- takes
clientfrom the agent's inputaccount_afrom step 3account_bfrom step 4account_cfrom step 6account_dfrom step 8account_efrom step 9account_ffrom step 11account_gfrom step 12account_hfrom step 14account_h.dailyfrom step 15,dailyaccount_h.breakdownsfrom step 15,breakdownsaccount_h.postsfrom step 16,postsaccount_h.post_dailyfrom step 16,post_dailyaccount_h.headline_metricfrom step 16,headline_metric- returns
schema_version,generated_at,settings,metrics,platforms,accounts,breakdowns,flags,gaps,annotations,warnings,client,count
Nodes it brings
Adding this agent in IVYX Studio adds these nodes with it. A node your workspace already has is kept as it is, even at another version.
- Facebook: Page insights per dayivy.node.fb-page-insights · v0.1.0
- Instagram: account insights per dayivy.node.ig-insights · v0.1.0
- Instagram: posts with their lifetime insightsivy.node.ig-media · v0.1.0
- LinkedIn: company page statistics per dayivy.node.li-org-stats · v0.1.0
- LinkedIn: a company page's posts with their statisticsivy.node.li-posts · v0.1.0
- Social: which platforms this run hasivy.node.social-plan · v0.1.0
- Social: the collector's snapshot from the platform readsivy.node.social-snapshot-build · v0.1.0
- X: the account's posts with their metricsivy.node.x-posts · v0.1.0
- X: an account's countsivy.node.x-user · v0.1.0
- YouTube: the channel's analytics per dayivy.node.yt-analytics · v0.1.0
- YouTube: the channel's countsivy.node.yt-channel · v0.1.0
- YouTube: the channel's videos with their statisticsivy.node.yt-videos · v0.1.0
What it touches
Collected from what each of its nodes declares, plus the model call when a step is a model turn. A declaration is the author's statement, and it is what policy rules select on.
Inputs
| Field | Type | Description |
|---|---|---|
| firm | string | The firm's slug in IVYX Social; the destination routes the delivery to /api/firms/<firm>/intake. |
| clientrequired | string | The brand's name, as IVYX Social knows it; the destination hands it on as the delivery's client. |
| days | integer | How many days back to read; 7 when omitted (a first collection asks for 365). |
| ig_connection | Not declared | The platform's connection, as the stored secret connection.<id>. |
| ig_user_id | string | The Instagram professional account's id. |
| fb_connection | Not declared | The platform's connection, as the stored secret connection.<id>. |
| fb_page_id | string | The Facebook Page's id; the first managed Page when omitted. |
| li_connection | Not declared | The platform's connection, as the stored secret connection.<id>. |
| li_organization_id | string | The LinkedIn company page's id or URN. |
| li_handle | string | Its vanity name. |
| x_connection | Not declared | The platform's connection, as the stored secret connection.<id>. |
| x_handle | string | The X account's handle. |
| yt_connection | Not declared | The platform's connection, as the stored secret connection.<id>. |
Outputs
| Field | Type | Description |
|---|---|---|
| schema_versionrequired | integer | 1 |
| generated_at | string | Not declared |
| settings | object | Not declared |
| metrics | object | Not declared |
| platforms | object | Not declared |
| accountsrequired | array | The accounts with their daily rows and posts. |
| breakdowns | object | Not declared |
| flags | array | Not declared |
| gaps | array | Not declared |
| annotations | array | Not declared |
| warnings | array | Not declared |
| client | string | Not declared |
| count | integer | Not declared |
Tests
2 of 2 test cases passed on Oct 25, 2026, in the publisher's own environment, before this version was published. The registry keeps that record; it does not run the cases again.
Requires: python:3.9, tools/connectors-standin.py on 127.0.0.1:18911, its connections stored as the secrets connection.standin-<platform>
- five-platforms
A brand on all five platforms, read through the stand-in apps, is a schema v1 snapshot with an account per platform and no gap.
- given
firmivyxclientIVYXdays2ig_connection{"$secret":"connection.standin-meta"}ig_user_id17841400001fb_connection{"$secret":"connection.standin-meta"}li_connection{"$secret":"connection.standin-linkedin"}li_organization_id123li_handleivyxx_connection{"$secret":"connection.standin-x"}x_handleivyxaiyt_connection{"$secret":"connection.standin-google"}- expects
schema_versionequals 1clientequals IVYXcountequals 5gapsequals []
- no-platform
A brand with no connection is a snapshot with no account and a warning that says why.
- given
firmivyxclientIVYX- expects
schema_versionequals 1countequals 0warnings.0equals No platform answered: the brand has no connection, or every read failed.