How do I let an AI agent post, reply and like on X?
Short answer. Connect the user's X account to AgentWeb. The agent reads with
list_home_timeline,get_postandlist_post_replies, then acts withreply_post,add_like,create_repostorcreate_post. Every one of these is public and immediate, so the agent gets approval first. X often refusescreate_postfrom an API client (code 226), while replies usually still work, and the agent gets that error back instead of failing silently.
Steps
- Connect the user's X account once through AgentWeb's hosted login.
- Read the timeline with
list_home_timeline, or a specific post withget_post. - Before replying, read the thread with
list_post_repliesso the reply doesn't repeat others. - Show the user the exact text and the post it answers. Wait for a yes.
- Call
reply_post,add_like,create_repostorcreate_post. - If
create_postcomes back with code 226 or 344, tell the user X blocked the post and offer a reply instead. Don't retry in a loop. - To undo, use
delete_post(permanent),remove_likeorremove_repost.
Frequently asked questions
Can it post images?
Not yet. As of Oct 20, 2026, the X map posts text only.
Can it send DMs on X?
Not yet. Direct messages on X are not mapped.
Related
- Post, reply and like on X with an AI agent
- Like, repost and follow on Threads
- Post on LinkedIn with an AI agent
More: Sites AgentWeb can act on · All guides · Glossary · Install AgentWeb