Skip to content

rparsa49/simplecoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module Overviews

agent.py

The Agent clsas coordinates between the LLM, external tools, and internal modules. I use iterative refinement where the agent operates in a loop to observe tool outputs and correct course dynamically. There is a clear separation between the LLM and tool execution.

app.py

Here, I used streamlit to use the tool in a web environment. Session states are uses to persist the agent's memory and st.status blocks provide real-time feedback during tool executions so that users are aware of what steps the agent is taking during tasks.

context.py

Instead of just truncating old messages, the context manager uses a sliding window with summarization. This preserves essential context and architectural decisions while keeping the prompt size optimized for the current iteration's performance.

permissions.py

This forces explicit user consent for file system or system-level changes.

planner.py

The LLM is required to split broad requests into a structured, JSON formatted list of subtasks. It creates a logical roadmap by treating the agent as a PM, which helps to reduce hallucinations and missed requirements.

rag.py

Provides the agent with semantic search capabilities by indexing the codebase using AST-based chunking. It identifies logical blocks like functions and classes to ensure the LLM receives complete and relevant code segments.

Usage Guide

Web Interface

  1. Ensure you have streamlit installed (Use the requirements.txt)
  2. Launch the app using the command: python -m streamlit run app.py

CLI

  1. Ensure your API keys and GOOGLE_CLOUD_PROJECT are setup properly
  2. In the directory where pyproject.toml is located, run pip install -e .
  3. Try any of the following:
    • simplecoder "create a hello.py file"
    • simplecoder --use-rag "what does the Agent class do?"
    • simplecoder --use-planning "create a web server with routes for home and about"

About

A ReAct-style AI coding assistant that lives in the terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages