eliza icon indicating copy to clipboard operation
eliza copied to clipboard

feat: add instagram client

Open Lukapetro opened this issue 11 months ago • 6 comments

Risks

Low, is a new client, does't have any impact on old code.

What does this PR do?

Implements a new Instagram client for ElizaOS that:

  1. Handles Instagram authentication and session management
  2. Provides media posting capabilities with proper image processing
  3. Manages comments, likes, and mentions
  4. Maintains conversation history through memory system
  5. Integrates with ElizaOS core content generation

What kind of change is this?

Features (non-breaking change which adds functionality)

  • New Instagram client implementation
  • Media handling capabilities
  • Interaction management system
  • Content generation templates

Why are we doing this? Any context or related work?

Add instagram functionalities to Eliza

Documentation changes needed?

My changes require a change to the project documentation:

  • New Instagram client configuration guide
  • Media handling requirements
  • Content generation templates documentation
  • Rate limiting and session management details

Testing

  • check https://www.instagram.com/0xspit/

Where should a reviewer start?

  1. Review src/lib/auth.ts for authentication flow
  2. Check src/services/post.ts for media handling
  3. Examine src/services/interaction.ts for interaction management
  4. Review environment configuration in src/environment.ts

Detailed testing steps

  1. Environment Setup
  2. Authentication Testing
  3. Media Posting
  4. Interaction Testing
  5. Content Generation

Deploy Notes

INSTAGRAM_USERNAME=your_username
INSTAGRAM_PASSWORD=your_password
INSTAGRAM_APP_ID=your_app_id
INSTAGRAM_APP_SECRET=your_app_secret
INSTAGRAM_BUSINESS_ACCOUNT_ID=your_business_id
INSTAGRAM_POST_INTERVAL_MIN=90
INSTAGRAM_POST_INTERVAL_MAX=180
INSTAGRAM_ENABLE_ACTION_PROCESSING=true
INSTAGRAM_ACTION_INTERVAL=5
INSTAGRAM_MAX_ACTIONS=1

Discord username

0xspit

Lukapetro avatar Jan 07 '25 15:01 Lukapetro

nice. sick addition, thanks!

ArsalonAI avatar Jan 07 '25 22:01 ArsalonAI

Love this ! Thanks @Lukapetro

xR0am avatar Jan 08 '25 08:01 xR0am

as mentioned on discord, we need to define how to handle the generation of images or uploading by those who use the agent

Edit: we fixed using generateImage

Lukapetro avatar Jan 12 '25 14:01 Lukapetro

This is so cool! I worked on an instagramPlugin in the last couple days. Created the post image functionality and was going to expand it to more types of content and posts. I guess this client does it all already! Love it! TikTok next? Hope to have this merged soon!

mrparracho avatar Jan 14 '25 09:01 mrparracho

This is so cool! I worked on an instagramPlugin in the last couple days. Created the post image functionality and was going to expand it to more types of content and posts. I guess this client does it all already! Love it! TikTok next? Hope to have this merged soon!

thanks, still waiting for someone to review it

Lukapetro avatar Jan 14 '25 13:01 Lukapetro

@Lukapetro have a look at my plugin draft PR, see if it would enhance the client in any way? I think it may be redundant. https://github.com/elizaOS/eliza/pull/2284 Thanks

mrparracho avatar Jan 15 '25 09:01 mrparracho