An intelligent command-line agent that understands natural language and helps you manage files, analyze code, and automate development tasks.
A full-stack AI agent platform with:
β’ Python-based tool-driven agent
β’ FastAPI service layer
β’ Modern Next.js SaaS dashboard
β’ Session-based conversations
β’ Multi-chat support
β’ Glass-style UI
β’ Developer automation tools
- Natural language intent routing
- Tool registry + argument extraction
- Conversation memory
- File system automation
- Code analysis
- Git integration
- Web search & scraping
- ChatGPT-style UI
- Sidebar conversation history
- Dark SaaS theme
- Session persistence
- FastAPI integration
- Health checks
- Multi-conversation support
/agent/chat/agent/reset/agent/health- CORS enabled
- Session management
- Create, delete, rename files and folders
- Open files and folders with default applications
- Preview file contents
- Smart path resolution (Desktop, Downloads, Documents shortcuts)
- Search files by name, extension, or content
- Find recently modified files
- Multi-root search across common directories
- Dead code detection in Python files
- LLM-powered code explanations (via Groq API)
- Intent-based code search
- Function-level analysis
- Create virtual environments
- Install Python packages
- Git status and commit history
- Project-aware operations
- Web search (DuckDuckGo)
- Fetch URL contents
- Integration-ready architecture
# Clone the repository
git clone https://github.com/praharshithavishnubhatla/dev-agent.git
cd dev-agent
# Install dependencies
pip install -r requirements.txt
# (Optional) Set up Groq API for LLM features
export GROQ_API_KEY="your_api_key_here"# Run the agent
python agent.pyπ§ You: create a file called notes.txt on desktop
π€ Agent: β
File created at `/Users/you/Desktop/notes.txt`
π§ You: find dead code in my project
π€ Agent: π§ Dead code report:
{'/path/to/file.py': ['unused_function', 'old_helper']}
π§ You: explain main.py
π€ Agent: π§ LLM Code Summary β main.py
This script implements a command-line interface...
π§ You: search files containing "TODO"
π€ Agent: Found 5 files: [...list of files...]
π§ You: install requests fastapi in myproject
π€ Agent: π¦ Installing packages: requests, fastapi
The agent understands natural language commands and classifies them into intents:
| Command | Intent | What it does |
|---|---|---|
| "create test.py" | create_file |
Creates a new file |
| "open main.py" | open_file |
Opens file with default app |
| "find dead code" | dead_code_detector |
Analyzes project for dead code |
| "explain app.py" | llm_summarize_code |
AI explanation of code |
| "search for TODO" | search_files_by_content |
Searches file contents |
| "git status" | git_status |
Shows git status |
| "create venv in project" | create_virtualenv |
Creates virtual environment |
File Operations:
create_file,create_folderopen_file,open_folderdelete_path,rename_filepreview_file
Code Analysis:
dead_code_detector,dead_code_in_filellm_summarize_codecode_intent_search
Search:
search_files_by_namesearch_files_by_extensionsearch_files_by_contentlist_recent_files
Development:
create_virtualenvinstall_packagesgit_status,git_last_commits
Web:
open_web_search,fetch_url
dev-agent/
βββ agent.py # Main entry point
βββ tools/ # Tool implementations
β βββ fs.py # File system operations
β βββ search.py # File search utilities
β βββ code_analysis.py # Code analysis tools
β βββ git.py # Git operations
β βββ execution.py # Virtual env & packages
β βββ web.py # Web utilities
βββ routing/ # Intent routing & extraction
β βββ intent_classifier.py
β βββ argument_extractor.py
β βββ tool_registry.py
βββ core/ # Core agent logic
β βββ interactive_executor.py
β βββ conversation_state.py
β βββ memory.py
βββ tests/ # Test suite
Run the comprehensive test suite:
python tests/test_agent.pyCurrent test coverage: 100% passing (39/39 tests)
- Get a free API key from Groq
- Set the environment variable:
export GROQ_API_KEY="your_api_key_here"
- The agent will automatically use it for code explanations
Edit SEARCH_ROOTS in core/interactive_executor.py to customize where the agent searches:
SEARCH_ROOTS = [
"~/Downloads",
"~/Documents",
"~/your-projects-folder"
]Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
# Clone and install in development mode
git clone https://github.com/praharshithavishnubhatla/dev-agent.git
cd dev-agent
pip install -e .
# Run tests
python tests/test_agent.py- Create tool function in appropriate file under
tools/ - Register in
routing/tool_registry.py - Add schema in
routing/tool_schema.py - Add questions in
routing/tool_questions.py - Update intent classifier if needed
- Add tests
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python
- LLM integration via Groq
- Inspired by modern AI assistants and agentic workflows
Have questions or suggestions? Open an issue or reach out!
Note: This is a personal development tool. Always review commands before execution, especially destructive operations like delete.
- Support for more LLM providers (OpenAI, Anthropic, local models)
- Interactive mode improvements (autocomplete, history)
- More code analysis features (complexity metrics, linting)
- Docker container support
- Web UI interface
- Plugin system for custom tools
- Multi-language support (beyond Python)
- Automated testing suggestions
- Code refactoring recommendations
None currently! If you find a bug, please open an issue.