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.1.tar.gz (3.8 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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_opticparse-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 bf119f05b20d595c61290a4678eb25a900e3fee12b943d3f586ea337cfc03902
MD5 48c744d4d93d263542c1e673a47f23b4
BLAKE2b-256 ea7938d59cd563d2c498b6c903aea80ef5993e456000efae6add03c60ee9dd2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_opticparse-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07bcfee49cbe013092315ee4cae2900561bb4c5dfa820b558caf59d64b38371d
MD5 3c7586bbb42ac21c62a0ac0d28a3c0db
BLAKE2b-256 8c4ca55ab57657ce132221dc0f15dad2e1d70337d3f5df01bb0f08e8c20838ba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

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