Назад на контролну таблу

Документација

Научите како да користите Asyntai

Почетак рада
Инсталација База знања Како вештачка интелигенција приступа вашем садржају Повежите свој сајт Тестирајте своју вештачку интелигенцију Управљајте веб-сајтовима Савети за AI инструкције Прелазак са другог четбота Упоредите планове
Функције
Ask AI трака AI трака за претрагу AI претрага за WordPress AI Search for Joomla AI Search for Webflow AI Search for Ghost AI Search for Moodle AI Search for TYPO3 AI Search for Craft CMS AI Search for Grav AI Search for Concrete CMS AI Search for October CMS AI Search for ProcessWire AI Search for Odoo AI Search for Bagisto AI Search for Medusa AI Search for OpenCart AI Search for BigCommerce AI Search for Magento Скенирање веб-сајта Празнине у знању Картице производа Динамичке картице производа Динамичке слике Кориснички контекст Прилагођени алати Параметри линкова Праћење уживо Преузимање од стране човека Ескалација AI обавештења Дневни извештај Проток података у реалном времену Максимални проток података у реалном времену Чланови тима Јединствена пријава Двофакторска аутентификација Укључите слике Препознавање слика Виџет за превођење Локализација Транспарентност вештачке интелигенције Потенцијални клијенти Паметно прикупљање потенцијалних клијената Тикети за подршку Категорије ћаскања Резервације Уграђивања Искључите странице Блокиране IP адресе Политика чувања података Режим без чувања Маскирање PII Класификатор одговора Access Tags Закачање верзије виџета Ревизорски дневник Паметнији модел Омогућите размишљање Предлози одговора Накнадне поруке Говор у текст Преузимање транскрипта Уграђено ћаскање Уграђивање преко iframe-а

LangChain Integration

Give your LangChain agent the knowledge of a whole website

Create Account

Overview

LangChain is a library for building AI agents in Python. The langchain-asyntai package gives those agents a website to draw on.

Point Asyntai at a domain. Asyntai crawls the site, reads the product feed, and keeps both fresh. Your agent then asks that website a question and gets the answer a visitor would get, built from the real pages and the real prices.

The same package opens the other side of the website: the chats visitors had, and the email addresses and phone numbers they left.

Tools

The package adds six tools:

  • asyntai_ask_website — answers a question from the website's pages, products and knowledge base.
  • asyntai_add_url — reads a page and stores its content.
  • asyntai_add_text — stores a title and a text you write.
  • asyntai_list_knowledge — lists what the website agent knows.
  • asyntai_get_leads — returns visitors who left an email address or a phone number, newest first.
  • asyntai_get_conversation — returns the messages of one website chat.

Requirements

  • Python 3.9 or higher
  • An Asyntai account on the Starter plan or higher, because the package uses the Asyntai API

Installation

Follow these steps to add Asyntai to a LangChain agent:

1

Install the Package

Run pip install langchain-asyntai.

2

Get Your API Key

Sign in to Asyntai, open Settings, then API, and copy your API key.

3

Set the Key

Put the key in the ASYNTAI_API_KEY environment variable, or pass it as api_key= to any tool.

4

Add the Tools

Hand the tools to your agent. The toolkit gives you all six at once.

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?"}
]})

Several Agents on One Account

An Asyntai account can run an agent per website. Name the one you want with website_id.

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.

Tip: The answer quality follows the knowledge base. Add the pages that matter with asyntai_add_url, and check the result with asyntai_list_knowledge.

Errors

Every failure raises AsyntaiError with a message you can show to a user. A wrong key, a plan that is too low, and a reached message limit each have their own message.

from langchain_asyntai import AsyntaiError

try:
    ask.invoke({"question": "..."})
except AsyntaiError as exc:
    print(exc)

Plans & Pricing

The package is free. It uses the Asyntai API, which needs the Starter plan or higher. View pricing.

Need Help?

If you have any questions or run into issues, contact us at [email protected].