AI-powered coding assistant with intelligent agent orchestration
Project description
๐ค DaveAgent - AI-Powered Coding Assistant
DaveAgent is an intelligent AI-powered coding assistant that works in your current directory. It uses AutoGen 0.4 to orchestrate specialized agents that help you with development tasks.
โจ Features
- ๐ Global CLI Command: Use
daveagentfrom any directory - ๐ Contextual Work: Operates in your current directory automatically
- ๐ง Vector Memory with ChromaDB: Remembers conversations, code, and decisions between sessions
- ๐ CodeSearcher: Specialized agent for searching and analyzing code
- ๐ File Mentions with @: Mention specific files with
@to give them maximum priority in context - ๐ง 45+ Integrated Tools: Filesystem, Git, JSON, CSV, Web, Memory (RAG), and more
- ๐ค Intelligent Agents: Automatic selection of the appropriate agent
- ๐ Complete Logging: Detailed logging system for debugging
- ๐จ Rich Interface: CLI with colors and formatting using Rich
- โก Real-time Visualization: See the agent's thoughts and actions while it works
๐ฏ Use Cases
Software Development
cd my-project
daveagent
# Search code before modifying
You: /search current authentication system
# Mention specific files with @
You: @main.py fix the authentication bug in this file
You: @config.py @.env update the API configuration
# Modify with context
You: create an authentication module with JWT
You: refactor the code in services/ to use async/await
You: find all TODOs in the project
Data Analysis
cd data-project
daveagent
You: read the sales.csv file and show a summary
You: combine all CSVs in the data/ folder into one
You: convert the configuration JSON to CSV
Git Operations
cd my-repo
daveagent
You: commit the changes with a descriptive message
You: show the diff of the last 3 commits
You: create a branch feature/new-functionality
๐ฆ Installation
Installation from PyPI (Coming Soon)
When published on PyPI:
pip install daveagent-ai
daveagent
Installation from Source Code
# 1. Clone or download the project
git clone https://github.com/davidmonterocrespo24/DaveAgent.git
cd DaveAgent
# 2. Install in development mode
pip install -e .
# 3. Use from any directory!
daveagent
Requirements
- Python 3.10 or higher
- pip (Python package manager)
Main Dependencies
autogen-agentchat>=0.4.0- Agent frameworkautogen-ext[openai]>=0.4.0- Model extensionsprompt-toolkit>=3.0.0- Command-line interfacerich>=13.0.0- Formatting and colorspandas>=2.0.0- Data processing
See INSTALACION.md for detailed instructions.
๐ Usage
Basic Command
# From any directory
cd your-project
daveagent
Options
# Debug mode (detailed logs)
daveagent --debug
# View version
daveagent --version
# View help
daveagent --help
Internal Commands
Within DaveAgent, you can use these commands:
| Command | Description |
|---|---|
/help |
Show command help |
/search <query> |
๐ Search and analyze code |
/index |
๐ง Index project in vector memory |
/memory |
๐ Show memory statistics |
@<file> |
๐ Mention specific file with high priority |
/debug |
Enable/disable debug mode |
/logs |
Show logs location |
/stats |
Show statistics |
/clear |
Clear history |
/new |
New conversation |
/exit |
Exit DaveAgent |
๐ /search Command
The /search command invokes the CodeSearcher agent to search and analyze code:
You: /search authentication function
You: /search where is the TaskPlanner class used
You: /search how does the logging system work
CodeSearcher provides you with:
- ๐ Relevant files with exact locations
- ๐ง Functions found with complete code
- ๐ฆ Important variables and constants
- ๐ Dependencies between components
- ๐ก Recommendations on what to modify
See docs/CODESEARCHER_GUIDE.md for more details.
๐ File Mentions with @
Mention specific files in your query using @:
You: @main.py explain how this file works
You: @config.py @.env update the database connection settings
You: @src/agents/code_searcher.py add docstrings to all methods
Features:
- โ Interactive selector with keyboard navigation (โโ)
- โ Real-time search and filtering
- โ Mentioned files have maximum priority in context
- โ Supports multiple files in a single query
- โ Automatically excludes hidden and binary files
See docs/FILE_MENTIONS.md and examples/file_mentions_demo.md for detailed examples.
๐ง Vector Memory System
DaveAgent uses ChromaDB to maintain persistent memory between sessions:
# Index your project once
You: /index
๐ Indexing project in vector memory...
โ
Indexing completed!
โข Indexed files: 45
โข Chunks created: 234
# View memory statistics
You: /memory
๐ง Vector Memory Statistics
๐ Active memory system with 4 collections:
โข Conversations: Conversation history
โข Codebase: Indexed source code
โข Decisions: Architectural decisions
โข Preferences: User preferences
Memory Benefits:
- ๐ฌ Conversations: Remembers previous interactions and maintains context
- ๐ Code Base: Semantic searches in your code without grep
- ๐ฏ Decisions: Maintains consistency in architectural decisions
- โ๏ธ Preferences: Learns your preferred coding style
Agents use memory automatically:
- CodeSearcher: Queries indexed code for faster searches
- Coder: Remembers previous solutions and style preferences
- PlanningAgent: Maintains consistency with past decisions
See docs/MEMORY_SYSTEM.md for complete documentation and examples/memory_usage_example.py for usage examples.
๐ ๏ธ Available Tools
Filesystem (7 tools)
read_file- Read files with line range supportwrite_file- Write/create filesedit_file- Edit files with search & replacelist_dir- List directory contentsdelete_file- Delete files safelyfile_search- Search for files by nameglob_search- Search files using glob patterns
Git (8 tools)
git_status- Repository statusgit_add- Stage filesgit_commit- Create commitsgit_push- Push changes to remotegit_pull- Pull changes from remotegit_log- View commit historygit_branch- Manage branchesgit_diff- View differences
JSON (8 tools)
read_json- Read and parse JSONwrite_json- Write JSON filesmerge_json_files- Combine multiple JSONsvalidate_json- Validate JSON syntaxformat_json- Format/prettify JSONjson_get_value- Extract values by pathjson_set_value- Set values by pathjson_to_text- Convert to readable text
CSV (7 tools)
read_csv- Read CSV fileswrite_csv- Write CSV filescsv_info- Get CSV information/statisticsfilter_csv- Filter rows by conditionsmerge_csv_files- Combine multiple CSVscsv_to_json- Convert CSV to JSONsort_csv- Sort rows by column
Web (7 tools)
wiki_search- Search Wikipedia articleswiki_summary- Get article summarywiki_content- Get full article contentwiki_page_info- Get page metadatawiki_random- Get random articlewiki_set_language- Change Wikipedia languageweb_search- General web search
Analysis (5 tools)
analyze_python_file- Analyze Python code structurefind_function_definition- Find function/class definitionslist_all_functions- List all functions in filegrep_search- Search text with patternsrun_terminal_cmd- Execute shell commands
Memory (RAG) (8 tools)
query_conversation_memory- Search conversation historyquery_codebase_memory- Search indexed codequery_decision_memory- Search architectural decisionsquery_preferences_memory- Search user preferencesquery_user_memory- Search user informationsave_user_info- Store user informationsave_decision- Record architectural decisionsave_preference- Save user preference
๐ Examples
Example 1: Use CodeSearcher before modifying
cd my-project
daveagent
# First, search for context
You: /search existing utilities system
# The agent shows functions, files and current structure
# Now modify with context
You: create a utils.py module with functions for:
- validate email
- format dates
- calculate MD5 hash
DaveAgent first analyzes the existing code and then creates the my-project/utils.py file with the requested functions, avoiding duplicates and maintaining consistency.
Example 2: Analyze a Project
cd existing-project
daveagent
You: analyze the project structure and give me a summary
You: how many functions are there in total?
You: find all files that use the requests library
Example 3: Data Operations
cd data
daveagent
You: read the sales.csv file and show the top 10 sales
You: create a new CSV with only 2024 sales
You: convert the config.json file to CSV
๐ Debugging and Logs
View Logs
# Start with detailed logs
daveagent --debug
# Within DaveAgent
You: /logs
๐ Log file: logs/daveagent_20250131_154022.log
Log Location
Logs are saved in:
logs/
โโโ daveagent_YYYYMMDD_HHMMSS.log
Each file contains detailed logs with format:
2025-01-31 15:40:22 | DaveAgent | INFO | process_user_request:257 | ๐ New request...
See LOGGING_GUIDE.md for more details.
๐๏ธ Architecture
DaveAgent/
โโโ src/
โ โโโ agents/ # Specialized agents
โ โ โโโ task_planner.py # Task planning
โ โ โโโ task_executor.py # Task execution
โ โ โโโ code_searcher.py # ๐ Code search
โ โโโ config/ # Configuration and prompts
โ โโโ interfaces/ # CLI interface
โ โโโ managers/ # Conversation management
โ โโโ tools/ # 45+ tools
โ โ โโโ filesystem/
โ โ โโโ git/
โ โ โโโ data/ # JSON, CSV
โ โ โโโ web/ # Wikipedia, web search
โ โ โโโ analysis/ # Code analysis, grep, terminal
โ โโโ utils/ # Utilities (logger)
โ โโโ cli.py # CLI entry point
โโโ docs/ # Documentation
โ โโโ CODESEARCHER_GUIDE.md # CodeSearcher Guide
โโโ main.py # Main application
๐ง Configuration
API Key
DaveAgent uses DeepSeek by default. To change the model:
- Edit
main.py:
self.model_client = OpenAIChatCompletionClient(
model="gpt-4", # Change here
api_key="your-api-key",
# ...
)
- Or use environment variables in
.daveagent/.env:
DAVEAGENT_API_KEY=your-api-key
DAVEAGENT_MODEL=gpt-4
DAVEAGENT_BASE_URL=https://api.openai.com/v1
SSL Issues (Corporate Networks)
If you experience SSL certificate errors:
- Method 1: Environment variable in
.daveagent/.env:
DAVEAGENT_SSL_VERIFY=false
- Method 2: Command line argument:
daveagent --no-ssl-verify
# or
daveagent --ssl-verify=false
- Method 3: System environment variable:
export DAVEAGENT_SSL_VERIFY=false # Linux/macOS
set DAVEAGENT_SSL_VERIFY=false # Windows
๐ค Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a branch:
git checkout -b feature/new-functionality - Commit your changes:
git commit -m 'Add new functionality' - Push to the branch:
git push origin feature/new-functionality - Open a Pull Request
Development
# Install with development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
# Check types
mypy src/
๐ Documentation
User Guides
- Installation Guide - Detailed installation
- CodeSearcher Guide - ๐ Code search and analysis
- File Mentions Guide - ๐ Mention files with @
- File Mentions Demo - Interactive examples
- Logging Guide - Logging system
- Real-time Visualization - See agent thoughts
- Changes Made - Change history
- Implemented Improvements - Technical analysis
For Developers
- Publish to PyPI - Complete guide to publish to PyPI
- PyPI Quick Start - Publish in 10 minutes
- Agent Integration - Agent team architecture
๐งช Evaluation with SWE-bench (Linux)
To evaluate the agent's performance using the SWE-bench Verified standard, we have included an automated script that works in Linux environments (or WSL2).
Prerequisites
- Linux or WSL2 environment
- Docker installed and running (required for evaluation harness)
- Python 3.10+
Execution
The setup_and_run_linux.sh script automates the entire process:
- Compiles and installs the agent
- Runs inference on 10 test tasks
- Runs the official evaluation using Docker
# 1. Grant execution permissions
chmod +x setup_and_run_linux.sh
# 2. Run the script
./setup_and_run_linux.sh
Note: The complete evaluation may take time depending on your connection speed and CPU.
๐ Known Issues
See CAMBIOS_REALIZADOS.md for resolved issues.
If you encounter an issue:
- Check existing issues
- Create a new issue with details
๐ License
This project is under the MIT License. See LICENSE for more details.
๐ Acknowledgments
- AutoGen - Agent framework
- Rich - Terminal formatting
- Prompt Toolkit - Interactive CLI
๐ Contact & Community
- Discord Community: Join our Discord server - Get help, report bugs, suggest improvements, and collaborate with other users
- GitHub: https://github.com/davidmonterocrespo24/DaveAgent
- Issues: https://github.com/davidmonterocrespo24/DaveAgent/issues
- Email: contact@daveagent.ai
Join Our Discord Community
We encourage you to join our Discord server to:
- ๐ฌ Get Help: Ask questions and get support from the community
- ๐ Report Bugs: Help us improve by reporting issues you encounter
- ๐ก Suggest Features: Share your ideas for new features and improvements
- ๐ค Collaborate: Connect with other users and contributors
- ๐ข Stay Updated: Get the latest news and updates about DaveAgent
Click here to join: https://discord.gg/2dRTd4Cv
Made with โค๏ธ using AutoGen 0.4
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file daveagent_cli-1.0.0.tar.gz.
File metadata
- Download URL: daveagent_cli-1.0.0.tar.gz
- Upload date:
- Size: 207.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d29be6bcca9e771470b50687506a2dcd17e1ae05cc322a257f895d7b11cde95c
|
|
| MD5 |
564ce686e239e480f2698cc35757485b
|
|
| BLAKE2b-256 |
0ac87acc3cacf4a2dec39643189d60f2fd0f0bc87e5a54cd28dd9d56fd3cced2
|
File details
Details for the file daveagent_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: daveagent_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 151.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f98e482d81282efbfba25362da5fc6ed8b65c5a2e4ae6a6d0132e0cd703008
|
|
| MD5 |
396dbac654a7311bd41155b185999163
|
|
| BLAKE2b-256 |
d586bbf1dcfbea13d411e1074d163cef4ea65b6a3d0323325d7be4dd1f9b0d2f
|