=============== LIBRARY RULES =============== From library maintainers: - Use the explore tool before xapiclaw to find supported TwexAPI endpoints. - Use the highest available TwexAPI endpoint version when duplicate capabilities exist. - Never expose TwexAPI API keys, cookies, auth tokens, or bearer tokens. - Require explicit approval before write, private-read, paid-bulk, DM, Grok, or account-affecting calls. ### Install XApiClaw from npm pack Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Install the XApiClaw plugin by packing the artifact and then installing the generated .tgz file. This method is recommended for release-like local checks to ensure OpenClaw loads the published `dist/index.js` entry. ```bash npm pack ``` ```bash openclaw plugins install npm-pack:./twexapi-dev-xapiclaw-.tgz ``` -------------------------------- ### Explore Tool Query Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Example JSON payload for the 'explore' tool, used for local TwexAPI catalog searches without network requests. ```json { "query": "tweet search", "limit": 5 } ``` -------------------------------- ### Write Workflow Example: Create Tweet Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/agent-workflows.md This pattern is used for write operations after explicit user approval. It specifies the path, method, and the body content for creating a tweet. ```json { "path": "/twitter/tweets/create", "method": "POST", "body": { "text": "Hello from XApiClaw." } } ``` -------------------------------- ### Install from Packed Artifact Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Installs the XApiClaw plugin from a locally packed npm artifact. Useful for validating packaged releases. ```bash npm pack ``` ```bash openclaw plugins install npm-pack:./twexapi-dev-xapiclaw-.tgz ``` ```bash openclaw plugins inspect xapiclaw --runtime --json ``` -------------------------------- ### Install XApiClaw Plugin Source: https://github.com/twexapi-dev/xapiclaw/blob/main/skills/xapiclaw/SKILL.md Use this command to install the XApiClaw plugin via npm within your OpenClaw environment. Ensure you have npm available. ```bash openclaw plugins install npm:@twexapi-dev/xapiclaw ``` -------------------------------- ### Install Pinned XApiClaw Version Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Installs a specific version of the XApiClaw plugin and pins it. Use for reproducible production installs. ```bash openclaw plugins install npm:@twexapi-dev/xapiclaw@ --pin ``` -------------------------------- ### Read Workflow Example: Global Trending Topics Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/agent-workflows.md This pattern is used for public read operations. It specifies the path, method, and query parameters for fetching global trending topics. ```json { "path": "/twitter/global-trending/topics", "method": "GET", "query": { "country": "global" } } ``` -------------------------------- ### Live Call with XApiClaw Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Example JSON payload for making a live call using the 'xapiclaw' tool. Pass query parameters in the 'query' object, not within the path string. ```json { "path": "/twitter/advanced_search", "method": "POST", "body": { "query": "openclaw agents" } } ``` -------------------------------- ### Inspect XApiClaw Runtime Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Verify the runtime registration of the XApiClaw plugin and its associated tools after installation or update. This command helps confirm that OpenClaw has loaded the plugin correctly. ```bash openclaw plugins inspect xapiclaw --runtime --json ``` -------------------------------- ### Get XApiClaw Skill Info Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Retrieve information about the XApiClaw skill. This is often used in conjunction with runtime inspection to understand the plugin's capabilities and status. ```bash openclaw skills info xapiclaw ``` -------------------------------- ### Using explore for Catalog Search Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Demonstrates how the `explore` tool is used to query the TwexAPI endpoint catalog. This is a safe, local operation that does not make network calls. ```text You: "What endpoints are available for tweet search?" AI uses explore -> filters the catalog by category "Search" -> Returns matching endpoints with methods, paths, risks, and cost notes ``` -------------------------------- ### Allow Optional XApiClaw Tools Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Adds 'explore' and 'xapiclaw' to the 'tools.alsoAllow' configuration. Use this instead of replacing the entire tool profile. ```bash openclaw config set tools.alsoAllow '["explore", "xapiclaw"]' ``` -------------------------------- ### Inspect XApiClaw Runtime Loading Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Inspects the runtime loading of the XApiClaw plugin and its bundled skills. Use --json for machine-readable output. ```bash openclaw plugins inspect xapiclaw --runtime --json ``` ```bash openclaw skills info xapiclaw ``` -------------------------------- ### Run Deterministic Source Gate Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Runs the deterministic source gate after building. This is a maintenance task for maintainers. ```bash npm run check-openclaw-platform-fitness ``` -------------------------------- ### Configure TwexAPI API Key Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Sets the TwexAPI API key in OpenClaw plugin configuration. Never paste sensitive keys directly into arguments. ```bash openclaw config set plugins.entries.xapiclaw.config.apiKey "$TWEXAPI_API_KEY" ``` -------------------------------- ### Explore Endpoint for Write Actions Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/agent-workflows.md Use this query to find endpoints related to write actions. It filters by 'write' risk and specifies the method. ```json { "risk": "write", "method": "POST", "limit": 10 } ``` -------------------------------- ### Configure Optional XApiClaw Settings Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Sets optional XApiClaw configuration parameters like baseUrl, pollingEnabled, and pollingInterval. Only change baseUrl for trusted TwexAPI-compatible HTTPS APIs. ```bash openclaw config set plugins.entries.xapiclaw.config.baseUrl "https://api.twexapi.io" ``` ```bash openclaw config set plugins.entries.xapiclaw.config.pollingEnabled false ``` ```bash openclaw config set plugins.entries.xapiclaw.config.pollingInterval 60 ``` -------------------------------- ### Invoking TwexAPI Endpoints with xapiclaw Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Illustrates the use of the `xapiclaw` tool to invoke TwexAPI endpoints. This tool handles authentication automatically and requires user approval for sensitive operations. ```text You: "Search tweets about AI agents" AI uses explore -> finds /twitter/advanced_search AI uses xapiclaw -> calls the endpoint with TwexAPI auth -> Returns tweet results ``` -------------------------------- ### Explore Endpoint for Free Public Reads Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/agent-workflows.md Use this query to find free, public read endpoints. It filters for 'free' access and specifies the query and limit. ```json { "free": true, "query": "global trending topics", "limit": 10 } ``` -------------------------------- ### Posting a Tweet with User Approval Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Shows the workflow for posting a tweet using `xapiclaw`, including the user approval step enforced by OpenClaw before the action is executed. ```text You: "Post a tweet saying 'Hello from XApiClaw!'" AI uses xapiclaw -> requests approval for /twitter/tweets/create You approve -> XApiClaw calls TwexAPI -> Returns the TwexAPI response ``` -------------------------------- ### Set XApiClaw Base URL Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Configure a custom base URL for the XApiClaw plugin. Only change this if you are using a TwexAPI-compatible API deployment. The URL must be HTTPS and contain no embedded credentials. ```bash openclaw config set plugins.entries.xapiclaw.config.baseUrl "https://api.twexapi.io" ``` -------------------------------- ### Update XApiClaw Plugin Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/openclaw-setup.md Updates the XApiClaw plugin to the latest tracked version. This is for routine upgrades. ```bash openclaw plugins update xapiclaw ``` -------------------------------- ### Set XApiClaw Polling Interval Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Configure the interval for polling in seconds. This setting is reserved for future event support and does not affect the current release's functionality. ```bash openclaw config set plugins.entries.xapiclaw.config.pollingInterval 60 ``` -------------------------------- ### Explore Endpoint for Tweet Search Source: https://github.com/twexapi-dev/xapiclaw/blob/main/docs/agent-workflows.md Use this query to find advanced search endpoints. It specifies the search type and method. ```json { "query": "advanced search", "method": "POST", "limit": 5 } ``` -------------------------------- ### Disable XApiClaw Polling Source: https://github.com/twexapi-dev/xapiclaw/blob/main/README.md Disable the polling feature for the XApiClaw plugin. Polling settings are reserved for future event support and do not enable monitors in the current release. ```bash openclaw config set plugins.entries.xapiclaw.config.pollingEnabled false ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.