Metadata-Version: 2.1
Name: langchain-snowflake
Version: 0.2.3
Summary: An integration package connecting Snowflake and LangChain
Home-page: https://github.com/langchain-ai/langchain-snowflake
License: MIT
Requires-Python: >=3.10,<3.14
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
Provides-Extra: key-pair
Requires-Dist: aiohttp (>=3.13.3,<4.0.0)
Requires-Dist: cryptography (>=46.0.5,<47.0.0) ; extra == "key-pair"
Requires-Dist: langchain (>=1.0.0,<2.0.0)
Requires-Dist: langchain-core (>=1.0.0,<2.0.0)
Requires-Dist: langgraph (>=1.0.0,<2.0.0)
Requires-Dist: langgraph-checkpoint (>=4.0.0,<5.0.0)
Requires-Dist: langgraph-prebuilt (>=1.0.8,<2.0.0)
Requires-Dist: langsmith (>=0.6.3,<0.8.0)
Requires-Dist: pydantic (>=2.7.0,<3.0.0)
Requires-Dist: snowflake (>=0.8.0,<2.0)
Requires-Dist: snowflake-snowpark-python (>=1.20.0,<2.0.0)
Requires-Dist: uv (>=0.9.6,<0.12.0)
Project-URL: Repository, https://github.com/langchain-ai/langchain-snowflake
Project-URL: Release Notes, https://github.com/langchain-ai/langchain-snowflake/releases
Project-URL: Source Code, https://github.com/langchain-ai/langchain-snowflake/tree/main/libs/snowflake
Description-Content-Type: text/markdown

# Langchain Snowflake

Langchain / Langgraph integration for Snowflake Cortex AI. Native support for chat models, tools, and retrieval with production-ready authentication.

## Features

### Core Capabilities
- **Chat Models** - Native Snowflake Cortex LLM support (Claude, Llama, Mistral, GPT-4)
- **Tool Calling** - Standard LangChain tool binding with Snowflake Cortex functions
- **Structured Output** - Pydantic and JSON schema support
- **Streaming** - Real-time response streaming for better UX

### Snowflake Cortex AI Integration
- **Cortex Search** - Semantic search with relevance scoring
- **Cortex Analyst** - Natural language to SQL via semantic models
- **Cortex Agents** - Managed agent orchestration with thread management
- **Cortex Complete** - Text generation and completion

### Production Ready
- **Multiple Authentication** - Password, PAT, Key Pair, SSO
- **Async/Await Support** - High-performance async operations
- **Error Handling** - Comprehensive error recovery
- **LangSmith Integration** - Built-in observability and tracing
- **50+ Tests** - Comprehensive test coverage

## Installation

```bash
pip install langchain-snowflake
```

## LangSmith Tracing

```bash
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_API_KEY=your-langsmith-api-key
export LANGCHAIN_PROJECT=snowflake-cortex
```

## Documentation

- [Getting Started](https://github.com/langchain-ai/langchain-snowflake/blob/main/libs/snowflake/docs/getting_started.ipynb)
- [Snowflake Workflows](https://github.com/langchain-ai/langchain-snowflake/blob/main/libs/snowflake/docs/snowflake_workflows.ipynb)
- [Advanced Patterns](https://github.com/langchain-ai/langchain-snowflake/blob/main/libs/snowflake/docs/advanced_patterns.ipynb)
- [MCP Integration](https://github.com/langchain-ai/langchain-snowflake/blob/main/libs/snowflake/docs/mcp_integration.ipynb)
- [RAG Quickstart](https://quickstarts.snowflake.com/guide/build-evaluate-rag-langchain-snowflake/index.html?index=..%2F..index#0)
- [Multi-Agent Quickstart]() - coming soon

## Contributing

We welcome contributions! See [Development.md](https://github.com/langchain-ai/langchain-snowflake/blob/main/libs/snowflake/DEVELOPMENT.md) for setup and guidelines.

## License

MIT License - see [LICENSE](https://github.com/langchain-ai/langchain-snowflake/blob/main/libs/snowflake/LICENSE) for details

## Support

- Check documentation notebooks in `docs/`
- Report issues on [GitHub Issues](https://github.com/langchain-ai/langchain-snowflake/issues)
