Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add instagram client #1964

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

Lukapetro
Copy link
Contributor

@Lukapetro Lukapetro commented Jan 7, 2025

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

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

@ArsalonAmini2024
Copy link

nice. sick addition, thanks!

@xR0am
Copy link

xR0am commented Jan 8, 2025

Love this ! Thanks @Lukapetro

@Lukapetro Lukapetro marked this pull request as ready for review January 12, 2025 12:31
@Lukapetro
Copy link
Contributor Author

Lukapetro commented Jan 12, 2025

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

@mrparracho
Copy link

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!

@Lukapetro
Copy link
Contributor Author

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

odilitime
odilitime previously approved these changes Jan 14, 2025
Copy link
Collaborator

@tcm390 tcm390 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good and clean overall! 😊 Just one small change request and one question: Is this placeholder image (goku.png) necessary in this PR? Could you confirm and remove/replace them if they are unnecessary?

packages/client-instagram/src/index.ts Outdated Show resolved Hide resolved
tcm390
tcm390 previously approved these changes Jan 15, 2025
@mrparracho
Copy link

@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.
#2284
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants