1
1
---
2
-
3
2
display\_name : Sourcegraph AMP
4
- icon : ../../../../.icons/sourcegraph-amp .svg
3
+ icon : ../../../../.icons/sourcegraph_amp .svg
5
4
description : Run Sourcegraph AMP CLI in your workspace with AgentAPI integration
6
5
verified : true
7
6
tags : \[agent, sourcegraph, amp, ai, tasks]
@@ -13,19 +12,19 @@ Run [Sourcegraph AMP CLI](https://sourcegraph.com/amp) in your workspace to acce
13
12
14
13
``` tf
15
14
module "sourcegraph_amp" {
16
- source = "registry.coder.com/harsh9485/sourcegraph-amp /coder"
15
+ source = "registry.coder.com/harsh9485/sourcegraph_amp /coder"
17
16
version = "1.0.0"
18
17
agent_id = coder_agent.example.id
19
18
sourcegraph_amp_api_key = var.sourcegraph_amp_api_key
20
- install_sourcegraph-amp = true
19
+ install_sourcegraph_amp = true
21
20
agentapi_version = "latest"
22
21
}
23
22
```
24
23
25
24
## Prerequisites
26
25
27
- * Include the [ Coder Login] ( https://registry.coder.com/modules/coder-login/coder ) module in your template
28
- * Node.js and npm are automatically installed (via NVM) if not already available
26
+ - Include the [ Coder Login] ( https://registry.coder.com/modules/coder-login/coder ) module in your template
27
+ - Node.js and npm are automatically installed (via NVM) if not already available
29
28
30
29
## Usage Example
31
30
@@ -48,7 +47,7 @@ resource "coder_agent" "main" {
48
47
49
48
Always log task status to Coder.
50
49
EOT
51
- SOURCEGRAPH_AMP_TASK_PROMPT = data.coder_parameter.ai_prompt.value
50
+ SOURCEGRAPH_AMP_TASK_PROMPT = data.coder_parameter.ai_prompt.value
52
51
}
53
52
}
54
53
@@ -59,33 +58,33 @@ variable "sourcegraph_amp_api_key" {
59
58
}
60
59
61
60
module "sourcegraph_amp" {
62
- count = data.coder_workspace.me.start_count
63
- source = "registry.coder.com/harsh9485/sourcegraph-amp /coder"
64
- version = "1.0.0"
65
- agent_id = coder_agent.example.id
66
- sourcegraph_amp_api_key = var.sourcegraph_amp_api_key # recommended for authenticated usage
67
- install_sourcegraph-amp = true
61
+ count = data.coder_workspace.me.start_count
62
+ source = "registry.coder.com/harsh9485/sourcegraph_amp /coder"
63
+ version = "1.0.0"
64
+ agent_id = coder_agent.example.id
65
+ sourcegraph_amp_api_key = var.sourcegraph_amp_api_key # recommended for authenticated usage
66
+ install_sourcegraph_amp = true
68
67
}
69
68
```
70
69
71
70
## How it Works
72
71
73
- * ** Install** : Installs Sourcegraph AMP CLI using npm (installs Node.js via NVM if required)
74
- * ** Start** : Launches AMP CLI in the specified directory, wrapped with AgentAPI to enable tasks and AI interactions
75
- * ** Environment Variables** : Sets ` SOURCEGRAPH_AMP_API_KEY ` and ` SOURCEGRAPH_AMP_START_DIRECTORY ` for the CLI execution
72
+ - ** Install** : Installs Sourcegraph AMP CLI using npm (installs Node.js via NVM if required)
73
+ - ** Start** : Launches AMP CLI in the specified directory, wrapped with AgentAPI to enable tasks and AI interactions
74
+ - ** Environment Variables** : Sets ` SOURCEGRAPH_AMP_API_KEY ` and ` SOURCEGRAPH_AMP_START_DIRECTORY ` for the CLI execution
76
75
77
76
## Troubleshooting
78
77
79
- * If ` amp ` is not found, ensure ` install_sourcegraph-amp = true` and your API key is valid
80
- * Logs are written under ` /home/coder/.sourcegraph-amp -module/ ` (` install.log ` , ` agentapi-start.log ` ) for debugging
81
- * If AgentAPI fails to start, verify that your container has network access and executable permissions for the scripts
78
+ - If ` amp ` is not found, ensure ` install_sourcegraph_amp = true` and your API key is valid
79
+ - Logs are written under ` /home/coder/.sourcegraph_amp -module/ ` (` install.log ` , ` agentapi-start.log ` ) for debugging
80
+ - If AgentAPI fails to start, verify that your container has network access and executable permissions for the scripts
82
81
83
82
> \[ !IMPORTANT]
84
83
> For using ** Coder Tasks** with Sourcegraph AMP, make sure to pass the ` AI Prompt ` parameter and set ` sourcegraph_amp_api_key ` .
85
84
> This ensures task reporting and status updates work seamlessly.
86
85
87
86
## References
88
87
89
- * [ Sourcegraph AMP Documentation] ( https://sourcegraph.com/amp )
90
- * [ AgentAPI Documentation] ( https://github.com/coder/agentapi )
91
- * [ Coder AI Agents Guide] ( https://coder.com/docs/tutorials/ai-agents )
88
+ - [ Sourcegraph AMP Documentation] ( https://sourcegraph.com/amp )
89
+ - [ AgentAPI Documentation] ( https://github.com/coder/agentapi )
90
+ - [ Coder AI Agents Guide] ( https://coder.com/docs/tutorials/ai-agents )
0 commit comments