Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Agentic context fetching
# Agentic Context Fetching

<p className="subtitle"> Learn about agentic context fetching, a mini-agent that uses search and tools to retrieve context.</p>
<p className= "subtitle"> Learn about agentic context fetching, a mini-agent that uses search and tools to retrieve context.</p>

Cody's agentic context fetching experience can evaluate context and fetch any additional context (MCP, OpenCtx, terminal, etc.) 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.

Expand Down Expand Up @@ -32,11 +32,11 @@ It has access to a suite of tools for retrieving relevant context. These tools i

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).

<Callout type="info">Terminal access is not supported on the Web. It currently only works with VS Code, JetBrains, and Visual Studio editor extensions.</Callout>
<Callout type= "info">Terminal access is not supported on the Web. It currently only works with VS Code, JetBrains, and Visual Studio editor extensions.</Callout>

## Terminal access

Agentic context fetching can use the CLI Tool to request the execution of shell commands to gather context from your terminal. Its ability to execute terminal commands enhances its context-gathering capabilities. However, its 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:
Agentic context fetching can use the CLI Tool to request the execution of shell commands to 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:

- **Requires user consent**: Agentic context fetching will pause and ask for permission each time before executing any shell command.
- **Trusted workspaces only**: Commands can only be executed within trusted workspaces with a valid shell
Expand All @@ -54,14 +54,8 @@ Agentic context fetching can be helpful to assist you with a wide range of tasks

## Enable agentic context fetching

### Getting agentic context fetching access for Pro users
Agentic context fetching is enabled by default for all Cody users. It uses LLM reflection and basic tool use steps to gather and refine context before sending it in the final model query. The review step in agentic context fetching experience defaults to Gemini 2.5 Flash and falls back to Claude Haiku or GPT 4.1 mini if Flash is unavailable.

Pro users can find the agentic context fetching option in the LLM selector drop-down.
If a user doesn't have any of these models, the agentic context fetching experience will use the model selected from the model dropdown for the final output.

![agentic context fetching interface](https://storage.googleapis.com/sourcegraph-assets/Docs/agenti%20-chat.jpg)

### Getting agentic context fetching access for Enterprise customers

Agentic context fetching uses smaller models from the Gemini, Claude, and GPT families for reflection steps and whichever model you choose from the model selector for the final response. This provide a good balance between quality and latency. If none of the smaller models are available on your instance, we will fall back to the model chosen in the model selector for reflection. We use the latest versions of these models, and can fall back to older versions when necessary. The default models may be changed to optimize for quality and/or latency.

Terminal access is disabled by default. To enable it, set the `agentic-chat-cli-tool-experimental` feature flag [terminal access](#terminal-commands)
Terminal access for Enterprise users is disabled by default. To enable it, set the `agentic-chat-cli-tool-experimental` feature flag [terminal access](#terminal-commands).
11 changes: 6 additions & 5 deletions docs/cody/clients/feature-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
| @-file | ✅ | ✅ | ✅ | ✅ | ❌ |
| @-symbol | ✅ | ❌ | ✅ | ✅ | ❌ |
| LLM Selection | ✅ | ✅ | ✅ | ✅ | ❌ |
| Agentic Context Fetching | ✅ | ✅ | ✅ | ✅ | ✅ |
| **Context Selection** | | | | | |
| Single-repo context | ✅ | ✅ | ✅ | ✅ | ❌ |
| Multi-repo context | ❌ | ❌ | ❌ | ✅ (public code only) | ❌ |
Expand All @@ -26,11 +27,11 @@

## Code Autocomplete and Auto-edit

| **Feature** | **VS Code** | **JetBrains** | **Visual Studio** |
| ------------------------------------------------------ | ----------- | ------------- | ----------------- |
| Single and multi-line autocompletion | ✅ | ✅ | ✅ |
| Cycle through multiple completion suggestions | ✅ | ✅ | ✅ |
| Accept suggestions word-by-word | ✅ | ❌ | ❌ |
| **Feature** | **VS Code** | **JetBrains** | **Visual Studio** |
| ----------------------------------------------------- | ----------- | ------------- | ----------------- |
| Single and multi-line autocompletion | ✅ | ✅ | ✅ |
| Cycle through multiple completion suggestions | ✅ | ✅ | ✅ |
| Accept suggestions word-by-word | ✅ | ❌ | ❌ |
| Auto-edit suggestions via cursor movements and typing | ✅ | ✅ | ❌ |

Few exceptions that apply to Cody Pro and Cody Enterprise users:
Expand Down
2 changes: 1 addition & 1 deletion src/data/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const navigation: NavigationItem[] = [
subsections: [
{ title: "Chat", href: "/cody/capabilities/chat", },
{ title: "Query Types", href: "/cody/capabilities/query-types", },
{ title: "Agentic chat", href: "/cody/capabilities/agentic-chat", },
{ title: "Agentic Context Fetching", href: "/cody/capabilities/agentic-context-fetching", },
{ title: "Autocomplete", href: "/cody/capabilities/autocomplete", },
{ title: "Auto-edit", href: "/cody/capabilities/auto-edit", },
{ title: "Prompts", href: "/cody/capabilities/prompts", },
Expand Down
9 changes: 8 additions & 1 deletion src/data/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6795,7 +6795,14 @@ const redirectsData = [
source: "/analytics/self-hosted",
destination: "/analytics/air-gapped",
permanent: true
}
},

//Agentic chat redirect
{
source: "/cody/capabilities/agentic-chat",
destination: "/cody/capabilities/agentic-context-fetching",
permanent: true
},


];
Expand Down