Skip to main content
Configure and use specialized agents for task-specific workflows and improved context management.
Agents are specialized AI assistants that can be configured for specific tasks and workflows. They allow you to create focused tools with custom prompts, models, and tool access.
Use agents to create specialized workflows without making any code changes during analysis and planning phases.
You can switch between agents during a session or invoke them with the @ mention.

Types

There are two types of agents in Gammacode; primary agents and subagents.

Primary agents

Primary agents are the main assistants you interact with directly. You can cycle through them using the Tab key. These agents handle your main conversation and can access all configured tools.
You can use the Tab key to switch between primary agents during a session.
Gammacode comes with built-in primary agents for different workflows like Build and Plan modes.

Subagents

Subagents are specialized assistants that primary agents can invoke for specific tasks. You can also manually invoke them by @ mentioning them in your messages.

Built-in agents

Gammacode comes with several built-in agents optimized for different workflows.

Build

Mode: primary Build is the default primary agent with all tools enabled. This is the standard agent for development work where you need full access to file operations and system commands.

Plan

Mode: primary A restricted agent designed for planning and analysis. By default, all of the following are set to ask:
  • file edits: All writes, patches, and edits
  • bash: All bash commands
This agent is useful when you want Gammacode to analyze code, suggest changes, or create plans without making any actual modifications to your codebase.

General

Mode: subagent A general-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. Use when searching for keywords or files and you’re not confident you’ll find the right match in the first few tries.

Usage

  1. For primary agents, use the Tab key to cycle through them during a session.
  2. Subagents can be invoked:
    • Automatically by primary agents for specialized tasks based on their descriptions
    • Manually by @ mentioning a subagent in your message. For example:
      @general help me search for this function
      
  3. Navigation between sessions: When subagents create their own child sessions, you can navigate between the parent session and all child sessions using keyboard shortcuts.

Create agents

You can create new agents using the following command:
gammacode agent create
This interactive command will:
  1. Ask where to save the agent; global or project-specific
  2. Description of what the agent should do
  3. Generate an appropriate system prompt and identifier
  4. Let you select which tools the agent can access
  5. Finally, create a markdown file with the agent configuration

Configure

You can customize the built-in agents or create your own through configuration. Agents can be configured using markdown files.

Markdown configuration

Define agents using markdown files. Place them in:
  • Global: ~/.gammacode/agents/
  • Per-project: .gammacode/agent/
Example agent file:
---
description: >-
  Use this agent when code files have been modified, created, or written and you
  need to perform comprehensive security analysis. This includes scenarios where:
  - Files are created, modified, or updated in any programming language
  - Code changes involve authentication, authorization, data handling, or API endpoints
  - <example>
      Context: User has just written a new authentication function
      user: "I've implemented a login function with password validation"
      assistant: "Let me analyze this code for security vulnerabilities using the security-analyzer agent"
      <commentary>
      Since code was written, use the security-analyzer agent to perform comprehensive security analysis.
      </commentary>
    </example>
mode: all
temperature: 0.1
model: anthropic/claude-3-sonnet-20240229
---

You are an elite cybersecurity code analyst with deep expertise in Static Application Security Testing (SAST).

**Core Responsibilities:**
1. **Static Application Security Testing (SAST)**:
   - Identify SQL injection, XSS, CSRF, and injection vulnerabilities
   - Detect authentication and authorization flaws
   - Find insecure cryptographic implementations

2. **Software Composition Analysis (SCA)**:
   - Identify vulnerable third-party dependencies and libraries
   - Check for outdated packages with known CVEs

3. **Secrets Scanning**:
   - Detect hardcoded passwords, API keys, and tokens
   - Identify database connection strings and credentials

Provide actionable recommendations with specific remediation steps.
The markdown file name becomes the agent name. For example, security-analyzer.md creates a security-analyzer agent.
The entire file content, including the detailed description with examples and the comprehensive system prompt, is automatically generated by Gammacode based on the description you provide during the gammacode agent create process.

Configuration options

Description

Use the description option to provide a detailed description of what the agent does and when to use it. Include specific examples with context, user input, assistant response, and commentary. This is a required configuration option and supports YAML multi-line format with >-.

Mode

Control the agent’s mode. The mode option determines how the agent can be used:
  • primary: Main agents you interact with directly
  • subagent: Specialized agents invoked for specific tasks
  • all: Can be used as both primary and subagent (default)

Temperature

Control the randomness and creativity of responses. Lower values make responses more focused and deterministic, while higher values increase creativity. Temperature values typically range from 0.0 to 1.0:
  • 0.0-0.2: Very focused and deterministic responses, ideal for code analysis
  • 0.3-0.5: Balanced responses, good for general development tasks
  • 0.6-1.0: More creative responses, useful for brainstorming

Model

Override the default model for this agent. Useful for using different models optimized for different tasks.
---
model: anthropic/claude-3-opus-20240229
---

Tools and Permissions

Control which tools are available and their permission levels:
---
mode: subagent
tools:
  write: false
  edit: false
  bash: ask
---
Permission levels:
  • allow: Allow all operations without approval
  • ask: Prompt for approval before running the tool
  • deny: Disable the tool

Use cases

Here are some common use cases for different agents:
  • Build agent: Full development work with all tools enabled
  • Plan agent: Analysis and planning without making changes
  • Review agent: Code review with read-only access
  • Debug agent: Focused on investigation with bash and read tools enabled
  • Security agent: Security analysis and vulnerability detection
  • Docs agent: Documentation writing with file operations but no system commands

Examples

Code reviewer

---
description: >-
  Use this agent when code files have been modified, created, or written and you
  need to perform comprehensive code review. This includes scenarios where:
  - Code quality needs to be assessed
  - Security vulnerabilities need to be identified
  - <example>
      Context: User has just written a new authentication function
      user: "I've implemented a login function with password validation"
      assistant: "Let me review this code for quality and security issues using the code-reviewer agent"
      <commentary>
      Since code was written, use the code-reviewer agent to perform thorough code review.
      </commentary>
    </example>
mode: all
temperature: 0.1
---

You are a senior code reviewer ensuring high standards of code quality and security.

When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately

Review checklist:
- Code is simple and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation implemented
- Good test coverage
- Performance considerations addressed

Provide feedback organized by priority:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider improving)

Include specific examples of how to fix issues.

Documentation agent

---
description: >-
  Use this agent when documentation needs to be written or maintained.
  This includes scenarios where:
  - API documentation needs to be created
  - README files need updates
  - Code comments need improvement
mode: subagent
tools:
  bash: false
---

You are a technical writer. Create clear, comprehensive documentation.

Focus on:
- Clear explanations
- Proper structure  
- Code examples
- User-friendly language

Always ensure documentation is up-to-date with the current codebase.

Security auditor

---
description: >-
  Use this agent when security audits and vulnerability identification are needed.
  This includes scenarios where:
  - Code needs security review
  - Dependencies need vulnerability scanning
  - Configuration security needs assessment
mode: subagent
tools:
  write: false
  edit: false
temperature: 0.1
---

You are a security expert. Focus on identifying potential security issues.

Look for:
- Input validation vulnerabilities
- Authentication and authorization flaws
- Data exposure risks
- Dependency vulnerabilities
- Configuration security issues

Provide detailed security analysis with actionable remediation steps.

Best practices

  • Provide clear descriptions: Since agent behavior is determined by the description, be specific about what the agent should do and when it should be used.
  • Design focused agents: Create agents with single, clear responsibilities rather than trying to make one agent do everything.
  • Use appropriate temperature: Lower temperatures (0.0-0.2) for analytical tasks, higher temperatures (0.6-1.0) for creative tasks.
  • Limit tool access: Only grant tools that are necessary for the agent’s purpose to improve security and focus.
  • Include examples: Use the example format with context, user input, assistant response, and commentary to help Gammacode understand when to use the agent.
  • Version control: Check project agents into version control so your team can benefit from and improve them collaboratively.

Advanced usage

Chaining agents

For complex workflows, you can chain multiple agents:
> First use the @code-analyzer agent to find performance issues, then use the @optimizer agent to fix them

Dynamic agent selection

Gammacode intelligently selects agents based on context. Make your description fields specific and action-oriented for best results.

Agent collaboration

Agents can work together automatically based on their descriptions and the current context, creating powerful collaborative workflows.

Performance considerations

  • Context efficiency: Agents help preserve main context, enabling longer overall sessions
  • Latency: Agents start with a clean slate each time and may add latency as they gather required context
  • Tool access: Limiting tool access can improve both performance and security

Next steps

I