Skip to main content

The Knit LangGraph SDK enables seamless integration between LangGraph-powered agents and SaaS applications. This toolkit allows developers to easily connect AI agents with hundreds of SaaS platforms using Knit's integration platform. With minimal code, expand your AI assistant's capabilities by incorporating external data and functionalities from popular business applications.

Project description

Knit LangGraph SDK

Welcome to the Knit's LangGraph SDK, a powerful toolkit designed to integrate AI-powered agents built using LangGraph with a wide range of SaaS applications.

As an embedded integration platform, Knit provides a white-labeled solution empowering SaaS companies to effortlessly scale integrations within their own products, enriching customer experiences with dynamic, out-of-the-box functionality.

The Knit LangGraph SDK is designed to facilitate seamless integration between LLM agents and SaaS applications by leveraging Knit's platform and its wide range of connectors.

Installation

Kickstart your journey with the Knit LangGraph SDK by installing it via pip:

pip install knit-langgraph

Quick Start

First, get your Knit API Key by signing up at https://dashboard.getknit.dev/signup

Now, we're ready to start using the SDK. Here's a simple guide to help you start integrating with the Knit LangGraph SDK:

import logging
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from knit_langgraph import KnitLangGraph, ToolFilter

# Initialize the Knit SDK with your API key
knit = KnitLangGraph(api_key="YOUR_KNIT_API_KEY")

# Initialize your LLM
model = ChatOpenAI(
    api_key="YOUR_OPENAI_API_KEY",
    model="gpt-4o",  # or another model of your choice
    temperature=0,
)

# Discover available tools from a specific app.
# You can then select which tools to pass to the LLM model from these
tools = knit.find_tools(app_id="charliehr")

# Get specific tools you want to pass to the LLM model.
tool_defs = knit.get_tools(tools=[ToolFilter(app_id="charliehr", tool_ids=[tool.tool_id for tool in tools])])

# Create a ReAct agent with the tools
graph = create_react_agent(model, tools=tool_defs)

# Prepare inputs for the agent
inputs = {
    "messages": [
        (
            "user",
            "I want to get the list of offices of the company.",
        )
    ]
}

# Configuration with integration ID
config = {"knit_integration_id": "YOUR_USER's_INTEGRATION_ID"}

# Stream the agent's responses
for response in graph.stream(inputs, {"configurable": config}, stream_mode="values"):
    message = response["messages"][-1]
    if isinstance(message, tuple):
        print(message)
    else:
        message.pretty_print()

That's it! It's that easy to get started and add hundreds of SaaS applications to your AI Agent.

Detailed Information

That was a quick introduction of how to get started with Knit's LangGraph SDK.

To know more about how to use its advanced features and for more in depth information, please refer to the detailed guide here: Knit LangGraph SDK Guide

Support

For support, reach out to kunal@getknit.dev

Project details


Download files

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

Source Distribution

knit_langgraph-0.1.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

knit_langgraph-0.1.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file knit_langgraph-0.1.2.tar.gz.

File metadata

  • Download URL: knit_langgraph-0.1.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.13 Windows/10

File hashes

Hashes for knit_langgraph-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7b558dc574117cc1543a0db9e89826c42f11836a26eb5b0111d04cf4bc970d58
MD5 aefaced86b38736c0196b0bd93c71479
BLAKE2b-256 bff0892ff11404ec93b09156dc17f4f61e6d55066229390502ebfe74cfed9036

See more details on using hashes here.

File details

Details for the file knit_langgraph-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: knit_langgraph-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.13 Windows/10

File hashes

Hashes for knit_langgraph-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3068a623448fafb1d0888064c749a97a0c76d70a99b1b8e6641177bc213f46b
MD5 886d85e2a96ee8f1f0fad31da94fe70b
BLAKE2b-256 70551e0e5626e4761ab2521e3d500ad5acabf67b9a140b1948e9853f323d5f14

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 Pingdom Monitoring Sentry Error logging StatusPage Status page