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

Metadata

Release files for outsail-langchain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for outsail-langchain 0.1.0
File Size Uploaded
outsail_langchain-0.1.0.tar.gz 12.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for outsail-langchain 0.1.0
File Interpreter ABI Platform
outsail_langchain-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.6 kB

Release files / outsail_langchain-0.1.0.tar.gz

Download URL outsail_langchain-0.1.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6f324a633e002e1da57c6b5473488f4499b84a09888b6c0338691e70bf99ee32
BLAKE2b-256 checksum
How to use checksums
bb5db1cbf9ea068344b083cb6773e59dd0dae618bbd0c72b8189b02043345c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / outsail_langchain-0.1.0-py3-none-any.whl

Download URL outsail_langchain-0.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13d191cf3eae7b05e4d8ace7c49ab5be0be70875959c795d19648fd20f05447c
BLAKE2b-256 checksum
How to use checksums
836c9fb35e13bc2557b09b4afefe93417dd5f23b122a3e44673a67f9c3232e55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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