langchain-asyntai
LangChain tools for Asyntai, the AI chat agent for websites.
Point Asyntai at a website. It reads the pages, the product feed and the documents, and keeps them current. This package hands that knowledge to any LangChain agent as a set of tools, so your agent answers questions about a real website without you building and maintaining an index.
Install
pip install langchain-asyntai
Set the key
Create an API key in Asyntai under Settings → API. The API is available on the Starter plan and higher.
export ASYNTAI_API_KEY="your-key"
Ask a website a question
from langchain_asyntai import AsyntaiAskTool
ask = AsyntaiAskTool()
print(ask.invoke({"question": "How long does delivery take?"}))
Give an agent every tool
from langchain.agents import create_agent
from langchain_asyntai import AsyntaiToolkit
toolkit = AsyntaiToolkit()
agent = create_agent("openai:gpt-4o-mini", toolkit.get_tools())
agent.invoke({"messages": [
{"role": "user", "content": "What does the shop sell, and who asked about it this week?"}
]})
The tools
| Tool | What the agent can do |
|---|---|
asyntai_ask_website |
Answer a question from the website: products, prices, delivery, opening hours, policies, documentation. |
asyntai_add_text |
Store a text so the website agent uses it in later answers. |
asyntai_add_url |
Read a page into the knowledge base. |
asyntai_list_knowledge |
List what the website agent knows. |
asyntai_get_leads |
Read the visitors who left an email address or a phone number. |
asyntai_get_conversation |
Read the messages of one website chat. |
Several agents on one account
An Asyntai account can run an agent per website. Name the one you want with
website_id, which AsyntaiClient.websites() returns.
from langchain_asyntai import AsyntaiClient, AsyntaiToolkit
client = AsyntaiClient()
for site in client.websites():
print(site["id"], site["domain"])
toolkit = AsyntaiToolkit(website_id=42)
Agencies run this pattern across a client book: one Asyntai account, one agent
per client site, one website_id per agent.
Errors
Every failure raises AsyntaiError with a message you can show to a user.
from langchain_asyntai import AsyntaiError
try:
ask.invoke({"question": "..."})
except AsyntaiError as exc:
print(exc)
Documentation
Full guide: asyntai.com/documentation/integrations/langchain/
Licence
MIT
Metadata
Release files for langchain-asyntai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_asyntai-0.1.0.tar.gz | 9.4 kB | Without provenance | Details for langchain_asyntai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_asyntai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_asyntai-0.1.0-py3-none-any.whl |
Total release size: 18.1 kB
Release files / langchain_asyntai-0.1.0.tar.gz
| Download URL | langchain_asyntai-0.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32e372aab6fa912b2f7cbc6d6c815d607843cc48cb71631488b509d334f667b2
|
|
BLAKE2b-256 checksum How to use checksums |
399c71bd9c1d938dc6de175e37d6eed241860d3643e550f1b9accdc99b21c714
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.0
|
Release files / langchain_asyntai-0.1.0-py3-none-any.whl
| Download URL | langchain_asyntai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c2945a9b252fdb638913e63d8230e17d7c9ede55ac44daf794c4cbc53a419fe
|
|
BLAKE2b-256 checksum How to use checksums |
57031c95012597bc22d1b8a71ca8e4236a1ddcd9051bfdfc7dc0a4835ad8a130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.0
|
Security for langchain-asyntai 0.1.0
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.