11---
2-
32display\_name : Sourcegraph AMP
4- icon : ../../../../.icons/sourcegraph-amp .svg
3+ icon : ../../../../.icons/sourcegraph_amp .svg
54description : Run Sourcegraph AMP CLI in your workspace with AgentAPI integration
65verified : true
76tags : \[agent, sourcegraph, amp, ai, tasks]
@@ -13,19 +12,19 @@ Run [Sourcegraph AMP CLI](https://sourcegraph.com/amp) in your workspace to acce
1312
1413``` tf
1514module "sourcegraph_amp" {
16- source = "registry.coder.com/harsh9485/sourcegraph-amp /coder"
15+ source = "registry.coder.com/harsh9485/sourcegraph_amp /coder"
1716 version = "1.0.0"
1817 agent_id = coder_agent.example.id
1918 sourcegraph_amp_api_key = var.sourcegraph_amp_api_key
20- install_sourcegraph-amp = true
19+ install_sourcegraph_amp = true
2120 agentapi_version = "latest"
2221}
2322```
2423
2524## Prerequisites
2625
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
2928
3029## Usage Example
3130
@@ -48,7 +47,7 @@ resource "coder_agent" "main" {
4847
4948 Always log task status to Coder.
5049 EOT
51- SOURCEGRAPH_AMP_TASK_PROMPT = data.coder_parameter.ai_prompt.value
50+ SOURCEGRAPH_AMP_TASK_PROMPT = data.coder_parameter.ai_prompt.value
5251 }
5352}
5453
@@ -59,33 +58,33 @@ variable "sourcegraph_amp_api_key" {
5958}
6059
6160module "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
6867}
6968```
7069
7170## How it Works
7271
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
7675
7776## Troubleshooting
7877
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
8281
8382> \[ !IMPORTANT]
8483> For using ** Coder Tasks** with Sourcegraph AMP, make sure to pass the ` AI Prompt ` parameter and set ` sourcegraph_amp_api_key ` .
8584> This ensures task reporting and status updates work seamlessly.
8685
8786## References
8887
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