Skip to main content

Outsail LangChain / LangGraph Integration (Python)

Thin adapter package that exposes Outsail's curated Capability Registry tools for LangChain and LangGraph Python applications.

Installation

pip install outsail outsail-langchain

Usage

LangChain Tools

from outsail import OutsailClient
from outsail_langchain import OutsailToolkit
from langgraph.prebuilt import ToolNode

async with OutsailClient(
    api_key="osk_live_...",
) as client:
    toolkit = OutsailToolkit(client)
    tools = toolkit.get_tools(profiles=["research", "read_only"])

    # Use with LangGraph ToolNode
    tool_node = ToolNode(tools)

LangGraph Research Node

from outsail import OutsailClient
from outsail_langchain import create_outsail_research_node
from langgraph.graph import StateGraph

async with OutsailClient(
    api_key="osk_live_...",
) as client:
    builder = StateGraph(MyState)
    builder.add_node("research", create_outsail_research_node(client))
    builder.set_entry_point("research")

Available Tools

All 17 curated agent-safe capabilities are exposed as LangChain tools, organised into three profiles:

Research Profile

  • outsail_research_start — Start an asynchronous research job
  • outsail_research_status — Poll research job status and results
  • outsail_verify — Verify a claim with traceable evidence
  • outsail_compare — Compare multiple source sets

Read-only Profile

  • outsail_context_pack_get — Retrieve a Context Pack by ID
  • outsail_agent_context_get — Retrieve agent-shaped context
  • outsail_extract — Extract clean text from a URL
  • outsail_map — Create a site map of a website
  • outsail_report — Generate a research report in Markdown
  • outsail_decision_report — Generate a decision-ready report
  • outsail_discover — Discover relevant sources

Monitoring Profile

  • outsail_monitor_list — List all source monitors
  • outsail_monitor_get — Get monitor details
  • outsail_monitor_create — Create a source monitor
  • outsail_monitor_run — Trigger a monitor check
  • outsail_monitor_pause — Pause a monitor
  • outsail_monitor_resume — Resume a monitor

API Reference

OutsailToolkit

class OutsailToolkit:
    def __init__(self, client: OutsailClient): ...

    def get_tools(
        self,
        *,
        profiles: Sequence[Literal["research", "read_only", "monitoring"]] | None = None,
    ) -> list[StructuredTool]: ...

create_outsail_tools

def create_outsail_tools(
    client: OutsailClient,
    *,
    profiles: Sequence[ToolProfile] | None = None,
) -> list[StructuredTool]: ...

create_outsail_research_node

def create_outsail_research_node(
    client: OutsailClient,
    *,
    poll_interval_ms: int = 2000,
    timeout_ms: int = 300_000,
    emit_progress: bool = True,
) -> Callable[[dict[str, Any]], dict[str, Any]]: ...

State Contract (Research Node)

Input state keys:

  • research_objective (str, required) — Research objective or question
  • research_urls (list[str], optional) — Specific URLs to include
  • research_discover (bool, optional) — Auto-discover sources (default: True)
  • research_profile (str, optional) — Research profile
  • research_depth (int, optional) — 0 = fast, 1 = deep

Output state patch:

  • context_pack_id (str | None) — Completed Context Pack ID
  • research_status ("completed" | "failed" | "timeout")
  • research_error (str | None) — Error message if failed
  • research_job_id (str | None) — The job ID

Development

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with coverage
pytest --cov=outsail_langchain

License

MIT

Download files

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

Source Distribution

outsail_langchain-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

outsail_langchain-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file outsail_langchain-0.1.0.tar.gz.

File metadata

  • Download URL: outsail_langchain-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for outsail_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f324a633e002e1da57c6b5473488f4499b84a09888b6c0338691e70bf99ee32
MD5 cddda3519bcf2e283688d4f2e13414ee
BLAKE2b-256 bb5db1cbf9ea068344b083cb6773e59dd0dae618bbd0c72b8189b02043345c98

See more details on using hashes here.

File details

Details for the file outsail_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for outsail_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13d191cf3eae7b05e4d8ace7c49ab5be0be70875959c795d19648fd20f05447c
MD5 aed831c3d881170e912fef664138f949
BLAKE2b-256 836c9fb35e13bc2557b09b4afefe93417dd5f23b122a3e44673a67f9c3232e55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page