DEV Community

Cover image for Building SOLVE SARTHI: An AI-Powered Assistant with CoAgent
Rishikesh63
Rishikesh63

Posted on

Building SOLVE SARTHI: An AI-Powered Assistant with CoAgent

Discover how SOLVE SARTHI, an intelligent AI-powered assistant, was built using CoAgent. Designed to streamline planning and problem-solving, SOLVE SARTHI helps users create personalized trip plans, study schedules, and even tackle complex coding challenges. This post dives into the development process, challenges faced, and how cutting-edge tools like Copilotkit, Langgraph, and Next.js came together to bring this innovative project to life.

Quick Demo and Local Setup
Here’s a quick demo of how it works and how to set it up locally:


Why Did I Build This?
Chatbots often lack real-world adaptability, struggling with diverse queries and static setups. I built SOLVE SARTHI to overcome these limitations—an AI assistant that dynamically adapts to user needs, whether it’s planning trips, creating study schedules, or solving coding problems. This project aims to deliver intelligence and versatility, making the assistant work for the user, not the other way around.

How It Came Together
I built SOLVE SARTHI using my CoAgents Starter Kit, a foundation for full-stack apps with AI agents. It leverages LangGraph and CopilotKit to simplify development and integration.

Curious? Check out the CoAgents Starter Kit


SOLVE SARTHI Repo:-

Plan-Sarthi

Screenshot 2025-01-15 112443


Project Overview

Plan-Sarthi is a robust and efficient application designed to streamline planning and execution. This repository contains both the backend and frontend components to deliver a seamless user experience Plan-Sarthi functions like a chatbot. When you provide a query, it processes the input and gives an answer based on that query.


Features

  • Make plans for trips or other activities according to your budget.
  • Create study plans tailored to your exams.
  • Solve Data Structures and Algorithms (DSA) problems and other coding challenges.
  • Works like ChatGPT for answering diverse queries.

Tech Stack

  • Next.js
  • Copilotkit
  • Tailwind CSS
  • Groq
  • Langgraph

Agent

Screenshot 2025-01-15 110556


Cloning the Repository

To get started, clone this repository using the following command:

git clone https://github.com/Rishikesh63/Plan-Sarthi.git
Enter fullscreen mode Exit fullscreen mode

Agent Setup

  1. Navigate to the backend directory:
    cd agent
    Enter fullscreen mode Exit fullscreen mode
  2. Install dependencies:
    pip install poetry
    Enter fullscreen mode Exit fullscreen mode
  3. Install dependencies:
    poetry install
    Enter fullscreen mode Exit fullscreen mode
  4. Start the Agent server:
    poetry run demo
    Enter fullscreen mode Exit fullscreen mode
    Ensure that all required environment variables are properly configured.

Frontend Setup

  1. Navigate to the frontend directory
    Enter fullscreen mode Exit fullscreen mode






The backend uses FastAPI for deploying the LangGraph agent, while the frontend is built with Next.js.

My Agent
Descriptions of Workflow Components
Solve Sarthi Nodes:
generate_response: AI response generation step.
review_response: Human review step.
Edges:
Represent directed transitions between nodes (generate_response → review_response).
Conditional Nodes:
should_continue: Conditional logic to determine the next step after human review (END or generate_response based on human_approval).

Image description

name of agent should be same in frontend and backend:-
Image description

Image description
Frontend
The Frontend was simple and efficient. I used CopilotKit’s built-in features to seamlessly integrate a chatbot interface, ensuring a smooth and intuitive user experience with its robust capabilities.

My Experience

Building this app was a fun and rewarding journey. While learning LangGraph and LangChain took some time, integrating CopilotKit was surprisingly smooth.

Before building Solve Sarthi, I started by creating an agent on a notebook and took courses on LangChain and LangGraph to enhance my understanding.

A big thank you to the CopilotKit documentationfor making the process easy to follow!

That’s how I built Solve Sarthi!

What do you think about this project? Would you build something similar? Let me know!

Have a great day! Till next time!

If you loved this, please star CopilotKit and Solve Sarthi :)

Star CopilotKit

Star Solve Sarthi 🤝

Follow me for more content like this!

Top comments (0)