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 joboutsail_research_status— Poll research job status and resultsoutsail_verify— Verify a claim with traceable evidenceoutsail_compare— Compare multiple source sets
Read-only Profile
outsail_context_pack_get— Retrieve a Context Pack by IDoutsail_agent_context_get— Retrieve agent-shaped contextoutsail_extract— Extract clean text from a URLoutsail_map— Create a site map of a websiteoutsail_report— Generate a research report in Markdownoutsail_decision_report— Generate a decision-ready reportoutsail_discover— Discover relevant sources
Monitoring Profile
outsail_monitor_list— List all source monitorsoutsail_monitor_get— Get monitor detailsoutsail_monitor_create— Create a source monitoroutsail_monitor_run— Trigger a monitor checkoutsail_monitor_pause— Pause a monitoroutsail_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 questionresearch_urls(list[str], optional) — Specific URLs to includeresearch_discover(bool, optional) — Auto-discover sources (default: True)research_profile(str, optional) — Research profileresearch_depth(int, optional) — 0 = fast, 1 = deep
Output state patch:
context_pack_id(str | None) — Completed Context Pack IDresearch_status("completed" | "failed" | "timeout")research_error(str | None) — Error message if failedresearch_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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f324a633e002e1da57c6b5473488f4499b84a09888b6c0338691e70bf99ee32
|
|
| MD5 |
cddda3519bcf2e283688d4f2e13414ee
|
|
| BLAKE2b-256 |
bb5db1cbf9ea068344b083cb6773e59dd0dae618bbd0c72b8189b02043345c98
|
File details
Details for the file outsail_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: outsail_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13d191cf3eae7b05e4d8ace7c49ab5be0be70875959c795d19648fd20f05447c
|
|
| MD5 |
aed831c3d881170e912fef664138f949
|
|
| BLAKE2b-256 |
836c9fb35e13bc2557b09b4afefe93417dd5f23b122a3e44673a67f9c3232e55
|