### 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). ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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. ``` -------------------------------- ### 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", ...) ``` -------------------------------- ### 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(); ``` -------------------------------- ### 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"} ``` -------------------------------- ### 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 ``` -------------------------------- ### 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}") ``` -------------------------------- ### 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 ``` -------------------------------- ### 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"}, }, ) ``` -------------------------------- ### 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 ``` -------------------------------- ### 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"}) ``` -------------------------------- ### 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 ``` -------------------------------- ### 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"}) ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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" } }' ``` -------------------------------- ### 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 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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/ ``` -------------------------------- ### 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 ``` -------------------------------- ### 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}`)); ``` -------------------------------- ### 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/ ``` -------------------------------- ### 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" } ``` -------------------------------- ### 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. ```