- 
                Notifications
    
You must be signed in to change notification settings  - Fork 76
 
(Agentic Chat) Deep Cody docs #841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from 3 commits
      Commits
    
    
            Show all changes
          
          
            37 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      b307a9a
              
                Deep Cody docs
              
              
                MaedahBatool 39b2d87
              
                Merge branch 'main' into deep-cody-docs
              
              
                MaedahBatool 3b9149e
              
                Add new improvements
              
              
                MaedahBatool 6ae75d7
              
                improve headings
              
              
                MaedahBatool 4570eb3
              
                Correct supported versions
              
              
                MaedahBatool 439d799
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 57a5d7f
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool e61d5f7
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 7600122
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 32c910c
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 0f2f897
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 5dc1f4a
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 2c98214
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 7f53eee
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 42a140b
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 60b0d1e
              
                Callout wording
              
              
                MaedahBatool 6b74452
              
                Merge branch 'main' into deep-cody-docs
              
              
                MaedahBatool 9dc8d7a
              
                Add feedback
              
              
                MaedahBatool 0135a5f
              
                Merge branch 'main' into deep-cody-docs
              
              
                MaedahBatool 62d00d8
              
                minor edits
              
              
                MaedahBatool fa44b4f
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 53837ef
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool be876a6
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool e5a97d5
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 17eac9a
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 26a7ba8
              
                Update src/data/navigation.ts
              
              
                MaedahBatool bd8e1c9
              
                Minor fix
              
              
                MaedahBatool 8f045ad
              
                Remove border from the Tabs component (#926)
              
              
                MaedahBatool f2a8164
              
                chore(docs): Add AWS account IDs for AMI publishing (#927)
              
              
                jdpleiness 7c63506
              
                chore(docs): Note dynamic AWS sizing (#928)
              
              
                jdpleiness b0ba550
              
                Correcting webhook logging example (#929)
              
              
                marcleblanc2 2156767
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 7a84cc9
              
                Merge branch 'main' into deep-cody-docs
              
              
                MaedahBatool 4c73c13
              
                Add Grace review
              
              
                MaedahBatool 1ef7761
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 4d2d8f3
              
                Update docs/cody/capabilities/agentic-chat.mdx
              
              
                MaedahBatool 7927cb3
              
                Merge branch 'sg-next-jan1-2025' into deep-cody-docs
              
              
                MaedahBatool File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # Agentic Chat | ||
| 
     | 
||
| <p className="subtitle"> Learn about the Agentic Chat experience, an exclusive chat-based AI agent with enhanced capabilities.</p> | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| <Callout type="info">Agentic Chat is currently in the Experimental stage and is supported only on VS Code, JetBrains editor extensions, and Web.</Callout> | ||
| 
     | 
||
| Cody's Agentic Chat experience is an AI agent that can evaluate context and fetch any additional context by providing enhanced, context-aware chat capabilities. It extends Cody's functionality by proactively understanding your coding environment and gathering relevant information based on your requests before responding. These features help you get noticeably higher-quality responses. | ||
| 
     | 
||
| This Agentic Chat experience aims to reduce the learning curve associated with traditional coding assistants by minimizing users' need to provide context manually. It achieves this through agentic context retrieval, where the AI autonomously gathers and analyzes context before generating a response. | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ## Capabilities of Agentic Chat | ||
| 
     | 
||
| The Agentic Chat experience leverages several key capabilities, including: | ||
| 
     | 
||
| - **Proactive context gathering**: Automatically gathers relevant context from your codebase, project structure, and current task | ||
| - **Agentic context review**: Reviews the gathered context to ensure it is comprehensive and relevant to your query | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| - **Iterative context improvement**: Performs multiple review loops to refine the context and ensure a thorough understanding | ||
| - **Enhanced response accuracy**: Leverages comprehensive context to provide more accurate and relevant responses, reducing the risk of hallucinations | ||
| 
     | 
||
| ## Enable Agentic Chat | ||
| 
     | 
||
| You can enable the Agentic Chat experience from the green **funnel** icon in Cody's chat panel. You can toggle the **Agentic Chat** feature on and off. Enterprise customers are required to opt-in to get access to this Agentic Chat feature. | ||
| 
     | 
||
|  | ||
| 
     | 
||
| ### Getting Agentic Chat access for Enterprise customers | ||
| 
     | 
||
| Enterprise customers can get access by upgrading their client (VS Code or JetBrains) to the latest version of the plugin and enabling the following feature flags on their Sourcegraph Instance: | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| - `deep-cody` to get access to the feature | ||
| - `deep-cody-shell-context` to allow [terminal access](#terminal-commands) | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| - Users will also need to manually enable access to the terminal commands on the client's `settings.json` file i.e., set `"cody.agentic.context.experimentalShell": true` | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ## What can Agentic Chat do? | ||
| 
     | 
||
| Agentic Chat can help you with the following: | ||
| 
     | 
||
| ### Tool Usage | ||
| 
     | 
||
| It has access to a suite of tools for retrieving relevant context. These tools include: | ||
| 
     | 
||
| - **Search Tool**: Searches the codebase using keywords extracted from your query | ||
| - **File Tool**: Retrieves the content of specific files in your codebase | ||
| - **CLI Tool**: Executes terminal commands to gather system or project-specific information | ||
| - **Memory Tool**: Allows the agent to create personal notes that can be used across chat sessions | ||
| - **Web Browser Tool (via OpenCtx)**: Searches the web for live context | ||
| - **Linear Issue Tool (via OpenCtx)**: Integrates with Linear issue tracking when the provider is configured | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| It integrates seamlessly with external services, such as web content retrieval and issue tracking systems, using OpenCtx providers. To learn more, [read the OpenCtx docs](/cody/capabilities/openctx). | ||
| 
     | 
||
| Memory allows the Agentic Chat to learn and remember your preferences, enabling a more personalized experience. You can ask it to **remember** specific details for future interactions. | ||
| 
     | 
||
| <Callout type="info">Tool calling is not supported on the Web. It only works with VS Code and JetBrains editor extensions.</Callout> | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ## Terminal commands | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| Agentic Chat can use the CLI Tool to execute shell commands and gather context from your terminal. Its ability to execute terminal commands enhances its context-gathering capabilities. However, it’s essential to understand that any information accessible via your terminal could potentially be shared with the LLM. It's recommended not to request information that you don't want to share. Here's what you should consider: | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
                
      
                  MaedahBatool marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| - **Trusted workspaces only**: Commands can only be executed within trusted workspaces with a valid shell | ||
| - **Potential data sharing**: Any terminal-accessible information may be shared with the LLM | ||
| - **Allow list configuration**: This feature is disabled if the allow list is empty. By default, the allow list is set to ['*'], which allows all commands. For enhanced security, use specific command prefixes instead of the wildcard *. | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| Commands are generated by the agent/LLM based on your request. Avoid asking it to execute destructive commands if you do not want them to run. | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ## Configure shell command execution | ||
| 
     | 
||
| You can configure shell command execution via the `cody.agentic.context` setting in your editor: | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ### Enable Agentic Chat access to CLI | ||
| 
     | 
||
| Update the `cody.agentic.context` setting to `allow` or `block` specific commands: | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ```json | ||
| { | ||
| "cody.agentic.context": { | ||
| "shell": { | ||
| // Array of allowed command prefixes, or ["*"] for all commands | ||
| "allow": ["git", "gh", "ls"], | ||
| "block": ["git"] // Additional commands to block | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| 
     | 
||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| ### Disable Agentic Chat access to CLI | ||
| 
     | 
||
| To disable the feature, navigate to your user settings and set `cody.agentic.context` to an empty value. When disabled, the chat agent cannot access the CLI. | ||
| 
     | 
||
| ## Use cases | ||
| 
     | 
||
| Agentic Chat can be helpful to assist you with a wide range of tasks, including: | ||
| 
     | 
||
| - **Improved response quality**: Helps you get better and more accurate responses than other LLMs, making the additional processing time for context gathering a non-issue | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| - **Error resolution**: It can automatically identify error sources and suggest fixes by analyzing error logs | ||
| - **Better unit tests**: Automatically includes imports and other missing contexts to generate better unit tests | ||
| 
     | 
||
| ## Known limitations | ||
| 
     | 
||
| ### Enterprise deployments | ||
| 
     | 
||
| Cody Gateway customers are required to have Claude 3.5 Haiku enabled (this requires Sourcegraph v5.9 and new [model configuration](/cody/enterprise/model-configuration)). BYOK customers will use the selected models, but the quality may vary. | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| ### Security concerns | ||
| 
     | 
||
| As mentioned above, Agentic Chat's ability to execute terminal commands enhances its context-gathering capabilities. However, it’s essential to understand that any information accessible via your terminal could be shared with the LLM. | ||
                
      
                  MaedahBatool marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.