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.1.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.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: knit_langgraph-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3248d07a070cd0246289be31c191f4d4ad3a8699f22f5e2cd6d86b693f45e5ba
MD5 b6fc2c346fb78cb352dbda74614d4820
BLAKE2b-256 5120226c4dddf5a0e7212d3e7cffab9a5eeadc0d8480c16410eefaa3fa45a810

See more details on using hashes here.

File details

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

File metadata

  • Download URL: knit_langgraph-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca9eaa5db6948d0b51b1d55d4532ab93359538136eec97492f941e6c8629d433
MD5 93b13153965e57f738642230b51f4474
BLAKE2b-256 18eb99ea16b39784696115e1e039b989ea39536b93ec099f87fa5c12d4a17588

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