Skip to main content

Integrating TaskGuru with LangChain

The TaskGuru API is explicitly designed as a state-management and memory layer for autonomous AI agents. If you are building with LangChain (Python or TypeScript) or LangGraph, TaskGuru can serve as the visual dashboard for your agents, allowing human oversight of complex, multi-step workflows.

Why use TaskGuru with LangChain?

Most LangChain agents struggle with state persistence across long-running tasks. By hooking your agent into TaskGuru:
  1. Visual State Management: Humans can see exactly what the agent is working on via the TaskGuru Kanban boards.
  2. Human-in-the-Loop Workflow: Your agent can pause execution, assign a TaskGuru ticket to a human for approval, and resume when the ticket status changes to COMPLETED.
  3. Conversational Memory per Task: Using our messages endpoint, the agent can store its scratchpad reasoning directly on the Task thread.

πŸš€ Quick Start: OpenAPI Agent (Python)

The easiest way to connect LangChain to TaskGuru is by using our hosted OpenAPI specification. LangChain can read this spec and automatically figure out how to call our endpoints.

Prerequisites

First, install the required packages:

1. Initialize the TaskGuru Agent

In this example, we’ll give LangChain the ability to read your TaskGuru boards and create tasks automatically.

🧠 Advanced: LangGraph Human-in-the-Loop

If you are building complex state machines with LangGraph, you can use TaskGuru to implement a literal β€œHuman-in-the-Loop” fallback. When the agent attempts a dangerous action (like executing raw SQL or sending an email), it can create a Task in TaskGuru assigned to a human, and sleep.

Polling for Task Completion (JavaScript/TypeScript Example)

Next Steps

To understand exactly which fields LangChain is accessing, review the OpenAPI Reference.