Skip to main content

🚀 LangChain + AI Search API Integration

PyPI version
Python Support
License: MIT

Official LangChain integration for the AI Search API.
Bring semantic search, contextual answers, summarization, and intelligent agents to your LangChain apps in minutes.


✨ Features

  • 🔑 One-Line Install – pip install langchain-aisearchapi
  • 🤖 LLM Interface – Use AI Search API directly as a LangChain LLM
  • 💬 Chat Model – Build conversations with memory & context
  • 🛠️ Agent Tools – Add AI Search, Web Search, Summarization APIs as tools
  • 📚 Prebuilt Chains – Research, Q&A, fact-checking, and summaries out of the box

🔑 Get Started

  1. 🆕 Sign Up
  2. 🔑 Log In
  3. 📊 Dashboard → Copy your API key

⚡ Installation

pip install langchain-aisearchapi

🚀 Quick Examples

LLM Usage

from langchain_aisearchapi import AISearchLLM

llm = AISearchLLM(api_key="your-key")
print(llm("Explain semantic search in simple terms"))

Conversational Chat

from langchain_aisearchapi import AISearchChat
from langchain.schema import HumanMessage

chat = AISearchChat(api_key="your-key")
messages = [
    HumanMessage(content="What is LangChain?"),
    HumanMessage(content="Why do developers use it?")
]
response = chat(messages)
print(response.content)

Tool + Agent

from langchain_aisearchapi import AISearchTool, AISearchLLM
from langchain.agents import initialize_agent, AgentType

tool = AISearchTool(api_key="your-key")
llm = AISearchLLM(api_key="your-key")

agent = initialize_agent(
    tools=[tool],
    llm=llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True
)
print(agent.run("Find the latest SpaceX launch details"))

Research Chain

from langchain_aisearchapi import create_research_chain

research = create_research_chain(api_key="your-key")
print(research.run("Breakthroughs in AI search 2024"))

Summarization

from langchain_aisearchapi import AISearchLLM

llm = AISearchLLM(api_key="your-key")
summary = llm("Summarize this text: AI search connects context and meaning in queries.")
print(summary)

🛠️ Components

Component Description Use Case
AISearchLLM AI Search API as an LLM Completions, text generation
AISearchChat Chat model with context Assistants, multi-turn chats
AISearchTool Search / Web Search API tool Agents, workflows
create_research_chain() Prebuilt chain Research & reporting
Summarization API Text summarization Notes, abstracts

📘 Docs: AI Search API Documentation


❗ Troubleshooting


📚 Resources


🎉 Get Started Now

pip install langchain-aisearchapi

👉 Join now for a free API key and start building!


Made with ❤️ for LangChain developers using the AI Search API.


🔍 SEO Keywords

LangChain AI Search API integration, AI Search API Python package, semantic search LangChain, contextual AI LangChain, AI chatbot LangChain, summarization API LangChain, web search API LangChain, AI Search API key setup, summary API integration

Metadata

Release files for langchain-aisearchapi 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-aisearchapi 1.0.5
File Size Uploaded Provenance Actions
langchain_aisearchapi-1.0.5.tar.gz 13.6 kB Without provenance Details for langchain_aisearchapi-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-aisearchapi 1.0.5
File Interpreter ABI Platform Actions
langchain_aisearchapi-1.0.5-py3-none-any.whl Python 3 none any Details for langchain_aisearchapi-1.0.5-py3-none-any.whl

Total release size: 23.3 kB

Release files / langchain_aisearchapi-1.0.5.tar.gz

Download URL langchain_aisearchapi-1.0.5.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1c3cbe897d93c22f4c1dc713252c54c358efe5012708f729a7fb2bd5f9ab874f
BLAKE2b-256 checksum
How to use checksums
e32f0d99579ef8295b8fc26b1a8f7743a22d68acc71ca277d36681358295ad4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / langchain_aisearchapi-1.0.5-py3-none-any.whl

Download URL langchain_aisearchapi-1.0.5-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3bb744150224c018e41492628ebdf25b89bad1a23ee54c941bf7d3e245075e2e
BLAKE2b-256 checksum
How to use checksums
9bf6a7d0bfb0bd9ea1da05a82615b3329d61e2d51b0fcb657b3ebe5d221d28f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for langchain-aisearchapi 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page