Skip to content

davidmonterocrespo24/DaveAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

275 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– DaveAgent - AI-Powered Coding Assistant

Python Version License AutoGen

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 daveagent from 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

πŸ“¦ Installation

Installation from 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 framework
  • autogen-ext[openai]>=0.4.0 - Model extensions
  • prompt-toolkit>=3.0.0 - Command-line interface
  • rich>=13.0.0 - Formatting and colors
  • pandas>=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

πŸ“– 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...

πŸ—οΈ 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:

  1. Edit main.py:
self.model_client = OpenAIChatCompletionClient(
    model="gpt-4",  # Change here
    api_key="your-api-key",
    # ...
)
  1. 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

🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a branch: git checkout -b feature/new-functionality
  3. Commit your changes: git commit -m 'Add new functionality'
  4. Push to the branch: git push origin feature/new-functionality
  5. 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

πŸ§ͺ 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:

  1. Compiles and installs the agent
  2. Runs inference on 10 test tasks
  3. 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.

πŸ“ License

This project is under the MIT License. See LICENSE for more details.

Contact & Community

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/pufRfBeQ

About

DaveAgent is an intelligent AI-powered coding assistant that works in your current directory. It uses AutoGen . Join the discord: https://discord.gg/qFwvrmQN

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages