Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>FreeAgentNew to Visual Studio Code? Get it now.
FreeAgent

FreeAgent

Unwrangler

|
89 installs
| (0) | Free
AI-powered code assistant using Gemini API
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FreeAgent - AI Code Assistant

FreeAgent is a VS Code extension that leverages Google's Gemini AI to provide intelligent code assistance. It helps developers understand, improve, and maintain their code through natural language interactions.

Installation

You can install FreeAgent from the VS Code Marketplace:

  • Extension Page
  • Publisher Page

Features

Code Analysis

  • Explain Code: Get detailed explanations of selected code
  • Refactor Code: Receive suggestions for code improvements
  • Summarize Code: Get high-level overview of code functionality
  • Find Bugs: Identify potential issues and bugs
  • Document Code: Generate documentation for your code
  • Analyze Performance: Get insights into code performance and optimization opportunities

Smart Chat Interface

  • Interactive chat with context-aware responses
  • Code-aware conversations that understand your workspace
  • Support for multiple Gemini models
  • Real-time code suggestions and explanations
  • Syntax-highlighted code blocks
  • Chat history management

Requirements

  • Visual Studio Code version 1.80.0 or higher
  • A Google Gemini API key (get one from Google AI Studio)

Setup

  1. Install the extension from the VS Code Marketplace
  2. Set your Gemini API key:
    • Open Command Palette (Cmd/Ctrl+Shift+P)
    • Type "FreeAgent: Set API Key"
    • Enter your API key when prompted

Usage

  1. Select code in your editor
  2. Right-click and choose one of the FreeAgent commands:
    • "FreeAgent > Explain Code"
    • "FreeAgent > Refactor Code"
    • "FreeAgent > Summarize Code"
    • "FreeAgent > Find Bugs"
    • "FreeAgent > Document Code"
    • "FreeAgent > Analyze Performance"

Alternatively, use the Command Palette (Cmd/Ctrl+Shift+P) and type "FreeAgent:" to see all available commands.

Chat Interface Features

  • Model Selection: Choose between different Gemini models
  • Clear Chat: Reset your conversation at any time
  • Code Context: Automatically includes relevant file and line information
  • Error Handling: Clear feedback for API issues or rate limits
  • Markdown Support: Rich text formatting including code blocks
  • Git Integration: Shows your Git username in chat

Extension Settings

This extension contributes the following settings:

  • freeagent.apiKey: Your Gemini API key
  • freeagent.model: The Gemini model to use (default: 'gemini-1.5-pro')
  • freeagent.apiBaseUrl: The API base URL (default: 'https://generativelanguage.googleapis.com/v1beta')
  • freeagent.enableDebugLogs: Enable debug logging for troubleshooting (default: false)

Enabling Debug Logs

To enable debug logging for troubleshooting:

  1. Open VS Code Settings (Cmd/Ctrl+,)
  2. Search for "FreeAgent"
  3. Check the "Enable Debug Logs" option
    • Or add "freeagent.enableDebugLogs": true to your settings.json
  4. Open the Output panel (View > Output)
  5. Select "FreeAgent" from the dropdown menu

Debug logs will show:

  • Service initialization details
  • Configuration loading
  • API requests and responses
  • Chat message handling
  • Error details and stack traces

This is useful when:

  • Troubleshooting API issues
  • Debugging model responses
  • Understanding chat context flow
  • Investigating performance problems

Error Messages

Common error messages and how to resolve them:

  • API Key Error: Check your API key in settings
  • Network Error: Check your internet connection
  • Rate Limit: Wait a moment and try again
  • Model Error: Try a different model
  • Quota Error: Check your API usage limits

Architecture

For detailed technical information about the extension's architecture, please see ARCHITECTURE.md.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Google Gemini AI for providing the underlying AI capabilities
  • VS Code Extension API for enabling rich integration
  • All contributors who have helped improve this extension
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft