Metadata-Version: 2.4
Name: langchain-agent-tools
Version: 0.1.0
Summary: LangChain-compatible tools for weather, crypto, security, memory and more — works with any LangChain agent
Project-URL: Homepage, https://github.com/AiAgentKarl/langchain-agent-tools
Project-URL: Repository, https://github.com/AiAgentKarl/langchain-agent-tools
Project-URL: Issues, https://github.com/AiAgentKarl/langchain-agent-tools/issues
Author: AiAgentKarl
License: MIT
License-File: LICENSE
Keywords: ai-agent,crypto,langchain,security,tools,weather
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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 :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: langchain-core>=0.2.0
Description-Content-Type: text/markdown

# langchain-agent-tools

LangChain-compatible tools for AI agents — weather, crypto, security, memory and more. Works with any LangChain agent out of the box.

All tools use **free public APIs** — no API keys required.

## Installation

```bash
pip install langchain-agent-tools
```

## Quick Start

```python
from langchain_agent_tools import get_current_weather, check_pii, store_memory, get_token_price

# Use with any LangChain agent
from langchain.agents import create_tool_calling_agent, AgentExecutor
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model="gpt-4o-mini")
tools = [get_current_weather, check_pii, store_memory, get_token_price]
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)
```

## Available Tools

### Weather (Open-Meteo, no API key)
- `get_current_weather(location)` — Current temperature, humidity, wind, conditions
- `get_weather_forecast(location, days)` — Forecast for up to 16 days

### Crypto (CoinGecko, no API key)
- `get_token_price(token)` — Current price, 24h change, market cap
- `get_token_info(token)` — Detailed info, ATH/ATL, supply, links
- `get_trending_tokens()` — Currently trending cryptocurrencies

### Security
- `check_pii(text)` — Detect emails, phones, credit cards, SSNs, IBANs in text
- `check_url_safety(url)` — Analyze URL for phishing/malware indicators

### Memory (Persistent)
- `store_memory(key, value)` — Save key-value pairs across sessions
- `retrieve_memory(key)` — Look up stored values
- `list_memories()` — Show all stored memories
- `delete_memory(key)` — Remove a stored key

## Usage Examples

### Standalone (without agent)

```python
from langchain_agent_tools import get_current_weather, check_pii

# Weather
result = get_current_weather.invoke({"location": "Berlin"})
print(result)

# PII Check
result = check_pii.invoke({"text": "Contact me at john@example.com or 555-123-4567"})
print(result)
```

### With LangGraph

```python
from langgraph.prebuilt import create_react_agent
from langchain_agent_tools import get_current_weather, get_token_price, check_pii

tools = [get_current_weather, get_token_price, check_pii]
agent = create_react_agent(llm, tools)
```

## Requirements

- Python >= 3.10
- langchain-core >= 0.2.0
- httpx >= 0.27.0

## License

MIT
