Skip to content

Comments

Adding a file expert#16

Merged
Jake-Pullen merged 5 commits intomainfrom
feature/file_expert
Nov 9, 2025
Merged

Adding a file expert#16
Jake-Pullen merged 5 commits intomainfrom
feature/file_expert

Conversation

@Jake-Pullen
Copy link
Member

@Jake-Pullen Jake-Pullen commented Nov 1, 2025

📝 Pull Request Description

This PR introduces a new File Expert capability to Merlin, allowing the AI assistant to search, read, write, and manage files directly from the user's system. It also includes improvements to configuration handling, version updates, and enhanced response display logic.

🔧 Key Changes

1. New File Expert Module

  • Added a new FileAgent in src/experts/file.py that supports:
    • Finding files using the find command
    • Loading file contents
    • Writing or overwriting files
  • Integrated into the orchestrator via consult_file_expert() method
  • Uses configurable search directories (FILE_SEARCH_DIRECTORIES) defined in both app and user configs

2. Configuration Enhancements

  • Updated src/config/app_config.py to include default file search directory (~) and merge with user-defined directories
  • Added FILE_SEARCH_DIRECTORIES to src/config/user_config_template.py for easy customization by users
  • Refactored imports in app_config.py to avoid duplicate imports

3. Version Updates

  • Bumped version from 1.2.4 to 1.3.0 in:
    • pyproject.toml
    • uv.lock (updated litellm dependency from 1.79.0 to 1.79.1)
  • Also updated version in src/main.py

4. Orchestrator Integration

  • Integrated the new file expert into the main orchestrator (src/experts/orchestrator.py)
  • Added documentation for how and when to use this expert

5. UI Improvements

  • Updated response display logic in src/main.py:
    • Now shows the routing information as a subtitle in the AI response panel
    • Maintains clean, visually appealing output using Rich's Panel and Markdown

📚 Documentation Update

  • Added a new section to README.md titled "File Expert" that describes:
    • How to find, read, and save files
    • User control over where the LLM can look for files

✅ Usage Example

Users can now ask Merlin questions like:

"Find all .md files in my home directory"
"Read the contents of config.yaml"
"Write a new file called notes.txt with the content 'Hello, world!'"

The AI will route these requests to the new File Expert agent, which handles them using system-level file operations.

@Jake-Pullen Jake-Pullen linked an issue Nov 1, 2025 that may be closed by this pull request
@Jake-Pullen Jake-Pullen merged commit 9ea151d into main Nov 9, 2025
1 check passed
@Jake-Pullen Jake-Pullen deleted the feature/file_expert branch November 9, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a file expert

2 participants