Skip to content

langchain-asimov

License Compatibility Package Documentation

LangChain integration with ASIMOV, a polyglot development platform for trustworthy, neurosymbolic AI.

🛠️ Prerequisites

⬇️ Installation

Installation from PyPI

pip install -U langchain-asimov

👉 Examples

Loading DuckDuckGo Results

Use e.g. the SerpApi module to fetch search results from DuckDuckGo, Google, or Bing:

from langchain_asimov import AsimovLoader

search = AsimovLoader(
    module="serpapi",
    url="https://duckduckgo.com/?q=LangChain+roadmap"
)

for result in search.lazy_load():
    print(result)

Tip

On your host, make sure that asimov-serpapi-importer can be found in your PATH and that you've defined the SERPAPI_KEY environment variable:

export SERPAPI_KEY="..."

Loading X (Twitter) Profiles

Use e.g. the Bright Data module to fetch a public X profile:

from langchain_asimov import AsimovLoader

profiles = AsimovLoader(
    module="brightdata",
    url="https://x.com/LangChainAI"
)

for profile in profiles.lazy_load():
    print(profile)

Tip

On your host, make sure that asimov-brightdata-importer can be found in your PATH and that you've defined the BRIGHTDATA_API_KEY environment variable:

export BRIGHTDATA_API_KEY="..."

Loading X (Twitter) Followers

Use e.g. the Apify module to fetch the followers/followees for an X profile:

from langchain_asimov import AsimovLoader

followers = AsimovLoader(
    module="apify",
    url="https://x.com/LangChainAI/followers"
)

for follower in followers.lazy_load():
    print(follower)

Tip

On your host, make sure that asimov-apify-importer can be found in your PATH and that you've defined the APIFY_TOKEN environment variable:

export APIFY_TOKEN="..."

📚 Reference

langchain-asimov.readthedocs.io

👨‍💻 Development

git clone https://github.com/asimov-platform/langchain-asimov.git

Share on X Share on Reddit Share on Hacker News Share on Facebook Share on LinkedIn