Source: https://www.agentweb.us/guides/ai-agent-post-on-x/

# How do I let an AI agent post, reply and like on X?

By Andrey Marey, Founder of AgentWeb · As of Oct 20, 2026

> **Short answer.** Connect the user's X account to AgentWeb. The agent reads with `list_home_timeline`, `get_post` and `list_post_replies`, then acts with `reply_post`, `add_like`, `create_repost` or `create_post`. Every one of these is public and immediate, so the agent gets approval first. X often refuses `create_post` from an API client (code 226), while replies usually still work, and the agent gets that error back instead of failing silently.

## Steps

1. Connect the user's X account once through AgentWeb's hosted login.
2. Read the timeline with `list_home_timeline`, or a specific post with `get_post`.
3. Before replying, read the thread with `list_post_replies` so the reply doesn't repeat others.
4. Show the user the exact text and the post it answers. Wait for a yes.
5. Call `reply_post`, `add_like`, `create_repost` or `create_post`.
6. If `create_post` comes back with code 226 or 344, tell the user X blocked the post and offer a reply instead. Don't retry in a loop.
7. To undo, use `delete_post` (permanent), `remove_like` or `remove_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](/sites/x.com/)
- [Like, repost and follow on Threads](/sites/threads.com/)
- [Post on LinkedIn with an AI agent](/sites/linkedin.com/create-post/)
