Skip to content

jduncan-rva/gemini-agent-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Creator Extension for Gemini CLI

An AI-powered extension for Gemini CLI that makes creating custom agents effortless through natural conversation.

🎯 What It Does

This extension provides the /new-agent command that guides you through creating custom agent definitions using AI-assisted conversation. Instead of manually writing TOML files or filling out forms, you simply chat with the AI about what you want to build.

⚡ Quick Start

Installation

  1. Clone this repository into your Gemini extensions directory:

    git clone https://github.com/jduncan-rva/gemini-agent-creator.git ~/.gemini/extensions/agent-creator
  2. Restart Gemini CLI to load the extension

  3. Verify installation:

    /extensions list

    You should see agent-creator in the list.

Usage

Quick Mode (AI Expands Your Idea)

Provide a brief description and let the AI flesh out a complete agent:

/new-agent "reviews code for security vulnerabilities"

The AI will:

  1. Analyze your description
  2. Generate a comprehensive agent definition with smart defaults
  3. Show you the complete TOML configuration
  4. Ask for your approval before saving

Example descriptions:

  • "reviews python code for bugs"
  • "generates API documentation"
  • "writes unit tests for functions"
  • "explains complex code in simple terms"
  • "finds performance bottlenecks"

Interactive Mode (Guided Conversation)

Run without arguments for step-by-step guidance:

/new-agent

The AI will guide you through:

  1. Defining what your agent does
  2. Selecting which tools it needs
  3. Writing its behavior and instructions
  4. Defining input parameters
  5. Reviewing the generated configuration
  6. Saving to ~/.gemini/agents/

📝 Example Session

Quick Mode Example

> /new-agent "analyzes code for performance issues"

Great! I'll create a performance analysis agent for you.

Based on your description, here's what I'm proposing:

**Agent: performance_analyzer**
- Display Name: ⚡ Performance Analyzer
- Icon: ⚡
- Tools: read, grep, glob
- Purpose: Identifies performance bottlenecks and optimization opportunities

Here's the complete configuration:

```toml
name = "performance_analyzer"
displayName = "⚡ Performance Analyzer"
description = "Analyzes code for performance issues and suggests optimizations"
icon = "⚡"

tools = ["read", "grep", "glob"]

systemPrompt = """
You are a performance optimization expert...
[detailed instructions]
"""

query = "Analyze ${file_path} for performance issues"

[inputs.file_path]
type = "string"
description = "Path to file or directory to analyze"
required = true

Does this look good, or would you like to customize anything?

looks perfect!

✅ Saving to ~/.gemini/agents/performance_analyzer.toml... 🎉 Agent created successfully! Restart CLI to use it.


## 🛠️ Available Tools for Agents

Your agent can use these read-only tools:
- `ls` - List directories
- `read` - Read files
- `grep` - Search in files
- `glob` - Find files by pattern
- `read_many_files` - Read multiple files
- `memory` - Persistent memory
- `web_search` - Web search

## 📚 Agent Templates

The assistant knows about common agent patterns:
- **Code Reviewers** - Find bugs, security issues, style problems
- **Documentation Generators** - Create docs from code
- **Test Writers** - Generate test cases
- **Research Assistants** - Gather information
- **Code Explainers** - Explain complex code

## 💡 Tips

- Be specific about what you want the agent to do
- Think about what files/data it needs to access
- Consider what inputs make sense (file paths, questions, etc.)
- The AI will suggest good defaults - feel free to customize

## 🔧 Troubleshooting

**Extension not found?**
- Restart Gemini CLI to load the extension
- Check that the extension is in `~/.gemini/extensions/agent-creator/`
- Verify `gemini-extension.json` exists in the extension directory

**Agent not working after creation?**
- Restart CLI to load the new agent
- Check the TOML file for syntax errors: `~/.gemini/agents/<name>.toml`
- Use `/agents` to verify it loaded

**Want to edit an agent?**
- Edit the file directly: `~/.gemini/agents/<name>.toml`
- Or delete and recreate with `/new-agent`

## 📋 Requirements

- [Gemini CLI](https://github.com/google-gemini/gemini-cli) with user-defined agents support
- The agent system must be available (check for `~/.gemini/agents/` directory)

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details

## 🙏 Credits

Created by [@jduncan-rva](https://github.com/jduncan-rva) with [Claude Code](https://claude.com/claude-code)

Built for [Gemini CLI](https://github.com/google-gemini/gemini-cli) by the Google Gemini team

## 🔗 Related

- **Main Fork with Agent System**: [jduncan-rva/gemini-cli](https://github.com/jduncan-rva/gemini-cli/tree/feature/user-defined-agents)
- **Gemini CLI**: [google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli)

---

**Note**: This extension requires the user-defined agents feature. See the [feature branch](https://github.com/jduncan-rva/gemini-cli/tree/feature/user-defined-agents) for installation.

About

AI-powered extension for Gemini CLI that creates custom agents through natural conversation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published