Metadata-Version: 2.4
Name: langchain-strale
Version: 0.1.0
Summary: LangChain integration for Strale — 233 business capabilities as agent tools
Author-email: Strale <hello@strale.dev>
License-Expression: MIT
Project-URL: Homepage, https://strale.dev
Project-URL: Repository, https://github.com/straledev/strale
Project-URL: Documentation, https://strale.dev/docs
Keywords: langchain,strale,ai,agent,tools,capabilities
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: langchain-core>=0.2.0
Requires-Dist: requests>=2.28.0
Requires-Dist: pydantic>=2.0.0

# langchain-strale

All 233 [Strale](https://strale.dev) capabilities as LangChain tools. Company data, VAT validation, web scraping, compliance checks, and more — available to your LangChain agents with a single import.

## Install

```bash
pip install langchain-strale
```

## Quick start

```python
from langchain_strale import StraleToolkit

toolkit = StraleToolkit(api_key="sk_live_...")
tools = toolkit.get_tools()  # 233 capabilities + search & balance tools
```

## Filter by category

```python
tools = toolkit.get_tools(categories=["finance", "compliance"])
```

## Use with an agent

```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"})
```

## What's included

Each Strale capability becomes a LangChain `BaseTool` with:

- **name** — capability slug (e.g. `vat-validate`, `swedish-company-data`)
- **description** — what it does + price in EUR
- **args_schema** — Pydantic model generated from the capability's input schema
- **_run()** — calls the Strale API

Plus two meta-tools:

- **strale_search** — discover capabilities by keyword
- **strale_balance** — check your wallet balance

## Get an API key

Sign up at [strale.dev](https://strale.dev) — new accounts get €2.00 in trial credits, no card required.

## Links

- [Strale API docs](https://strale.dev/docs)
- [Full capability catalog](https://strale-production.up.railway.app/v1/capabilities)
- [MCP server](https://www.npmjs.com/package/strale-mcp)
