Composio enables your LangGraph agents to connect with many tools!

Goal: Star a repository on GitHub using natural language commands through a LangGraph Agent.

Install Packages & Connect a Tool

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

Goal: Use LangGraph Agent to Interact with Github using Composio

1

Connect GitHub account

  • Connect user Jessica GitHub account to allow your agents to utilize GitHub functionalities.
2

Import Base Packages

  • Prepare your environment by initializing necessary imports from LangGraph & LangChain for setting up your agent.
3

Fetch GitHub LangGraph Tools via Composio

  • Access GitHub tools provided by Composio for LangGraph, initialize a ToolNode with necessary tools obtained from ComposioToolSet.
4

Prepare the model

  • Initialize the LLM class and bind obtained functions to the model.
5

Define the Graph Nodes

  • LangGraph expects you to define different nodes of the agentic workflow as separate functions.
6

Define the Graph Nodes and Edges

  • We begin by initializing the workflow with agent and tools nodes, followed by specifying the connecting edges between nodes, finally compiling the workflow.

  • These edges can be straightforward or conditional, depending on the workflow requirements.

7

Invoke & Check Response

  • After the compilation of workflow, we invoke the LLM with a task, and stream the response.