### Quick Start Source: https://github.com/strale-io/strale/blob/main/packages/crewai-strale/README.md Initialize the StraleToolkit and get available tools for your CrewAI agents. ```APIDOC ## Quick start ```python from crewai_strale import StraleToolkit toolkit = StraleToolkit(api_key="sk_live_...") tools = toolkit.get_tools() # 250+ capabilities + search & balance tools ``` ``` -------------------------------- ### Discover Capabilities and Check Balance Source: https://github.com/strale-io/strale/blob/main/packages/skill/SKILL.md Examples of how to fetch the available capabilities catalog or check the current wallet balance using GET requests. ```http GET https://api.strale.io/v1/capabilities GET https://api.strale.io/v1/capabilities?search=sanctions GET https://api.strale.io/v1/wallet/balance ``` -------------------------------- ### Execute Example Source: https://github.com/strale-io/strale/blob/main/packages/mcp-server/README.md An example demonstrating the search and execute flow for a Swedish company. ```APIDOC ### Example ``` Agent: strale_search(query: "swedish company") → Returns: swedish-company-data | sqs: 83 | quality: A | reliability: B | usable: true | strategy: direct Agent: strale_execute(slug: "swedish-company-data", inputs: { company_name: "Spotify AB" }) → Returns: { output: { org_number: "5568401925", ... }, price_cents: 80, latency_ms: 2340, quality: { sqs: 83.5, quality_profile: "A", reliability_profile: "B" } } ``` ``` -------------------------------- ### Installation Source: https://github.com/strale-io/strale/blob/main/packages/composio-strale/README.md Install the composio-strale Python package using pip. ```APIDOC ## Install ```bash pip install composio-strale ``` ``` -------------------------------- ### Installation Source: https://github.com/strale-io/strale/blob/main/packages/crewai-strale/README.md Install the crewai-strale library using pip. ```APIDOC ## Install ```bash pip install crewai-strale ``` ``` -------------------------------- ### Agent Interaction Examples Source: https://github.com/strale-io/strale/blob/main/packages/mcp-server/README.md Examples of how to interact with Strale agents for searching and executing capabilities. ```APIDOC ### Agent Interaction Examples ``` Agent: strale_search(query: "kyb essentials sweden") → Returns: kyb-essentials-se | €1.50 | 4 checks Agent: strale_execute(slug: "kyb-essentials-se", inputs: { org_number: "5591674668" }) → Returns: { checks: { company_exists: true, sanctions_clear: true, ... }, disclaimer: {...} } ``` ``` -------------------------------- ### Install Strale SDK Source: https://github.com/strale-io/strale/blob/main/packages/sdk-typescript/README.md Install the official Strale TypeScript SDK via npm to begin integration. ```bash npm install straleio ``` -------------------------------- ### Quick Start: Search and Execute Capabilities Source: https://github.com/strale-io/strale/blob/main/packages/composio-strale/README.md Demonstrates how to initialize Composio, register Strale tools, search for capabilities, and execute a specific capability. ```APIDOC ## Quick start ```python from composio import Composio from composio_strale import register_strale_tools composio = Composio() register_strale_tools(composio, api_key="sk_live_...") # Search for capabilities result = composio.tools.execute( user_id="default", slug="STRALE_SEARCH", arguments={"query": "sanctions screening"}, ) # Execute a capability result = composio.tools.execute( user_id="default", slug="STRALE_EXECUTE", arguments={ "capability_slug": "sanctions-check", "inputs": {"name": "Acme Corp"} }, ) ``` ``` -------------------------------- ### Integration Examples Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/2026-03-23-email-design-system.md Examples of how the email components and data enrichment functions are used in different Strale prompts. ```APIDOC ## Integration Examples ### Description This section illustrates how the email design system and data enrichment functions are integrated into various Strale features. ### Prompt 02 (Interrupt Emails) **Imports**: `emailWrapper`, `statusBadge`, `capabilityTable`, `numberedStep`, `probeDataTable`, `infrastructureTable`, `codeBlock` **Data Enrichment**: `getAffectedCapabilityDetails`, `getCircuitBreakerState`, `checkEnvVarExists` ### Prompt 03 (Weekly Digest) **Imports**: All table and grid components (`metricGrid`, `capabilityTable`, `eventLogTable`, `infrastructureTable`, etc.) **Data Enrichment**: `getTestActivitySummary`, `getDependencyOutageHistory` ### Prompt 04 (Test/Preview Tooling) **Imports**: `emailWrapper` (with mock data for rendering preview HTML). ``` -------------------------------- ### Build an Agent with Strale (TypeScript) Source: https://github.com/strale-io/strale/blob/main/README.md This TypeScript code example provides a foundation for building an AI coding agent that integrates with Strale services. It outlines the necessary setup and potential interactions with the Strale API for agent functionalities. ```TypeScript import { StraleClient } from "@strale/client"; async function initializeAgent() { const client = new StraleClient({ apiKey: process.env.STRALE_API_KEY, }); // Example: Use Strale to get quality score for a capability const qualityScore = await client.getQualityScore("eu-vat-validate"); console.log("Quality Score:", qualityScore); // Further agent logic using Strale capabilities... } initializeAgent(); ``` -------------------------------- ### Install Composio Strale Package Source: https://github.com/strale-io/strale/blob/main/packages/composio-strale/README.md Command to install the necessary Python package for integrating Strale with Composio. ```bash pip install composio-strale ``` -------------------------------- ### Quick Start: Execute a Task with Strale SDK Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Demonstrates the basic usage of the straleio SDK to execute a task. It initializes the Strale client with an API key and calls the 'do' method with a task description. The output of the task is then printed. ```python from straleio import Strale strale = Strale(api_key="sk_live_...") result = strale.do(task="validate VAT number SE556703748501") print(result.output) # {"valid": True, "country_code": "SE", "company_name": "Spotify AB"} ``` -------------------------------- ### Initialize Strale Client and Execute Capabilities Source: https://context7.com/strale-io/strale/llms.txt Demonstrates how to initialize the Strale client with configuration options and execute a capability. Includes examples for handling async polling, budget constraints, and error management. ```typescript import Strale, { InsufficientBalanceError, ExecutionFailedError, CapabilityUnavailableError } from "straleio"; const strale = new Strale({ apiKey: process.env.STRALE_API_KEY!, defaultMaxPriceCents: 200, timeout: 60_000, pollInterval: 2_000, maxPollWait: 120_000 }); const result = await strale.do({ capability_slug: "eu-vat-validate", inputs: { vat_number: "SE556012579001" }, max_price_cents: 50 }); try { await strale.do({ capability_slug: "expensive-capability", inputs: { query: "test" }, max_price_cents: 10 }); } catch (error) { if (error instanceof InsufficientBalanceError) { console.log(`Need €${(error.details.required_cents / 100).toFixed(2)}`); } } ``` ```python from straleio import Strale, DoRequest from straleio.errors import InsufficientBalanceError, ExecutionFailedError strale = Strale(api_key="sk_live_your_key", default_max_price_cents=200) result = strale.do(DoRequest( capability_slug="sanctions-check", inputs={"name": "John Smith", "country": "SE"}, max_price_cents=10 )) try: strale.do(DoRequest(capability_slug="expensive-check", inputs={"query": "test"}, max_price_cents=5)) except InsufficientBalanceError as e: print(f"Need to top up: {e.details}") ``` -------------------------------- ### Install Strale Capabilities Package Source: https://github.com/strale-io/strale/blob/main/packages/strale-capabilities/README.md Installs the strale-capabilities package via npm to access the local catalog. ```bash npm install strale-capabilities ``` -------------------------------- ### Strale Agent Interaction Examples Source: https://github.com/strale-io/strale/blob/main/packages/mcp-server/README.md Examples demonstrating how to interact with the Strale agent using natural language queries and specific commands like `strale_search` and `strale_execute`. ```text Agent: strale_search(query: "kyb essentials sweden") → Returns: kyb-essentials-se | €1.50 | 4 checks Agent: strale_execute(slug: "kyb-essentials-se", inputs: { org_number: "5591674668" }) → Returns: { checks: { company_exists: true, sanctions_clear: true, ... }, disclaimer: {...} } ``` ```text Agent: strale_search(query: "swedish company") → Returns: swedish-company-data | sqs: 83 | quality: A | reliability: B | usable: true | strategy: direct Agent: strale_execute(slug: "swedish-company-data", inputs: { company_name: "Spotify AB" }) → Returns: { output: { org_number: "5568401925", ... }, price_cents: 80, latency_ms: 2340, quality: { sqs: 83.5, quality_profile: "A", reliability_profile: "B" } } ``` -------------------------------- ### Install straleio Python SDK Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Installs the straleio Python package using pip. This is the first step to using the Strale API in your Python projects. ```bash pip install straleio ``` -------------------------------- ### Initialize Strale Toolkit and Get Tools Source: https://github.com/strale-io/strale/blob/main/packages/langchain-strale/README.md Initializes the StraleToolkit with an API key and retrieves all available Strale tools, including custom capabilities and meta-tools like search and balance. ```python from langchain_strale import StraleToolkit toolkit = StraleToolkit(api_key="sk_live_...") tools = toolkit.get_tools() # 250+ capabilities + search & balance tools ``` -------------------------------- ### GET /v1/solutions Source: https://github.com/strale-io/strale/blob/main/audit-backend-report.md Retrieves a list of available solutions. ```APIDOC ## GET /v1/solutions ### Description Returns a list of solutions. Note: This endpoint uses camelCase for fields and currently lacks the data_source field. ### Method GET ### Endpoint /v1/solutions ### Response #### Success Response (200) - **priceCents** (number) - Price in cents. - **stepCount** (number) - Number of steps in the solution. - **transparencyTag** (string) - Transparency classification. ``` -------------------------------- ### Install Strale Semantic Kernel Source: https://github.com/strale-io/strale/blob/main/packages/semantic-kernel-strale/README.md Install the necessary packages to use Strale capabilities within a Semantic Kernel environment. ```bash npm install strale-semantic-kernel semantic-kernel ``` -------------------------------- ### Execute Capabilities via /v1/do API Source: https://context7.com/strale-io/strale/llms.txt Examples for executing capabilities using the REST API. Includes standard execution, dry-run mode for cost estimation, and free-tier usage without authentication. ```bash curl -X POST https://api.strale.io/v1/do \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "capability_slug": "swedish-company-data", "inputs": { "org_number": "5560125790" }, "max_price_cents": 100 }' ``` ```bash curl -X POST https://api.strale.io/v1/do \ -H "Authorization: Bearer sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "capability_slug": "eu-vat-validate", "inputs": { "vat_number": "SE556012579001" }, "max_price_cents": 50, "dry_run": true }' ``` ```bash curl -X POST https://api.strale.io/v1/do \ -H "Content-Type: application/json" \ -d '{ "capability_slug": "email-validate", "inputs": { "email": "test@example.com" } }' ``` -------------------------------- ### Install langchain-strale Source: https://github.com/strale-io/strale/blob/main/packages/langchain-strale/README.md Installs the langchain-strale Python package using pip. This is the first step to integrating Strale capabilities into LangChain. ```bash pip install langchain-strale ``` -------------------------------- ### Agentic Execution Logic Source: https://github.com/strale-io/strale/blob/main/packages/mcp-server/README.md Example Python logic demonstrating how to consume the execution_guidance object to handle capability degradation, retries, and fallbacks. ```python trust = strale_trust_profile(slug="vat-validate") guidance = trust["execution_guidance"] if not guidance["usable"]: fallback = guidance["if_strategy_fails"] if fallback: result = strale_execute(slug=fallback["fallback_capability"], ...) else: raise Exception(f"Capability degraded. Recovery: {guidance['recovery']}") elif guidance["strategy"] == "retry_with_backoff": result = execute_with_retry(slug="vat-validate", max_attempts=3, ...) else: result = strale_execute(slug="vat-validate", ...) ``` -------------------------------- ### Install Strale ADK Package Source: https://github.com/strale-io/strale/blob/main/packages/google-adk-strale/README.md Command to install the Google ADK Strale integration package via pip. ```bash pip install google-adk-strale ``` -------------------------------- ### Install openai-agents-strale Package Source: https://github.com/strale-io/strale/blob/main/packages/openai-agents-strale/README.md Installs the necessary Python package for integrating OpenAI Agents with Strale. This is the first step before using any of the provided functionalities. ```bash pip install openai-agents-strale ``` -------------------------------- ### Execute Strale Capability with Python SDK Source: https://github.com/strale-io/strale/blob/main/packages/skill/SKILL.md Example of using the Strale Python SDK to perform a capability, such as 'vat-vies-validate'. It shows how to instantiate the client with an API key and use the `do` method, specifying the capability slug, input parameters, and maximum cost. ```python from straleio import Strale client = Strale(api_key="sk_live_...") result = client.do( capability_slug="vat-vies-validate", inputs={"vat_number": "SE556703748501"}, max_price_cents=10, ) ``` -------------------------------- ### Install Strale Skill for Claude Code (Personal) Source: https://github.com/strale-io/strale/blob/main/packages/skill/README.md Installs the Strale Agent Skill for personal use with Claude Code by copying the SKILL.md file to the user's Claude skills directory. ```bash mkdir -p ~/.claude/skills/strale cp SKILL.md ~/.claude/skills/strale/ ``` -------------------------------- ### Install Strale Skill for Claude Code (Project) Source: https://github.com/strale-io/strale/blob/main/packages/skill/README.md Installs the Strale Agent Skill for project-specific use with Claude Code, allowing shared access via git by copying the SKILL.md file to the project's Claude skills directory. ```bash mkdir -p .claude/skills/strale cp SKILL.md .claude/skills/strale/ ``` -------------------------------- ### Async Support for Strale SDK Operations Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Illustrates how to use the asynchronous capabilities of the straleio SDK for non-blocking operations. It shows the setup for an async function and the use of 'do_async' for executing tasks. ```python import asyncio from straleio import Strale async def main(): strale = Strale(api_key="sk_live_...") result = await strale.do_async(task="validate VAT number SE556703748501") print(result.output) asyncio.run(main()) ``` -------------------------------- ### Example of Health Probe Configuration Source: https://github.com/strale-io/strale/blob/main/CLAUDE.md Illustrates how to configure a health probe for a paid API using `skipAuth: true` to prevent consumption of billable API calls. This ensures health probes remain zero-cost. ```typescript healthProbe: { skipAuth: true } ``` -------------------------------- ### Configure Strale MCP Server Source: https://context7.com/strale-io/strale/llms.txt Configuration examples for connecting the Strale MCP server to AI assistants. Supports both remote streamable HTTP and local stdio transport modes. ```json { "mcpServers": { "strale": { "type": "streamableHttp", "url": "https://api.strale.io/mcp", "headers": { "Authorization": "Bearer sk_live_your_api_key_here" } } } } ``` ```json { "mcpServers": { "strale": { "command": "npx", "args": ["-y", "strale-mcp"], "env": { "STRALE_API_KEY": "sk_live_your_api_key_here", "STRALE_MAX_PRICE_CENTS": "200" } } } } ``` -------------------------------- ### Utilize Strale SDK Solutions (Bundled Workflows) Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Provides examples of using pre-defined 'solutions' or bundled workflows within the Strale SDK. These solutions combine multiple capabilities for common use cases like company verification and compliance checks. ```python # Quick company verification (KYB Essentials — 20 countries) result = strale.do( solution="kyb-essentials-se", input={"org_number": "5591674668"}, ) # Full compliance check with risk narrative (KYB Complete) full_check = strale.do( solution="kyb-complete-se", input={"org_number": "5591674668", "domain": "example.com"}, ) # full_check["narrative"] — plain-language risk assessment # full_check["checks"] — structured results # Invoice fraud detection (Invoice Verify) invoice_check = strale.do( solution="invoice-verify-se", input={ "org_number": "5591674668", "vat_number": "SE559167466801", "iban": "SE3550000000058398257466", }, ) ``` -------------------------------- ### Configure Strale MCP Server Source: https://github.com/strale-io/strale/blob/main/README.md Configuration examples for connecting to the Strale MCP server using either Streamable HTTP or local stdio execution. These configurations are suitable for clients like Claude Desktop or Cursor. ```json { "mcpServers": { "strale": { "type": "streamableHttp", "url": "https://api.strale.io/mcp", "headers": { "Authorization": "Bearer sk_live_your_key_here" } } } } ``` ```json { "mcpServers": { "strale": { "command": "npx", "args": ["-y", "strale-mcp"], "env": { "STRALE_API_KEY": "your_api_key" } } } } ``` -------------------------------- ### Filter Strale Tools by Category for OpenAI Agent Source: https://github.com/strale-io/strale/blob/main/packages/openai-agents-strale/README.md Illustrates how to create Strale tools for an OpenAI agent by filtering capabilities based on a category. This example loads all 'compliance' tools. ```python from openai_agents_strale import create_strale_tools # Load all compliance tools tools = create_strale_tools( api_key="sk_live_...", categories=["compliance"], ) ``` -------------------------------- ### Run Integration Tests for Strale Packages Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/2026-02-27-framework-plugins.md Commands to install dependencies and execute test suites for LangChain, CrewAI, and Semantic Kernel integrations. Requires an active STRALE_API_KEY. ```bash # LangChain cd packages/langchain-strale pip install -e . && STRALE_API_KEY=sk_live_... pytest tests/ -v # CrewAI cd packages/crewai-strale pip install -e . && STRALE_API_KEY=sk_live_... pytest tests/ -v # Semantic Kernel cd packages/semantic-kernel-strale npm install && STRALE_API_KEY=sk_live_... npx tsx --test tests/plugin.test.ts ``` -------------------------------- ### GET /x402/catalog Source: https://github.com/strale-io/strale/blob/main/README.md Retrieves the catalog of available Web3 capabilities and bundled solutions that support the x402 payment protocol for pay-per-call access. ```APIDOC ## GET /x402/catalog ### Description Fetches the list of available Web3 capabilities and solutions that can be accessed via the x402 payment protocol using USDC on Base mainnet. ### Method GET ### Endpoint https://api.strale.io/x402/catalog ### Parameters None ### Response #### Success Response (200) - **catalog** (array) - A list of available Web3 tools and their respective metadata. #### Response Example { "catalog": [ { "id": "wallet-risk-score", "provider": "GoPlus" }, { "id": "token-honeypot-check", "provider": "Strale" } ] } ``` -------------------------------- ### System Prompt for Automatic Capability Routing Source: https://github.com/strale-io/strale/blob/main/packages/langchain-strale/README.md Provides an example of a system prompt that can be added to a LangChain agent's configuration to enable automatic routing to Strale capabilities for tasks like verification, data extraction, and compliance checks. ```text When you need to verify a business, validate an IBAN or VAT number, screen against sanctions/PEP lists, extract data from a URL or document, or check compliance — use your Strale tools. Call strale_search to find the right capability, then call it by name. Returns structured JSON with quality scores. 250+ capabilities across 27 countries. Free tier: email-validate, dns-lookup, json-repair, url-to-markdown, iban-validate (no API key needed). ``` -------------------------------- ### Configuration: Missing Environment Variables in .env.example Source: https://github.com/strale-io/strale/blob/main/audit-backend-report.md The '.env.example' file is incomplete, documenting only 8 out of approximately 18 required environment variables. Key variables like API keys for various services and application configuration settings are missing. ```env .env.example ``` -------------------------------- ### Install Strale MCP Server Source: https://github.com/strale-io/strale/blob/main/packages/mcp-server/README.md Commands to install the Strale MCP server package using npm. You can install it locally for a project or globally on your system. ```bash npx strale-mcp npm install -g strale-mcp ``` -------------------------------- ### Configuring Root Layout Metadata Source: https://github.com/strale-io/strale/blob/main/audit/MARKUP_AUDIT.md Example of the metadata configuration in the Next.js root layout to ensure proper SEO and page titles. Includes title templates and base URL configuration. ```tsx export const metadata = { metadataBase: new URL('https://strale.dev'), title: { default: 'Strale', template: '%s | Strale' }, description: 'Strale documentation and API reference' }; ``` -------------------------------- ### GET /v1/solutions/:slug - Solution Details Source: https://context7.com/strale-io/strale/llms.txt Retrieve full details for a specific solution using its slug. This includes workflow steps, pricing, and capabilities. ```APIDOC ## GET /v1/solutions/:slug - Solution Details ### Description Retrieve full details for a solution including step breakdown, input requirements, example I/O, and pricing analysis. Shows each capability in the workflow with its individual pricing and data source. ### Method GET ### Endpoint /v1/solutions/:slug ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier for the solution. ### Request Example ```bash curl https://api.strale.io/v1/solutions/kyb-complete-se ``` ### Response #### Success Response (200) - **slug** (string) - The unique identifier for the solution. - **name** (string) - The name of the solution. - **marketing_name** (string) - The marketing name of the solution. - **description** (string) - A brief description of the solution. - **long_description** (string) - A detailed description of the solution. - **category** (string) - The category the solution belongs to (e.g., "compliance"). - **price_cents** (integer) - The base price of the solution in cents. - **component_sum_cents** (integer) - The sum of prices of all components in cents. - **value_tier** (string) - The value tier of the solution (e.g., "premium"). - **geography** (string) - The geographical region the solution applies to (e.g., "SE"). - **target_audience** (string) - The intended audience for the solution. - **input_schema** (object) - The schema defining the expected input for the solution. - **example_input** (object) - An example of the input required for the solution. - **steps** (array) - An array of objects, where each object represents a step in the solution's workflow. - **extends_with** (array) - An array of objects representing solutions that can extend this one. - **related_solutions** (array) - An array of objects representing related solutions. #### Response Example ```json { "slug": "kyb-complete-se", "name": "KYB Complete Sweden", "marketing_name": "Complete Swedish KYB", "description": "Full company verification with beneficial owners, sanctions, and risk narrative", "long_description": "Comprehensive KYB check for Swedish companies including registry data, beneficial ownership, sanctions screening, PEP checks, adverse media, and AI-generated risk narrative.", "category": "compliance", "price_cents": 250, "component_sum_cents": 310, "value_tier": "premium", "geography": "SE", "target_audience": "compliance-teams", "input_schema": { "type": "object", "properties": { "org_number": { "type": "string", "description": "10-digit Swedish organization number" } }, "required": ["org_number"] }, "example_input": { "org_number": "5560125790" }, "steps": [ { "step_order": 1, "capability_slug": "swedish-company-data", "capability_name": "Swedish Company Data", "capability_price_cents": 80, "can_parallel": false, "data_source": "Bolagsverket" }, { "step_order": 2, "capability_slug": "beneficial-owners-se", "capability_name": "Swedish Beneficial Owners", "capability_price_cents": 50, "can_parallel": true, "parallel_group": "screening" }, { "step_order": 3, "capability_slug": "sanctions-check", "capability_name": "Sanctions Screening", "capability_price_cents": 2, "can_parallel": true, "parallel_group": "screening" } ], "extends_with": [ { "slug": "credit-score-se", "name": "Swedish Credit Score", "description": "Add credit assessment for deeper financial analysis", "price_cents": 100 } ], "related_solutions": [ { "slug": "kyb-essentials-se", "name": "KYB Essentials Sweden", "price_cents": 150, "reason": "shared_capabilities" } ] } ``` ``` -------------------------------- ### Bash: Unified Capability Onboarding CLI Command Source: https://github.com/strale-io/strale/blob/main/docs/onboarding-improvements.md This bash command demonstrates a unified CLI approach to onboard a capability. It orchestrates multiple steps including verification, database insertion, test generation, test execution, SQS scoring, and lifecycle state management. This ensures a consistent and robust onboarding process, preventing broken intermediate states. ```bash npx tsx scripts/onboard-capability.ts --slug wallet-risk-score ``` -------------------------------- ### Install Strale Python Package Source: https://github.com/strale-io/strale/blob/main/packages/pydantic-ai-strale/README.md Command to install the pydantic-ai-strale package via pip. ```bash pip install pydantic-ai-strale ``` -------------------------------- ### Execute Strale Capability with TypeScript SDK Source: https://github.com/strale-io/strale/blob/main/packages/skill/SKILL.md Example of using the Strale TypeScript SDK to perform a capability, such as 'sanctions-check'. It demonstrates initializing the client with an API key and calling the `do` method with the capability slug, inputs, and maximum price. ```typescript import { Strale } from "straleio"; const client = new Strale({ apiKey: "sk_live_..." }); const result = await client.do({ capabilitySlug: "sanctions-check", inputs: { name: "John Doe", country: "US" }, maxPriceCents: 10, }); ``` -------------------------------- ### Using Strale SDK with Free Tier (No API Key) Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Illustrates how to use the Strale SDK for capabilities that do not require authentication. This is useful for testing or for using the limited set of free-tier capabilities. ```python strale = Strale(api_key="") result = strale.do( capability_slug="email-validate", inputs={"email": "hello@example.com"}, ) ``` -------------------------------- ### Execute Strale Tools via Composio Source: https://github.com/strale-io/strale/blob/main/packages/composio-strale/README.md Demonstrates how to register Strale tools and execute specific capabilities like searching or running a sanctions check using the Composio client. ```python from composio import Composio from composio_strale import register_strale_tools composio = Composio() register_strale_tools(composio, api_key="sk_live_...") # Search for capabilities result = composio.tools.execute( user_id="default", slug="STRALE_SEARCH", arguments={"query": "sanctions screening"}, ) # Execute a capability result = composio.tools.execute( user_id="default", slug="STRALE_EXECUTE", arguments={ "capability_slug": "sanctions-check", "inputs": {"name": "Acme Corp"}, }, ) ``` -------------------------------- ### Verify Company with Strale (Python) Source: https://github.com/strale-io/strale/blob/main/README.md This Python code example shows how to verify a company using the Strale API. It likely involves making a request to a Strale endpoint to check company details and returns relevant information. ```Python import requests def verify_company(company_id): url = f"https://api.strale.io/v1/company/{company_id}" response = requests.get(url) response.raise_for_status() return response.json() # Example usage: # company_data = verify_company("your_company_id") # print(company_data) ``` -------------------------------- ### Call Strale API with Python Source: https://github.com/strale-io/strale/blob/main/docs/claude-md-snippet.md Demonstrates how to initialize the Strale client in Python using an API key from environment variables and perform a capability call. It requires the 'straleio' library and the 'os' module. ```Python from straleio import Strale import os client = Strale(api_key=os.environ["STRALE_API_KEY"]) result = client.do("capability-slug", {"param": "value"}) ``` -------------------------------- ### Create and Use LangChain Agent with Strale Tools Source: https://github.com/strale-io/strale/blob/main/packages/langchain-strale/README.md Demonstrates how to create a LangChain agent that utilizes Strale tools. It involves setting up an LLM, a prompt, creating an agent with Strale tools, and executing the agent with an input query. ```python from langchain_openai import ChatOpenAI from langchain.agents import AgentExecutor, create_openai_tools_agent from langchain_core.prompts import ChatPromptTemplate llm = ChatOpenAI(model="gpt-4o") prompt = ChatPromptTemplate.from_messages([ ("system", "You are a helpful business assistant with access to Strale tools."), ("human", "{input}"), ("placeholder", "{agent_scratchpad}"), ]) toolkit = StraleToolkit(api_key="sk_live_...") tools = toolkit.get_tools() agent = create_openai_tools_agent(llm, tools, prompt) executor = AgentExecutor(agent=agent, tools=tools) result = executor.invoke({"input": "Validate VAT number SE556703748501"}) ``` -------------------------------- ### Running the Strale Discovery Pipeline Source: https://github.com/strale-io/strale/blob/main/CLAUDE.md This command executes the Strale onboarding pipeline with the `--discover` flag. This flag enables the automatic generation of `expected_fields` based on the capability's live output and updates the manifest file. It's part of the recommended workflow for new capabilities. ```bash cd apps/api && npx tsx scripts/onboard.ts --discover --manifest ../../manifests/{slug}.yaml ``` -------------------------------- ### List Available Capabilities with Strale SDK Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Demonstrates how to list all available capabilities provided by the Strale API. The output includes details like slug, name, price, and category for each capability. ```python capabilities = strale.list_capabilities() # 256 capabilities with slug, name, price, category ``` -------------------------------- ### Integrate Strale via MCP Native Source: https://github.com/strale-io/strale/blob/main/packages/google-adk-strale/README.md Configures the Google ADK Agent to automatically discover all 250+ Strale tools using the MCP protocol. This approach requires minimal setup and provides immediate access to the full toolset. ```python from google.adk import Agent from google.adk.tools.mcp_tool import MCPToolset, StreamableHTTPConnectionParams strale_tools = MCPToolset( connection_params=StreamableHTTPConnectionParams( url="https://api.strale.io/mcp", headers={"Authorization": "Bearer sk_live_..."}, ) ) agent = Agent( model="gemini-2.0-flash", name="compliance_agent", instruction="You verify business data using Strale tools.", tools=[strale_tools], ) ``` -------------------------------- ### Configure SDK Options Source: https://github.com/strale-io/strale/blob/main/packages/sdk-typescript/README.md Initialize the Strale client with custom configurations such as base URL, request timeouts, and default spending caps. ```typescript const strale = new Strale({ apiKey: "sk_live_...", baseUrl: "https://api.strale.io", timeout: 60_000, defaultMaxPriceCents: 200, }); ``` -------------------------------- ### Install crewai-strale Package Source: https://github.com/strale-io/strale/blob/main/packages/crewai-strale/README.md Installs the crewai-strale Python package using pip. This is the first step to using Strale's capabilities with CrewAI. ```bash pip install crewai-strale ``` -------------------------------- ### Execute Strale Skill (IBAN Validate) via A2A Source: https://github.com/strale-io/strale/blob/main/a2a-sample/blog-strale-a2a.md Demonstrates how to execute a free-tier Strale skill, specifically 'iban-validate', using the A2A protocol. It sends a POST request with a JSON-RPC payload containing the skill ID and message parameters. The example uses `curl` for the request. ```bash curl -X POST https://api.strale.io/a2a \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "message/send", "id": "1", "params": { "skillId": "iban-validate", "message": { "role": "user", "parts": [{"type": "data", "data": {"iban": "DE89370400440532013000"}}] } } }' ``` -------------------------------- ### Discover x402-Enabled Capabilities (Bash) Source: https://context7.com/strale-io/strale/llms.txt This Bash command demonstrates how to discover capabilities that are enabled for the x402 payment protocol, which allows for pay-per-call execution using USDC on Base mainnet without requiring an API key or signup. ```bash # Discover x402-enabled capabilities curl https://api.strale.io/x402/catalog ``` -------------------------------- ### Strale Agent Card Skill Example Source: https://github.com/strale-io/strale/blob/main/a2a-sample/blog-strale-a2a.md An example JSON object representing a skill within the Strale Agent Card. It includes the skill's ID, name, description (with Strale Quality Score), tags, and usage examples. This structure helps A2A orchestrators understand and utilize the skill. ```json { "id": "iban-validate", "name": "IBAN Validate", "description": "Validate an IBAN... SQS: 95/100. FREE — no API key required.", "tags": ["validation", "verify", "check"], "examples": ["Validate an IBAN and return bank details"] } ``` -------------------------------- ### Execute Pre-built Solutions Source: https://github.com/strale-io/strale/blob/main/packages/semantic-kernel-strale/README.md Run pre-built business solutions like KYB checks using the Strale client. ```typescript const result = await client.execute({ solution: "kyb-essentials-se", inputs: { org_number: "5591674668" }, }); ``` -------------------------------- ### Execute Bundled KYB Solution Source: https://github.com/strale-io/strale/blob/main/packages/langchain-strale/README.md Shows how to execute a pre-bundled Know Your Business (KYB) solution provided by Strale, which supports multiple countries. It also mentions that solutions can be found using the strale_search tool. ```python # Execute a bundled KYB solution (20 countries available) result = toolkit.get_tools()[0] # or find by name # Solutions are also available via strale_search: # strale_search(query="kyb essentials sweden") → kyb-essentials-se ``` -------------------------------- ### Batch Onboarding Script for New Verticals (Bash) Source: https://github.com/strale-io/strale/blob/main/docs/onboarding-improvements.md Introduces a batch onboarding script (`scripts/onboard-vertical.ts`) executed via `npx tsx`. This script automates the process of onboarding new verticals by finding executor files, running the full onboarding pipeline, creating solutions, and gating activation on qualified steps. ```bash npx tsx scripts/onboard-vertical.ts --category web3 ``` -------------------------------- ### Install Strale Skill for Codex CLI Source: https://github.com/strale-io/strale/blob/main/packages/skill/README.md Installs the Strale Agent Skill for use with the Codex CLI by copying the SKILL.md file to the user's Codex skills directory. ```bash mkdir -p ~/.codex/skills/strale cp SKILL.md ~/.codex/skills/strale/ ``` -------------------------------- ### Query and Filter Capabilities in Node.js Source: https://github.com/strale-io/strale/blob/main/packages/strale-capabilities/README.md Demonstrates how to import the library to search for capabilities, filter by category, and retrieve specific metadata like names and pricing. ```javascript const strale = require("strale-capabilities"); // Total count console.log(strale.totalCount); // Find by slug const iban = strale.find("iban-validate"); console.log(iban.name); // Filter by category const compliance = strale.byCategory("compliance"); // Keyword search const vatTools = strale.search("VAT"); vatTools.forEach((c) => console.log(` ${c.slug} — ${c.description}`)); ``` -------------------------------- ### GET /balance Source: https://github.com/strale-io/strale/blob/main/packages/sdk-python/README.md Retrieves the current account balance in EUR. ```APIDOC ## GET /balance ### Description Returns the remaining credit balance for the authenticated account. ### Method GET ### Endpoint /balance ### Response #### Success Response (200) - **balance_eur** (string) - The current balance in Euros. #### Response Example { "balance_eur": "1.84" } ``` -------------------------------- ### Use Strale API with Python Client Source: https://github.com/strale-io/strale/blob/main/docs/api-quickstart.md Demonstrates how to use the Strale Python client library to execute capabilities, run solutions, and perform dry runs. Requires an API key. ```python import os from straleio import Strale s = Strale(api_key=os.environ["STRALE_API_KEY"]) # Execute a capability by slug result = s.do(capability_slug="vat-validate", inputs={"vat_number": "SE556703748501"}) print(result.output) # {"valid": True, "country_code": "SE", "company_name": "Spotify AB"} print(result.provenance) # data source and timestamp # Run a multi-step solution kyb = s.do(solution="kyb-essentials-se", input={"org_number": "5591674668"}) print(kyb.output) # Dry run (preview cost without executing) preview = s.dry_run(task="look up Swedish company Klarna") print(preview.matched_capability) # "swedish-company-data" print(preview.price_cents) # 80 ``` -------------------------------- ### GET /x402/vat-format-validate Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/2026-03-19-x402-gateway.md Validates the format of a VAT identification number. ```APIDOC ## GET /x402/vat-format-validate ### Description Verifies if a provided VAT number matches the expected format for its country. ### Method GET ### Endpoint /x402/vat-format-validate ### Parameters #### Query Parameters - **vat** (string) - Required - The VAT number to validate. ### Response #### Success Response (200) - **valid** (boolean) - Whether the VAT format is valid. ``` -------------------------------- ### Strale A2A Execution Response Example Source: https://github.com/strale-io/strale/blob/main/a2a-sample/blog-strale-a2a.md An example JSON response received after executing a Strale skill via the A2A protocol. It follows the JSON-RPC 2.0 standard, indicating the task status, result details (e.g., validation outcome), and metadata like latency. ```json { "jsonrpc": "2.0", "result": { "kind": "task", "status": { "state": "completed", "message": { "parts": [{"type": "data", "data": {"valid": true, "bank": "Commerzbank", "country": "DE"}}] } }, "metadata": { "capability_used": "iban-validate", "latency_ms": 12 } } } ``` -------------------------------- ### Configuration: BROWSERLESS_URL in .env.example Source: https://github.com/strale-io/strale/blob/main/audit-backend-report.md The '.env.example' file documents the 'BROWSERLESS_URL' pointing to the US endpoint ('https://chrome.browserless.io'). The production environment should utilize the EU endpoint. ```env .env.example:17 ``` -------------------------------- ### Get Strale Quality Score API Source: https://github.com/strale-io/strale/blob/main/README.md This snippet demonstrates how to retrieve the Strale Quality Score (SQS) for a specific capability using a GET request to the Strale API. The SQS ranges from 0 to 100 and is built on a dual-profile model (Quality Profile and Reliability Profile). ```HTTP GET https://api.strale.io/v1/quality/eu-vat-validate ``` -------------------------------- ### GET /x402/ssl-check Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/2026-03-19-x402-gateway.md Performs an SSL/TLS certificate check for a given domain. ```APIDOC ## GET /x402/ssl-check ### Description Checks the SSL certificate status for a specified domain. ### Method GET ### Endpoint /x402/ssl-check ### Parameters #### Query Parameters - **domain** (string) - Required - The domain to check. ### Response #### Success Response (200) - **status** (string) - The SSL status result. ``` -------------------------------- ### GET /v1/capabilities Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/phase1a-trust-audit-backend.md Retrieves the capability matrix SQS scores from the cached database. ```APIDOC ## GET /v1/capabilities ### Description Retrieves the capability matrix SQS scores. This endpoint uses cached data from the database and does not apply freshness decay. ### Method GET ### Endpoint /v1/capabilities ### Response #### Success Response (200) - **score** (number) - The calculated SQS score. - **grade** (string) - The grade derived from the quality and reliability profiles. #### Response Example { "score": 85, "grade": "A" } ``` -------------------------------- ### GET /x402/iban-validate Source: https://github.com/strale-io/strale/blob/main/docs/x402-listing.md Validates the structure and checksum of an International Bank Account Number (IBAN). ```APIDOC ## GET /x402/iban-validate ### Description Performs structural and checksum validation on an IBAN to ensure it is formatted correctly. ### Method GET ### Endpoint https://api.strale.io/x402/iban-validate ### Parameters #### Query Parameters - **iban** (string) - Required - The IBAN string to validate. ### Request Example GET https://api.strale.io/x402/iban-validate?iban=DE1234567890 ### Response #### Success Response (200) - **is_valid** (boolean) - Result of the validation check. #### Payment Required (402) - **paymentRequirements** (array) - Details for the required USDC payment on Base network. ``` -------------------------------- ### GET /v1/quality/:slug Source: https://github.com/strale-io/strale/blob/main/audit-backend-report.md Retrieves the full quality profile object for a given capability slug. ```APIDOC ## GET /v1/quality/:slug ### Description Retrieves the full quality profile object for a specific capability. Note that this returns a full object, unlike the string representation in /v1/do. ### Method GET ### Endpoint /v1/quality/:slug ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier for the capability. ### Response #### Success Response (200) - **quality_profile** (object) - The quality profile details including grade, score, label, and factors. #### Response Example { "quality_profile": { "grade": "A", "score": 95, "label": "Excellent", "factors": [] } } ``` -------------------------------- ### CLI: Onboard New Capability Source: https://github.com/strale-io/strale/blob/main/CLAUDE.md The onboard.ts script automates the registration, testing, and schema generation for new capabilities using a YAML manifest. ```APIDOC ## CLI: onboard.ts --discover ### Description Executes a capability using health_check_input, auto-generates expected_fields, creates test suites, and updates the manifest file. ### Method CLI Execution ### Endpoint apps/api/scripts/onboard.ts ### Parameters #### Flags - **--manifest** (string) - Required - Path to the YAML manifest file. - **--discover** (boolean) - Optional - Auto-generates expected_fields from live execution output. - **--dry-run** (boolean) - Optional - Preview changes without database insertion. - **--backfill** (boolean) - Optional - Updates existing capabilities with missing tests or fixtures. - **--fix** (boolean) - Optional - Auto-corrects high-confidence fixture mismatches. - **--strict** (boolean) - Optional - Aborts if execute-and-verify fails. ### Request Example cd apps/api && npx tsx scripts/onboard.ts --discover --manifest ../../manifests/my-capability.yaml ### Response #### Success Response (Exit Code 0) - **status** (string) - Manifest updated and tests generated successfully. ``` -------------------------------- ### GET /x402/iban-validate Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/2026-03-19-x402-gateway.md Validates IBAN numbers including structure, checksum, and bank code extraction. ```APIDOC ## GET /x402/iban-validate ### Description Validates an IBAN string. Returns the validation result if payment is provided, otherwise returns a 402 Payment Required response. ### Method GET ### Endpoint /x402/iban-validate ### Parameters #### Query Parameters - **iban** (string) - Required - The IBAN number to validate. ### Request Example GET /x402/iban-validate?iban=DE89370400440532013000 ### Response #### Success Response (200) - **valid** (boolean) - Whether the IBAN is valid. - **details** (object) - Detailed validation information. #### Error Response (402) - **Payment-Required** (header) - Base64 encoded JSON containing payment details (payTo, amount, currency). ``` -------------------------------- ### GET /v1/internal/trust/capabilities/:slug Source: https://github.com/strale-io/strale/blob/main/handoff/_general/from-code/2026-03-17-ati-phase-a.md Retrieves internal trust and failure classification metrics for a specific capability. ```APIDOC ## GET /v1/internal/trust/capabilities/:slug ### Description Provides internal trust metrics and failure classification data for a capability, used by internal monitoring tools and dashboards. ### Method GET ### Endpoint /v1/internal/trust/capabilities/:slug ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier for the capability. ### Response #### Success Response (200) - **failure_classification** (object) - A breakdown of recent failure verdicts. #### Response Example { "slug": "ecb-interest-rates", "failure_classification": { "upstream_transient": 0, "capability_bug": 0, "infra_limited": 12 } } ``` -------------------------------- ### GET /v1/internal/trust/capabilities/:slug Source: https://github.com/strale-io/strale/blob/main/audit-backend-report.md Retrieves detailed internal trust configuration for a capability, including aliased metrics. ```APIDOC ## GET /v1/internal/trust/capabilities/:slug ### Description Provides internal trust metrics. Note that some internal fields are aliased (e.g., edge_cases are exposed as latency). ### Method GET ### Endpoint /v1/internal/trust/capabilities/:slug ### Parameters #### Path Parameters - **slug** (string) - Required - The capability slug. ### Response #### Success Response (200) - **latency** (number) - Alias for edge_cases pass rate. - **current_availability** (number) - Alias for availability. - **rolling_success** (number) - Alias for correctness. - **upstream_health** (number) - Alias for schema. - **error_resilience** (number) - Alias for error_handling. ```