Skip to main content

AI-powered coding assistant with intelligent agent orchestration

Project description

๐Ÿค– 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

daveagent_cli-1.0.10.tar.gz (389.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

daveagent_cli-1.0.10-py3-none-any.whl (163.5 kB view details)

Uploaded Python 3

File details

Details for the file daveagent_cli-1.0.10.tar.gz.

File metadata

  • Download URL: daveagent_cli-1.0.10.tar.gz
  • Upload date:
  • Size: 389.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for daveagent_cli-1.0.10.tar.gz
Algorithm Hash digest
SHA256 5d85bacf587bf709f2026551245bc6f72b148d6fd59fa1c6fe306888d8b2efb3
MD5 b9d623feb02780c924739b5658f2d24b
BLAKE2b-256 6c7e52646f7a2ca423c8b34921f39705d2fa29339cf31380dbf5ee71ca1975a6

See more details on using hashes here.

File details

Details for the file daveagent_cli-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: daveagent_cli-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 163.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for daveagent_cli-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b3743a0953c794a9e506eee04d4817f7e56f23a5a559629174380496ae87fcab
MD5 ab59df4f770b04659f35eba7dff69e1c
BLAKE2b-256 afe63d90265402b8307cddf1e81740fa0fe5b33475995e1f96c24e7a816b2452

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page