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
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 knit_langgraph-0.1.3.tar.gz.
File metadata
- Download URL: knit_langgraph-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
885a74197c0fdaedbf63d32d0a6ace3fb87ccae24402a3b2b7639e31d8219b52
|
|
| MD5 |
0b97831bb58f09183363b8a2e947ad1c
|
|
| BLAKE2b-256 |
7e2765d04ff18993c93d61b56fa39a89c7a8d60f8bb2881bdfd8951de574e13f
|
File details
Details for the file knit_langgraph-0.1.3-py3-none-any.whl.
File metadata
- Download URL: knit_langgraph-0.1.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20c69ba37bc11291d45c30bb032bada6426103e342231fd4b74a3beecc5908da
|
|
| MD5 |
7673bf8f23fddc1ee147d8f637aa08e5
|
|
| BLAKE2b-256 |
eda3199f6a8d9955d1eac5f2b18712052d4107388fee6f6c3722a48748020a9f
|