AgentX
Agent-first X/Twitter client in Go — JSON envelope per command, multi-account, cookie-safe anti-detection for autonomous agents
Install
git clone https://github.com/DezXBT/AgentXInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →agentx An agent-first X / Twitter client in Go. One binary, one JSON envelope per command — so any agent runtime can drive X.
agentx is a from-scratch Go library + CLI built for autonomous agents. Every command prints a single predictable JSON object, supports multiple accounts, and keeps auth_token cookies alive by making traffic look like a real browser.
✨ Why cookies last longer here
X flags/expires auth_token cookies aggressively when traffic doesn't look human. agentx signs every authenticated request with:
- a freshly generated
x-client-transaction-id— the exact algorithm x.com's web app runs (golden-tested), - the full browser header set (bearer,
x-csrf-token,x-twitter-*,sec-fetch-*, stable User-Agent), - the complete cookie string,
- optional uTLS Chrome JA3 fingerprint over HTTP/2 (
AGENTX_UTLS=1).
🚀 Quick start
go build -o agentx ./cmd/agentx
# Register an account (cookies from a logged-in browser)
./agentx account add --name main --auth-token --ct0 <ct0>
# Read
./agentx feed -n 20
./agentx user jack
./agentx search --type Latest "golang" -n 20
./agentx analytics <tweet_id>
# Write
./agentx post "hello from agentx 👋"
./agentx reply <id> "nice!" --media pic.jpg
./agentx poll "Tabs or spaces?" --option Tabs --option Spaces
# Grok (AI)
./agentx grok "USD to IDR today?"
./agentx grok image "a majestic dragon" --out dragon.png
Every command prints one JSON envelope:
{ "ok": true, "schema_version": "1", "data": …, "pagination": {"nextCursor": "…"}, "rateLimit": {…} }
{ "ok": false, "schema_version": "1", "error": {"code": "…", "message": "…"} }
Check .ok, read .data, page with .pagination.nextCursor. Exit code is 0 on success, 1 on a handled error. Output is compact single-line JSON by default (token-efficient for agents) — add --pretty for human-readable output.
🧩 Features
| Area | What you get |
|---|---|
| Read | feed (for-you / following), search, user / posts / tweet / thread / article, media tab, bookmarks (+ folders), likes, followers / following, lists + members, communities, mentions, notifications + unread, trends (+ locations), analytics (engagement rate), retweeters / likers |
| Write | post, reply, quote, polls (+ vote), like / retweet / bookmark, follow / mute / block, pin, media upload (+ alt text), auto-threads, scheduled tweets, drafts, profile / avatar / banner / settings, topics, list & community management |
| Grok | text answers with live web search, and image generation (download to file) |
| DM | classic DM send / list / media / download |
| Infra | multi-account, zero-auth FxTwitter fallback, uTLS + HTTP/2, rate-limit surfacing, query-id override for X rotations, watch streaming, media download |
See SKILL.md for the compact, token-efficient command reference and AGENTS.md for the full agent integration guide.
🏛️ Architecture
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…