AIsa Twitter Command Center
Search X/Twitter profiles, tweets, trends, lists, communities, and Spaces through the AIsa relay, then support approved posting workflows with OAuth.
When to use
- The user wants Twitter/X research, monitoring, or content discovery.
- The user wants to inspect profiles, timelines, mentions, trends, replies, quotes, lists, communities, or Spaces.
- The user wants to draft or publish posts after explicit OAuth approval without sharing passwords.
When NOT to use
- The user needs password-based login, cookie extraction, or browser credential scraping.
- The workflow must avoid relay-based calls to
api.aisa.one.
- The request is for unsupported engagement actions not covered by this package.
Quick Reference
- Required environment variable:
AISA_API_KEY
- Read client:
scripts/twitter_client.py
- OAuth and posting client:
scripts/twitter_oauth_client.py
- Posting guide:
references/post_twitter.md
Setup
export AISA_API_KEY="your-key"
All network calls go to https://api.aisa.one/apis/v1/....
Capabilities
- Read user data, timelines, mentions, followers, followings, and related profile information.
- Search tweets and users, inspect replies, quotes, retweeters, thread context, trends, lists, communities, and Spaces.
- Publish text, image, and video posts after explicit OAuth approval.
- Return an authorization link when posting access has not been approved yet.
Common Commands
python3 scripts/twitter_client.py user-info --username elonmusk
python3 scripts/twitter_client.py search --query "AI agents" --type Latest
python3 scripts/twitter_client.py trends --woeid 1
python3 scripts/twitter_oauth_client.py status
python3 scripts/twitter_oauth_client.py authorize
python3 scripts/twitter_oauth_client.py post --text "Hello from AIsa"
Posting Workflow
When the user asks to send, publish, reply, or quote on X/Twitter:
- Check whether
AISA_API_KEY is configured.
- If the user intent is to publish, attempt the publish workflow.
- If authorization has not been completed, return the OAuth authorization link first.
- Use
--media-file only for user-provided local workspace files.
- Do not claim the post succeeded until the publish command actually succeeds.
Guardrails
- Do not ask for Twitter passwords or browser cookies.
- Do not invent captions, tweet URLs, or attachment files.
- Do not default to browser opening unless the user explicitly wants local browser launch.
- Do not claim external posting succeeded until the API confirms success.
Security Notes
- The workflow is relay-based and sends API requests, OAuth requests, and approved media uploads to
api.aisa.one.
- Required secret:
AISA_API_KEY.
- This workflow does not require passwords, browser cookie extraction, or direct account credential sharing.
References
- See
references/post_twitter.md for detailed posting examples and OAuth guidance.
1---2name: aisa-twitter-command-center3description: Search X/Twitter profiles, tweets, trends, lists, communities, and Spaces through the AIsa relay, then support approved posting workflows with OAuth. Use when the user asks for Twitter research, monitoring, or posting without sharing passwords.4license: Apache-2.05---67# AIsa Twitter Command Center89Search X/Twitter profiles, tweets, trends, lists, communities, and Spaces through the AIsa relay, then support approved posting workflows with OAuth.1011## When to use1213- The user wants Twitter/X research, monitoring, or content discovery.14- The user wants to inspect profiles, timelines, mentions, trends, replies, quotes, lists, communities, or Spaces.15- The user wants to draft or publish posts after explicit OAuth approval without sharing passwords.1617## When NOT to use1819- The user needs password-based login, cookie extraction, or browser credential scraping.20- The workflow must avoid relay-based calls to `api.aisa.one`.21- The request is for unsupported engagement actions not covered by this package.2223## Quick Reference2425- Required environment variable: `AISA_API_KEY`26- Read client: `scripts/twitter_client.py`27- OAuth and posting client: `scripts/twitter_oauth_client.py`28- Posting guide: `references/post_twitter.md`2930## Setup3132```bash33export AISA_API_KEY="your-key"34```3536All network calls go to `https://api.aisa.one/apis/v1/...`.3738## Capabilities3940- Read user data, timelines, mentions, followers, followings, and related profile information.41- Search tweets and users, inspect replies, quotes, retweeters, thread context, trends, lists, communities, and Spaces.42- Publish text, image, and video posts after explicit OAuth approval.43- Return an authorization link when posting access has not been approved yet.4445## Common Commands4647```bash48python3 scripts/twitter_client.py user-info --username elonmusk49python3 scripts/twitter_client.py search --query "AI agents" --type Latest50python3 scripts/twitter_client.py trends --woeid 151python3 scripts/twitter_oauth_client.py status52python3 scripts/twitter_oauth_client.py authorize53python3 scripts/twitter_oauth_client.py post --text "Hello from AIsa"54```5556## Posting Workflow5758When the user asks to send, publish, reply, or quote on X/Twitter:59601. Check whether `AISA_API_KEY` is configured.612. If the user intent is to publish, attempt the publish workflow.623. If authorization has not been completed, return the OAuth authorization link first.634. Use `--media-file` only for user-provided local workspace files.645. Do not claim the post succeeded until the publish command actually succeeds.6566## Guardrails6768- Do not ask for Twitter passwords or browser cookies.69- Do not invent captions, tweet URLs, or attachment files.70- Do not default to browser opening unless the user explicitly wants local browser launch.71- Do not claim external posting succeeded until the API confirms success.7273## Security Notes7475- The workflow is relay-based and sends API requests, OAuth requests, and approved media uploads to `api.aisa.one`.76- Required secret: `AISA_API_KEY`.77- This workflow does not require passwords, browser cookie extraction, or direct account credential sharing.7879## References8081- See `references/post_twitter.md` for detailed posting examples and OAuth guidance.