--- id: langchain-together version: "0.4.0" license: MIT license_treatment: permissive maintenance: active --- # langchain-together — An integration package connecting Together AI and LangChain License: permissive · Maintenance: active · Downloads: 96.0K/mo ## What it is and what it does langchain-together is a LangChain integration package that exposes Together AI's language models and embeddings through LangChain's standard interfaces. It provides ChatTogether for chat-based interactions and TogetherEmbeddings for vector representations, supporting models like Qwen/Qwen2.5-7B-Instruct-Turbo and multilingual-e5-large-instruct. The package enables structured outputs via Pydantic models, JSON schemas, and function calling—allowing you to extract reliable, typed responses from Together AI models within LangChain workflows. It handles authentication via environment variable or constructor parameter and supports configuration options like temperature, max_tokens, timeout, and retry behavior. Use it for: - Build LangChain agents and chains that call Together AI models instead of OpenAI or other providers. - Extract structured data (e.g., parsed JSON, function calls) from Together AI models using Pydantic schemas. - Generate embeddings for semantic search or similarity tasks using Together's multilingual embedding models. - Prototype or deploy cost-effective LLM applications by swapping Together AI as the backend provider. - Combine Together AI models with LangChain's tools, memory, and retrieval systems in a single application. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Connects LangChain applications to Together AI's language models and embeddings via a unified integration layer. Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and integrates seamlessly with LangChain's ecosystem. It is worth installing if you need Together AI as your LLM provider and want to work within LangChain's abstractions. No known security vulnerabilities as of 2026-08-14. ## Install pip install langchain-together uv add langchain-together poetry add langchain-together ## Installing langchain-together Before you install: Low friction installation with a wheel distribution. Actively maintained as of 2026-08-05 with recent releases. Depends on established packages (langchain-core, langchain-openai, requests, aiohttp) that are widely used. License in practice: MIT license permits commercial and private use with minimal restrictions; you must retain the license notice in distributions. Quickstart: pip install langchain-together from langchain_together import ChatTogether import os os.environ["TOGETHER_API_KEY"] = "your-key" llm = ChatTogether(model="Qwen/Qwen2.5-7B-Instruct-Turbo") response = llm.invoke("Hello") Requires a valid Together AI API key set in the TOGETHER_API_KEY environment variable or passed to the constructor. Verify before relying: - Whether all Together AI model variants listed in their docs are supported by this integration version. - Performance characteristics and rate-limit behavior when used with high-volume LangChain chains. - Compatibility guarantees with specific langchain-core versions beyond the stated Python version range. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 96.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags langchain together ai integration, together ai llm provider, langchain chat models, structured output llm, together embeddings langchain, function calling llm, json mode language model, llm-integration, langchain-plugin, structured-output [View on SkillFed](https://skillfed.io/packages/langchain-together) · [View on PyPI](https://pypi.org/project/langchain-together/)