Skip to content

GoshKolotyan/Agentic-System

Repository files navigation

LangGraph Message Processor

A natural language processing system that uses LangGraph for intent-based routing to handle various types of requests.

Visualization of Graph

Visualization of Graph

Features

  • Question Answering: Get responses to your inquiries
  • Code Operations: Generate and edit code across different programming languages
  • Text Operations: Create and modify text content including creative writing

Project Structure

├── Dockerfile
├── LICENSE
├── README.md
├── agent
│   ├── __init__.py
│   ├── config.py
│   ├── helper.py
│   ├── main.py
│   ├── nodes
│   │   ├── __init__.py
│   │   ├── analyzer.py
│   │   ├── code_processor.py
│   │   ├── intent_classifier.py
│   │   ├── question_handler.py
│   │   ├── response_generator.py
│   │   └── text_processor.py
│   └── utils
│       ├── __init__.py
│       ├── file_utils.py
│       ├── llm.py
│       ├── output_manager.py
│       ├── router.py
│       └── state.py
├── configs.yaml
├── docker-compose.yml
├── images
│   └── graph.png
├── requirements.txt
└── run.sh # runner 

Installation

Prerequisites

  • Python 3.10 or higher
  • pip package manager

Option 1: Local Installation

  1. Clone the repository
git clone [email protected]:GoshKolotyan/Agentic-System.git
cd Agentic-System
  1. Create a virtual environment
python -m venv agent-venv
  1. Activate the virtual environment
  • On Windows:
agent-venv\Scripts\activate
  • On macOS/Linux:
source agent-venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt

Option 2: Docker

  1. Build and run using Docker Compose
docker-compose up
  1. For detached mode and interactive access
docker-compose up -d
docker attach synopsis-langgraph-processor-1

Note: Add your OpenAI API key as an environment variable

export OPENAI_API_KEY='your-api-key'

Usage

Running the Application

chmod +x run.sh 
./run.sh

Example Requests

  1. Question Answering
What is DNA?
  1. Code Generation
create a C loop that counts from 1 to 10 and save in loop.c
  1. Code Editing

    # Fix the bugs in this Python script:
    dec greet(name):
        if name == "":
            return "Hello, stranger!"
        elie:
            return "Hello, " + name + "!"
    
    # Test the function
    print(greet("Bob"))
    print(greet(""))
  2. Text Generation

Generate a short novel about Bernhard Riemann
  1. Text Editing
Edit this text for me: The quik brown foxes jumps over the lasy dog and the moon is made of green cheese.

About

Agentic system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages