Pydantic AI capability for Asyntai: give your agent a whole website's knowledge, chats and leads
pip install pydantic-ai-asyntai Copy PIP instructions
A Pydantic AI capability 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. AsyntaiCapability hands that knowledge to any Pydantic AI agent, together with the website's chats and leads. Your agent answers questions about a real business without you building or maintaining an index.
Full guide: asyntai.com/documentation/integrations/pydantic-ai
pip install pydantic-ai-asyntai Set the key Create an API key in the Asyntai dashboard under Settings → API. The API is available on the Starter plan and higher.
export ASYNTAI_API_KEY="your-key" Use it from pydantic_ai import Agent from pydantic_ai_asyntai import AsyntaiCapability agent = Agent('anthropic:claude-sonnet-4-5', capabilities=[AsyntaiCapability()]) result = agent.run_sync('Do they ship to Spain, and how long does it take?') print(result.output) The capability adds tools and a short instruction that tells the model to ask the website instead of guessing. Each run starts its own website conversation, and follow-up questions in the run share its context. To continue one conversation across runs, for example one per customer, pass session_id="customer-42". Every conversation also shows in your Asyntai chat logs.
AsyntaiCapability( website_id=42, # which website agent, when the account has several lead_tools=False, # hide visitor contact details and chats knowledge_tools=True, # allow writing to the knowledge base ) Agent specs The capability takes only plain values, so it works in agent specs:
model: anthropic:claude-sonnet-4-5 capabilities: - AsyntaiCapability: {website_id: 42} from pydantic_ai import Agent from pydantic_ai_asyntai import AsyntaiCapability agent = Agent.from_file('agent.yaml', custom_capability_types=[AsyntaiCapability]) Several websites on one agent An agency runs one Asyntai account with one website agent per client. Give each capability its own website_id and a tool prefix:
agent = Agent( 'anthropic:claude-sonnet-4-5', capabilities=[ AsyntaiCapability(website_id=1).prefix_tools('bakery'), AsyntaiCapability(website_id=2).prefix_tools('bikeshop'), ], ) Errors A wrong argument, such as an unknown chat session_id, comes back to the model as ModelRetry, so the model can correct the call. A wrong API key, a plan without API access, or a reached message limit raises AsyntaiError and stops the run with a message you can show to a user.
pip install -e ".[test]" pytest tests/test_live.py runs against a real account when ASYNTAI_LIVE_KEY and ASYNTAI_LIVE_URL are set.
agents asyntai capability chatbot leads pydantic pydantic-ai rag website
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
None of the files in this release were uploaded with provenance metadata.
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.




