-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Optimize Agent Action Processing by Prioritizing Timelines and Limiting Actions Per Cycle #1824
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
@tcm390 |
yea will do. Thanks for reminding 😊 |
@tcm390 thank you for the work, much appreciated. A suggestion/addedum since you're working in this area, would it be simple add a bool for which kind of timeline to interact with in the action loop? Afaik by default it's fetching from the "For you" and it gets random users that X recommends but it would be nice to only interact with the people the agent follows too. |
Thanks for the suggestion! I’ve updated the code to include a boolean for selecting the timeline type. Could you kindly test it and let me know if it works? Appreciate your feedback! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@tcm390 im late but it seems to work, thank you :) |
Glad to hear that! Thanks for testing it. 🙏 |
related:
#1813 (comment)
#1813 (comment)
#1813 (comment)
Problem:
Many users reported that after enabling action processing, the agent was excessively retweeting, liking, and performing other actions indiscriminately. This leading account to get flagged, rate limit and even banned. This behavior occurred because, in each cycle, we fetch 30–40 home timelines and process actions for all of them without prioritization.
Additionally, the fetchTimeline method of the agent-twitter-client is currently ignoring the count parameter, leading to unnecessarily large data fetches. elizaOS/agent-twitter-client#43
Solution in This PR:
Instead of processing all timelines in each cycle, timelines are now sorted by the LLM decision scores.
The timelines are spliced to limit the number of processed actions based on the MAX_ACTIONS_PROCESSING environment variable.