### AIXBT CLI Configuration Example Source: https://docs.aixbt.tech/llms-full.txt This is an example of how to configure the AIXBT CLI. Ensure your configuration is correctly set up before running recipes. ```bash aixbt config set --api-key "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ``` -------------------------------- ### x402 Fetch Integration Example Source: https://docs.aixbt.tech/builders/x402 Example of how to use the `@x402/fetch` package to wrap your HTTP client with automatic payment handling for x402-enabled endpoints. ```APIDOC ## Integration Use the `@x402/fetch` or `@x402/axios` package to wrap your HTTP client with automatic payment handling: ```bash npm install @x402/fetch @x402/evm viem ``` ```javascript import { wrapFetchWithPayment, x402Client, x402HTTPClient } from "@x402/fetch"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; // Create a wallet signer (using your private key) const signer = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY); // Create x402 client and register EVM scheme const client = new x402Client(); registerExactEvmScheme(client, { signer }); // Wrap the fetch function with payment handling const fetchWithPayment = wrapFetchWithPayment(fetch, client); // Make a POST request to the agent fetchWithPayment("https://api.aixbt.tech/x402/v1/agents/indigo", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ messages: [{ role: "user", content: "Hi" }], }), }) .then(async (response) => { const data = await response.json(); console.log("Response:", data); // Get payment receipt from response headers if (response.ok) { const httpClient = new x402HTTPClient(client); const paymentResponse = httpClient.getPaymentSettleResponse((name) => response.headers.get(name) ); console.log("Payment settled:", paymentResponse); } }) .catch((error) => { console.log(error); }); ``` For complete examples using both fetch and axios, see the AIXBT x402 Examples repository. ``` -------------------------------- ### Install AIXBT CLI Source: https://docs.aixbt.tech/builders/cli Installs the AIXBT CLI globally using npm. Requires Node.js 18 or later. If global installation fails, consider using `npx`. ```bash npm install -g @aixbt/cli ``` -------------------------------- ### Initiate Purchase for Specific Duration Source: https://docs.aixbt.tech/llms-full.txt Use this command to initiate a purchase for a specific duration (e.g., 1 day, 1 week, 4 weeks). The CLI returns structured payment details for the x402 flow. Refer to the Agent x402 Guide for wallet setup and payment execution. ```bash aixbt login --purchase-pass 1d -f json ``` -------------------------------- ### get_usage_guide Source: https://docs.aixbt.tech/llms-full.txt Provides a detailed usage guide for assistance. ```APIDOC ## get_usage_guide ### Description Detailed usage guide (call this for help). ### Method APICALL ### Endpoint /get_usage_guide ``` -------------------------------- ### Get Project Metrics Snapshot (cURL) Source: https://docs.aixbt.tech/builders/api/get-v2-projects-id-metrics Example of how to fetch project metrics using cURL. Use the 'at' query parameter for historical data. ```curl curl -X GET "https://api.aixbt.tech/v2/projects/string/metrics?at=2026-03-25T12%3A00%3A00Z" ``` -------------------------------- ### Install x402 Dependencies Source: https://docs.aixbt.tech/builders/agent-x402-guide Installs the necessary npm packages for using x402 endpoints, including fetch wrappers, EVM payment schemes, and wallet utilities. ```bash npm install @x402/fetch @x402/evm viem ``` -------------------------------- ### Pay-Per-Use Example Source: https://docs.aixbt.tech/builders/cli This option can be used when no API key is configured or when payment is required. It allows for usage without pre-configured credentials. ```bash --pay-per-use ``` -------------------------------- ### Get Full Structured CLI Reference Source: https://docs.aixbt.tech/llms-full.txt Use `aixbt help all -f json` to get a full, structured reference of all commands and flags. For detailed help on a specific command, use ` --help`. ```bash aixbt help all -f json ``` -------------------------------- ### Example Query Parameters for Get Grounding History Source: https://docs.aixbt.tech/llms-full.txt Illustrates how to filter and paginate grounding history data using query parameters. Supports date range filtering (`from`, `to`), anchor clamping (`at`), section filtering, and pagination (`page`, `limit`). ```http GET /v2/grounding/history?from=2023-01-01T00:00:00Z&to=2023-01-31T23:59:59Z§ions=crypto,macro&page=1&limit=10 ``` -------------------------------- ### Filtering Example Source: https://docs.aixbt.tech/builders/rest-api Most list endpoints support filtering. Filters use AND logic between parameters and OR logic for multiple values within a parameter. This example filters projects by name (eth or btc) and chain. ```bash # Projects matching (name=eth OR name=btc) AND chain=base curl "https://api.aixbt.tech/v2/projects?names=eth,btc&chain=base" \ -H "x-api-key: YOUR_API_KEY" ``` -------------------------------- ### API Key Generation Response Example Source: https://docs.aixbt.tech/builders/x402 This is an example of the response received when generating an API key. Ensure you save the apiKey immediately as it is only returned once. ```json { "status": 201, "data": { "apiKey": "a1b2c3d4e5f6...", "expiresAt": "2026-03-27T08:00:00.000Z", "period": "4w", "type": "x402", "scopes": ["mcp", "projects"], "rateLimit": { "requestsPerMinute": 30, "requestsPerDay": 10000 }, "warning": "Save this API key now. It will not be shown again." } } ``` -------------------------------- ### API Step Example Source: https://docs.aixbt.tech/llms-full.txt Defines an API step to fetch project data with specific parameters and a fallback message. ```yaml - id: projects type: api action: projects params: limit: 10 sortBy: momentumScore - id: price_data type: api action: chart source: market params: geckoId: bitcoin limit: 30 fallback: "Use publicly available price data instead." ``` -------------------------------- ### Instruction Example: Momentum and Price Divergence Source: https://docs.aixbt.tech/llms-full.txt An example of good instruction writing that frames analysis by assessing relationships between metrics. It instructs the agent to evaluate momentum drivers and flag divergences. ```text For each project, assess whether momentum is driven by genuine adoption intel or visibility noise. Flag divergences where momentum and price are moving in opposite directions. ``` -------------------------------- ### API Step Example Source: https://docs.aixbt.tech/builders/recipes/recipe-specification Defines an API step to fetch project data with specific parameters like limit and sort order. ```yaml - id: projects type: api action: projects params: limit: 10 sortBy: momentumScore ``` -------------------------------- ### Install AIXBT Skill Source: https://docs.aixbt.tech/builders/skill Use this command to install the AIXBT skill for your AI agent. This command is compatible with various AI agents like Claude Code, Cursor, Codex, and Gemini CLI. ```bash npx skills add aixbt/skills ``` -------------------------------- ### API Key Authentication Example Source: https://docs.aixbt.tech/builders/rest-api Include your API key in the 'x-api-key' header for most endpoints. ```curl curl "https://api.aixbt.tech/v2/projects" \ -H "x-api-key: YOUR_API_KEY" ``` -------------------------------- ### List Projects with Filters (cURL) Source: https://docs.aixbt.tech/builders/api/get-v2-projects Example of how to list projects using cURL, filtering by contract address and specifying a historical timestamp. ```bash curl -X GET "https://api.aixbt.tech/v2/projects?address=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&at=2026-03-25T12%3A00%3A00Z" ``` -------------------------------- ### Get Project Momentum History (cURL) Source: https://docs.aixbt.tech/builders/api/get-v2-projects-id-momentum Example of fetching project momentum history using cURL with specified start and end dates, and a historical anchor point. ```bash curl -X GET "https://api.aixbt.tech/v2/projects/string/momentum?start=2025-11-21T00%3A00%3A00.000Z&end=2025-11-28T00%3A00%3A00.000Z&at=2026-03-25T12%3A00%3A00Z" ``` -------------------------------- ### Login Command Example Source: https://docs.aixbt.tech/builders/cli Use this command to configure your API credentials. It's also used to set up a new key when the current one expires or is invalid. ```bash aixbt login ``` -------------------------------- ### Instruction Example: Cluster Engagement Analysis Source: https://docs.aixbt.tech/llms-full.txt An example of good instruction writing that focuses on structural patterns and analytical intent rather than entity enumeration. It guides the agent to report on cluster engagement metrics. ```text Report cluster engagement: count of community clusters represented, whether that count is expanding (new clusters appearing) or contracting (clusters dropping off), and the coverage rate across account archetypes. ``` -------------------------------- ### Get Project by ID with Historical Data (cURL) Source: https://docs.aixbt.tech/builders/api/get-v2-projects-id Example of fetching a project's data as it existed at a specific historical timestamp using cURL. The `at` parameter specifies the historical date-time. ```bash curl -X GET "https://api.aixbt.tech/v2/projects/string?at=2026-03-25T12%3A00%3A00Z" ``` -------------------------------- ### Run Project Deep Dive Recipe Source: https://docs.aixbt.tech/builders/recipes/recipe-building-blocks Examples of how to execute the `project_deep_dive` recipe using different input parameters for tickers or project names. ```bash aixbt recipe run project_deep_dive --tickers SOL aixbt recipe run project_deep_dive --names "solana,ethereum" ``` -------------------------------- ### Get Project Price Candles (cURL) Source: https://docs.aixbt.tech/llms-full.txt Retrieve OHLCV candlestick data for a specific project. The 'id' is the MongoDB ObjectId of the project. You can specify interval, start, end, and 'at' parameters for custom date ranges. ```bash curl "https://api.aixbt.tech/v2/projects/{id}/candles?interval=1h&start=2023-01-01T00:00:00Z&end=2023-01-02T00:00:00Z" ``` -------------------------------- ### Example Query Parameters for List Projects Source: https://docs.aixbt.tech/llms-full.txt Demonstrates filtering and sorting projects using various query parameters. Supports filtering by IDs, names, X handles, tickers, chain, address, momentum score, token presence, and creation date. Also allows sorting by different fields and historical data retrieval. ```http GET /v2/projects?names=eth,btc&tickers=SOL&chain=ethereum&minMomentumScore=0.5&sortBy=popularityScore&hasToken=true&createdAfter=2023-01-01T00:00:00Z&at=2022-12-31T23:59:59Z ``` -------------------------------- ### AIXBT Configuration File Example Source: https://docs.aixbt.tech/builders/cli Configure the default agent and allowed tools via the `~/.aixbt/config.json` file. This provides persistent configuration for AIXBT CLI. ```json { "agent": "claude", "agentAllowedTools": ["Read"] } ``` -------------------------------- ### Pagination Example Source: https://docs.aixbt.tech/builders/rest-api List endpoints support pagination using 'page' and 'limit' query parameters. Ensure to include your API key in the request header. ```bash curl "https://api.aixbt.tech/v2/projects?page=2&limit=25" \ -H "x-api-key: YOUR_API_KEY" ``` -------------------------------- ### Recipe Hints Configuration Source: https://docs.aixbt.tech/builders/recipes/recipe-specification Example of how to configure hints for an agent. The 'combine' field specifies steps with similar data, 'key' provides a common field for joining, and 'include' lists reference data. ```yaml hints: combine: - projects - momentum key: id include: - clusters ``` -------------------------------- ### Indigo Chat Request Example Source: https://docs.aixbt.tech/builders/x402 Example of a request payload for the Indigo Chat agent. For conversational context, include the prior messages in the 'messages' array. ```json { "messages": [ { "role": "user", "content": "Which developing narrative has the most potential for growth?" } ] } ``` ```json { "messages": [ { "role": "user", "content": "Which developing narrative has the most potential for growth?" }, { "role": "assistant", "content": "Based on current momentum, ..." }, { "role": "user", "content": "What are the main risks with that narrative?" } ] } ``` -------------------------------- ### Initialize x402 Fetch with EVM Payment Scheme Source: https://docs.aixbt.tech/builders/agent-x402-guide Sets up a fetch client with automatic x402 payment handling using an EVM scheme. Requires a signer derived from a private key. ```typescript import { wrapFetchWithPayment } from "@x402/fetch"; import { x402Client } from "@x402/core/client"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); registerExactEvmScheme(client, { signer }); const fetchWithPayment = wrapFetchWithPayment(fetch, client); ``` -------------------------------- ### Run Intel Scanner Recipe Source: https://docs.aixbt.tech/builders/recipes/recipe-building-blocks Command to execute the 'intel_scanner' recipe using the AIXBT CLI. ```bash aixbt recipe run intel_scanner ``` -------------------------------- ### Initialize x402 Fetch with EVM Payment Scheme Source: https://docs.aixbt.tech/llms-full.txt Wrap the native fetch function with automatic payment handling using the x402 client and EVM scheme. This requires a wallet signer created from a private key. ```javascript import { wrapFetchWithPayment, x402Client, x402HTTPClient } from "@x402/fetch"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; // Create a wallet signer (using your private key) const signer = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY); // Create x402 client and register EVM scheme const client = new x402Client(); registerExactEvmScheme(client, { signer }); // Wrap the fetch function with payment handling const fetchWithPayment = wrapFetchWithPayment(fetch, client); // Make a POST request to the agent fetchWithPayment("https://api.aixbt.tech/x402/v1/agents/indigo", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ messages: [{ role: "user", content: "Hi" }], }), }) .then(async (response) => { const data = await response.json(); console.log("Response:", data); // Get payment receipt from response headers if (response.ok) { const httpClient = new x402HTTPClient(client); const paymentResponse = httpClient.getPaymentSettleResponse((name) => ``` -------------------------------- ### Response Body Example for Signal Categories Source: https://docs.aixbt.tech/builders/api/get-v2-signal-categories This is an example of the JSON response body returned by the /v2/signal-categories endpoint. It includes the status code and a list of signal category objects, each with an ID, name, and description. ```json { "status": 200, "data": [ { "id": "string", "name": "string", "description": "string" } ] } ``` -------------------------------- ### Get Project Rank History (cURL) Source: https://docs.aixbt.tech/builders/api/get-v2-projects-id-rank Use this cURL command to make a GET request to the API endpoint for retrieving project rank history. Replace 'string' with the actual project ID. ```bash curl -X GET "https://api.aixbt.tech/v2/projects/string/rank" ``` -------------------------------- ### x402 Fetch Integration with EVM Scheme Source: https://docs.aixbt.tech/builders/x402 Integrate the x402 protocol into your application using the @x402/fetch package. This example demonstrates wrapping the fetch function with automatic payment handling for EVM-based payments using a private key signer. ```javascript npm install @x402/fetch @x402/evm viem ``` ```javascript import { wrapFetchWithPayment, x402Client, x402HTTPClient } from "@x402/fetch"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; // Create a wallet signer (using your private key) const signer = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY); // Create x402 client and register EVM scheme const client = new x402Client(); registerExactEvmScheme(client, { signer }); // Wrap the fetch function with payment handling const fetchWithPayment = wrapFetchWithPayment(fetch, client); // Make a POST request to the agent fetchWithPayment("https://api.aixbt.tech/x402/v1/agents/indigo", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ messages: [{ role: "user", content: "Hi" }], }), }) .then(async (response) => { const data = await response.json(); console.log("Response:", data); // Get payment receipt from response headers if (response.ok) { const httpClient = new x402HTTPClient(client); const paymentResponse = httpClient.getPaymentSettleResponse((name) => response.headers.get(name) ); console.log("Payment settled:", paymentResponse); } }) .catch((error) => { console.log(error); }); ``` -------------------------------- ### cURL Request to Get Recipe by Name Source: https://docs.aixbt.tech/builders/api/get-v2-recipes-name Use this cURL command to make a GET request to the API to retrieve a specific recipe's definition. Replace 'string' with the actual name of the recipe you want to fetch. ```bash curl -X GET "https://api.aixbt.tech/v2/recipes/string" ``` -------------------------------- ### Carry-Forward Context Example Source: https://docs.aixbt.tech/builders/recipes/recipe-specification Demonstrates how carry-forward context works with agent steps. Segment 1's agent step explicitly requests 'projects' and 'picks' from previous segments. ```text Segment 0: [projects] → [intel] → [picks (agent)] | yield (carries: projects, intel) Segment 1: [details] → [final (agent, context: [projects, picks])] ^ projects restored from carry-forward ``` -------------------------------- ### Recipe Hints Configuration Source: https://docs.aixbt.tech/llms-full.txt Specifies how to combine different data sources and includes for recipe generation. Defines the key for joining data and lists the data sources to include. ```yaml hints: combine: [recent_intel, active_projects, narrative, price_history] key: "projectId:id" include: [clusters, market_context] ``` -------------------------------- ### Get Project Source: https://docs.aixbt.tech/builders/api Retrieves a specific project by its ID. ```APIDOC ## GET /v2/projects/{id} ### Description Get Project ### Method GET ### Endpoint /v2/projects/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the project. ``` -------------------------------- ### Get Project Source: https://docs.aixbt.tech/llms.txt Retrieves detailed information about a specific project. ```APIDOC ## GET /v2/projects/{id} ### Description Retrieves detailed information about a specific project. ### Method GET ### Endpoint /v2/projects/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the project. ### Response #### Success Response (200) - **project** (object) - An object containing detailed information about the project. #### Response Example { "project": { "id": "bitcoin", "name": "Bitcoin", "symbol": "BTC", "description": "The first decentralized cryptocurrency." } } ``` -------------------------------- ### CLI Commands for Required One Of Parameters Source: https://docs.aixbt.tech/builders/recipes/recipe-specification Example CLI commands demonstrating how to invoke a recipe using different parameters from the 'requiredOneOf' group. ```bash aixbt recipe run project_deep_dive --tickers SOL ``` ```bash aixbt recipe run project_deep_dive --names "solana" ``` ```bash aixbt recipe run project_deep_dive --address 0x... ``` -------------------------------- ### Recipe Segment Structure Example Source: https://docs.aixbt.tech/builders/recipes/recipe-specification Illustrates how recipes are divided into segments by agent steps. Segment 0 ends with an agent step, and Segment 1 begins after it, with defined access rules for data. ```text Segment 0: [api_step_1] → [api_step_with_for] → [agent_step_1] | yield Segment 1: [api_step_2] → [api_step_3] ^ can access: agent_step_1 output + own segment steps x cannot access: api_step_1, api_step_with_for ``` -------------------------------- ### Get Recipe by Name Source: https://docs.aixbt.tech/builders/api Retrieves a specific recipe by its name. ```APIDOC ## GET /v2/recipes/{name} ### Description Get recipe by name ### Method GET ### Endpoint /v2/recipes/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the recipe. ``` -------------------------------- ### Get Grounding History Source: https://docs.aixbt.tech/builders/api Retrieves the history of market grounding. ```APIDOC ## GET /v2/grounding/history ### Description Get Grounding History ### Method GET ### Endpoint /v2/grounding/history ``` -------------------------------- ### Get Market Grounding Source: https://docs.aixbt.tech/builders/api Retrieves market grounding data. ```APIDOC ## GET /v2/grounding ### Description Get Market Grounding ### Method GET ### Endpoint /v2/grounding ``` -------------------------------- ### Run Direct Provider Actions Source: https://docs.aixbt.tech/llms-full.txt Execute direct data commands from AIXBT providers. Use `aixbt provider --help` to list available actions. ```bash aixbt provider market chart --geckoId bitcoin --limit 30 -f json ``` ```bash aixbt provider security security-check --chain ethereum --address 0x... -f json ``` -------------------------------- ### Get Grounding History Source: https://docs.aixbt.tech/llms-full.txt Retrieves the history of market grounding data. ```APIDOC ## GET /v2/grounding/history ### Description Get Grounding History. ### Method GET ### Endpoint /v2/grounding/history ```