langchain-together
An integration package connecting Together AI and LangChain
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 on this page — 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
langchain-together on PyPI
pip
pip install langchain-togetheruv
uv add langchain-togetherpoetry
poetry add langchain-togetherInstalling 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 the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — aiohttp, h11, langchain-core, langchain-openai, langsmith, requests, urllib3 |
| Maintenance | actively maintained — 143 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 95,965/month — #13,241 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_together-0.4.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
langchain-ociIntegrates LangChain with Oracle Cloud…
unclear · top 15,000 on PyPI
langchain-sambanovaConnects LangChain applications to SambaNova's…
permissive · top 15,000 on PyPI
langchain-basetenIntegrates Baseten's chat models and embeddings…
permissive · top 15,000 on PyPI
pyjokesProvides one-liner programmer jokes accessible…
permissive · top 15,000 on PyPI
langchain-openaiProvides LangChain integrations for OpenAI's…
permissive · top 1,000 on PyPI
langchain-groqConnects Groq's inference API to LangChain,…
permissive · top 5,000 on PyPI
langchain-cohereConnects LangChain applications to Cohere's…
permissive · top 5,000 on PyPI
langchain-cliCommand-line interface for building, testing,…
permissive · top 15,000 on PyPI
langchain-communityProvides third-party integrations for LangChain…
permissive · top 1,000 on PyPI
langchainplus-sdkClient library for connecting to LangSmith, a…
permissive · top 15,000 on PyPI