Skip to main content

🦜️🔗 langchain-opticparse

Official LangChain and CrewAI ecosystem integration for OpticParse and PhishVision.

Enables AI agents to:

  1. Visually Scrape Live Webpages (OpticParseTool): Extract clean, structured JSON using multimodal vision without fragile CSS selectors.
  2. Scan Zero-Day Cyber Threats (PhishVisionTool): Inspect unknown domains for crypto wallet-drainers and brand impersonation kits before interacting.

📦 Installation

pip install langchain-opticparse

🚀 Usage with LangChain (1.x+)

langchain-opticparse provides standard BaseTool instances compatible with modern LangChain 1.x agent executors, LangGraph, and Tool Calling LLMs:

Modern Tool Calling Agent (LangChain 1.x)

from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_opticparse import OpticParseTool, PhishVisionTool

# 1. Initialize OpticParse and PhishVision tools
tools = [
    OpticParseTool(),
    PhishVisionTool()
]

# 2. Bind tools to any modern Tool-Calling model
llm = ChatOpenAI(model="gpt-4o", temperature=0)
llm_with_tools = llm.bind_tools(tools)

# 3. Direct Tool Invocation Example
scraper = OpticParseTool()
clean_data = scraper.invoke({
    "url": "https://news.ycombinator.com",
    "query": "Extract top stories with points and author"
})
print("Extracted Data:", clean_data)

# 4. Threat Inspection Example
scanner = PhishVisionTool()
security_report = scanner.invoke({
    "url": "https://suspicious-dapp-claim.xyz"
})
print("Threat Report:", security_report)

👥 Usage with CrewAI

from crewai import Agent, Task, Crew
from langchain_opticparse import OpticParseTool

vision_scraper = OpticParseTool()

market_researcher = Agent(
    role='Senior Market Intelligence Analyst',
    goal='Extract and synthesize competitor pricing deltas in real-time',
    backstory='An expert automated web researcher powered by OpticParse Vision AI.',
    tools=[vision_scraper],
    verbose=True
)

📄 License

MIT © OpticParse Enterprise

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_opticparse-1.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_opticparse-1.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file langchain_opticparse-1.0.2.tar.gz.

File metadata

  • Download URL: langchain_opticparse-1.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for langchain_opticparse-1.0.2.tar.gz
Algorithm Hash digest
SHA256 538c6a6ec59c67c981630dce182d85d3194b6707ece1191941c8bf87eff5365f
MD5 0f235c666ee7fa0ccabea2d570ba3444
BLAKE2b-256 ba5a22cbf30665c6723fdd425e1f12c019e9902173a84d2f1f08f8432e3642f5

See more details on using hashes here.

File details

Details for the file langchain_opticparse-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_opticparse-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5476abcaa0708159877aba1c01637d6148fe90057f13004536087df18b74bc67
MD5 805153a1adbbebd5fa94d383e2d64b19
BLAKE2b-256 a3516be39f39fd3c5bef18c7656747f7dea5c5bd21bb6714dc278199a4ba99bf

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

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