diff --git a/.icons/sourcegraph-amp.svg b/.icons/sourcegraph-amp.svg
new file mode 100644
index 00000000..cdcae4f2
--- /dev/null
+++ b/.icons/sourcegraph-amp.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
+<path d="M0 0 C8.08508045 1.31807703 15.91885702 3.19824525 23.8125 5.375 C24.96758057 5.68953125 26.12266113 6.0040625 27.31274414 6.328125 C32.86644867 7.84515808 38.40989162 9.39069629 43.9375 11 C50.5075524 12.90377597 57.1265753 14.60483298 63.75 16.3125 C83.14458842 21.3237438 83.14458842 21.3237438 92.5625 23.8125 C93.68043945 24.10229736 94.79837891 24.39209473 95.95019531 24.69067383 C96.97854492 24.96419678 98.00689453 25.23771973 99.06640625 25.51953125 C99.97334229 25.75776611 100.88027832 25.99600098 101.81469727 26.24145508 C104 27 104 27 106 29 C106.71435547 30.88500977 106.71435547 30.88500977 107.3671875 33.19140625 C107.61082031 34.04468506 107.85445313 34.89796387 108.10546875 35.77709961 C108.35941406 36.69628174 108.61335938 37.61546387 108.875 38.5625 C109.14183594 39.5119751 109.40867187 40.4614502 109.68359375 41.43969727 C111.43812257 47.75801406 113.0141566 54.09937675 114.46704102 60.49267578 C116.43074389 69.04944892 118.82420667 77.48865629 121.16162109 85.94921875 C123.55459523 94.65702445 125.87928808 103.38356236 128.22021484 112.10546875 C128.91835648 114.69694251 129.62322906 117.28642602 130.33203125 119.875 C130.52265137 120.57568604 130.71327148 121.27637207 130.90966797 121.99829102 C131.39447902 123.77944467 131.88262443 125.55968987 132.37109375 127.33984375 C133 130 133 130 133 133 C129.31753784 134.18299041 125.62832972 135.34340605 121.9375 136.5 C120.89916016 136.83386719 119.86082031 137.16773438 118.79101562 137.51171875 C113.34275073 139.20673449 108.71284523 140.45378629 103 140 C102.78085938 139.02804688 102.56171875 138.05609375 102.3359375 137.0546875 C100.02884617 126.96598755 97.41184495 116.98531982 94.65234375 107.01171875 C93.451255 102.66696775 92.28221704 98.31470785 91.12890625 93.95703125 C90.81606689 92.77874756 90.50322754 91.60046387 90.1809082 90.38647461 C89.57071427 88.08476485 88.96366621 85.7822183 88.36010742 83.47875977 C88.08142822 82.43131592 87.80274902 81.38387207 87.515625 80.3046875 C87.27102539 79.37640137 87.02642578 78.44811523 86.77441406 77.49169922 C86.05072777 75.16321805 85.16055761 73.1389565 84 71 C83.51789063 71.5053125 83.03578125 72.010625 82.5390625 72.53125 C81.59160156 73.50578125 81.59160156 73.50578125 80.625 74.5 C79.99851562 75.1496875 79.37203125 75.799375 78.7265625 76.46875 C77 78 77 78 75 78 C74.773125 78.556875 74.54625 79.11375 74.3125 79.6875 C72.62449964 82.66159588 70.53323483 84.72008865 68 87 C67.34 87 66.68 87 66 87 C65.773125 87.556875 65.54625 88.11375 65.3125 88.6875 C63.62449964 91.66159588 61.53323483 93.72008865 59 96 C58.34 96 57.68 96 57 96 C56.773125 96.556875 56.54625 97.11375 56.3125 97.6875 C54.62449964 100.66159588 52.53323483 102.72008865 50 105 C49.34 105 48.68 105 48 105 C47.773125 105.556875 47.54625 106.11375 47.3125 106.6875 C45.62449964 109.66159588 43.53323483 111.72008865 41 114 C40.34 114 39.68 114 39 114 C38.773125 114.5775 38.54625 115.155 38.3125 115.75 C36.66961977 118.5663661 34.60466773 120.08077114 32 122 C30.62437146 120.71034824 29.29233607 119.37310707 28 118 C28 117.34 28 116.68 28 116 C27.34 116 26.68 116 26 116 C26 115.34 26 114.68 26 114 C25.401875 113.731875 24.80375 113.46375 24.1875 113.1875 C22.00152146 112.00082594 20.58667406 110.90400887 19 109 C19 108.34 19 107.68 19 107 C18.34 107 17.68 107 17 107 C17 106.34 17 105.68 17 105 C16.0409375 104.62875 16.0409375 104.62875 15.0625 104.25 C13 103 13 103 11.9375 101.1875 C12 99 12 99 14.3125 96.25 C17 94 17 94 19 94 C19.226875 93.443125 19.45375 92.88625 19.6875 92.3125 C21.37550036 89.33840412 23.46676517 87.27991135 26 85 C26.66 85 27.32 85 28 85 C28.226875 84.443125 28.45375 83.88625 28.6875 83.3125 C30.37550036 80.33840412 32.46676517 78.27991135 35 76 C35.66 76 36.32 76 37 76 C37.226875 75.443125 37.45375 74.88625 37.6875 74.3125 C39.37550036 71.33840412 41.46676517 69.27991135 44 67 C44.66 67 45.32 67 46 67 C46.226875 66.443125 46.45375 65.88625 46.6875 65.3125 C48.37550036 62.33840412 50.46676517 60.27991135 53 58 C53.66 58 54.32 58 55 58 C55.226875 57.443125 55.45375 56.88625 55.6875 56.3125 C57.35896766 53.36753316 59.55276352 51.31843456 62 49 C50.53801979 44.60234229 38.86076954 41.37570282 26.90673828 38.6472168 C19.68143213 36.97527868 12.54172299 35.00815639 5.3984375 33.01806641 C4.50898438 32.7710498 3.61953125 32.5240332 2.703125 32.26953125 C1.91583008 32.04885986 1.12853516 31.82818848 0.31738281 31.60083008 C-2.10778981 30.97205323 -4.53941255 30.46918904 -7 30 C-6.43240789 22.99490754 -4.95346459 16.6589411 -2.9375 9.9375 C-2.65583984 8.97650391 -2.37417969 8.01550781 -2.08398438 7.02539062 C-1.39598716 4.68153571 -0.7012399 2.33992007 0 0 Z " fill="#FF5846" transform="translate(7,60)"/>
+<path d="M0 0 C4.54879212 0.36101525 8.69849339 0.76362091 13 2.3125 C17.18267177 3.81249263 21.42120863 4.838198 25.75 5.8125 C35.18257898 7.95297803 44.4466228 10.62229312 53.72753906 13.33691406 C56.81467512 14.23771569 59.90691839 15.11985483 63 16 C62.29791463 22.33654266 60.65627796 28.30812246 58.9375 34.4375 C58.65583984 35.45521484 58.37417969 36.47292969 58.08398438 37.52148438 C57.39317556 40.01542128 56.69842182 42.50818649 56 45 C51.01835052 44.3482557 46.14327747 43.46060756 41.25 42.3125 C40.53062256 42.14387451 39.81124512 41.97524902 39.07006836 41.80151367 C18.76936311 36.88468155 18.76936311 36.88468155 11 33 C11 32.34 11 31.68 11 31 C10.34 31 9.68 31 9 31 C6.38462707 25.39453696 4.80524639 19.82041771 3.375 13.8125 C3.1584375 12.92369141 2.941875 12.03488281 2.71875 11.11914062 C2.31805555 9.47307795 1.91979863 7.82641837 1.52490234 6.17895508 C1.02801826 4.11630837 0.51766949 2.05751686 0 0 Z " fill="#FF5847" transform="translate(137,95)"/>
+<path d="M0 0 C2.84698293 9.7685209 5.48575594 19.57817675 8 29.4375 C8.66565125 32.04062542 9.33270478 34.64338936 10 37.24609375 C10.32484375 38.51565918 10.6496875 39.78522461 10.984375 41.09326172 C11.68348174 43.80358547 12.40473778 46.50695376 13.140625 49.20751953 C13.32625 49.89104996 13.511875 50.57458038 13.703125 51.27882385 C14.22071973 53.17773509 14.7430316 55.07535873 15.265625 56.97290039 C16 60 16 60 16 63 C-9.12903226 56.93548387 -9.12903226 56.93548387 -15 54 C-15 53.34 -15 52.68 -15 52 C-15.66 52 -16.32 52 -17 52 C-19.2259411 47.07496509 -20.91135222 42.23845723 -22.296875 37.01953125 C-22.49476624 36.28425705 -22.69265747 35.54898285 -22.89654541 34.79142761 C-23.30928156 33.25011671 -23.71922112 31.70805441 -24.12646484 30.1652832 C-24.75180531 27.80568803 -25.39306112 25.4507866 -26.03515625 23.09570312 C-26.4358702 21.59140505 -26.83564317 20.08685593 -27.234375 18.58203125 C-27.42698914 17.88092728 -27.61960327 17.1798233 -27.8180542 16.45747375 C-29.55921846 9.74297158 -29.55921846 9.74297158 -28 7 C-25.74682617 5.90332031 -25.74682617 5.90332031 -22.79296875 5.078125 C-21.73142578 4.77519531 -20.66988281 4.47226563 -19.57617188 4.16015625 C-18.45791016 3.85980469 -17.33964844 3.55945313 -16.1875 3.25 C-15.08083984 2.93417969 -13.97417969 2.61835937 -12.83398438 2.29296875 C-4.62992086 -0 -4.62992086 -0 0 0 Z " fill="#FF5846" transform="translate(89,0)"/>
+<path d="M0 0 C3.46629835 1.48653506 5.69022036 3.45722351 8.328125 6.1328125 C9.12734375 6.93847656 9.9265625 7.74414062 10.75 8.57421875 C11.575 9.41597656 12.4 10.25773437 13.25 11.125 C14.09046875 11.97449219 14.9309375 12.82398438 15.796875 13.69921875 C17.86915683 15.79504923 19.93662393 17.89540713 22 20 C20.63760782 22.84223197 19.44766831 24.96027641 17 27 C16.34 27 15.68 27 15 27 C14.773125 27.556875 14.54625 28.11375 14.3125 28.6875 C12.62449964 31.66159588 10.53323483 33.72008865 8 36 C7.34 36 6.68 36 6 36 C5.773125 36.556875 5.54625 37.11375 5.3125 37.6875 C3.62449964 40.66159588 1.53323483 42.72008865 -1 45 C-1.66 45 -2.32 45 -3 45 C-3.3403125 45.928125 -3.3403125 45.928125 -3.6875 46.875 C-5.44212238 49.71581719 -6.83314782 50.01446509 -10 51 C-13.15625 51.23046875 -13.15625 51.23046875 -16.5 51.1875 C-17.6034375 51.18105469 -18.706875 51.17460938 -19.84375 51.16796875 C-22.67226083 51.01744156 -25.24692555 50.64204162 -28 50 C-28.05447822 47.47886908 -28.09389852 44.9589415 -28.125 42.4375 C-28.14175781 41.73302734 -28.15851563 41.02855469 -28.17578125 40.30273438 C-28.2267489 34.77274474 -27.50802478 30.01604956 -25 25 C-24.34 25 -23.68 25 -23 25 C-22.773125 24.443125 -22.54625 23.88625 -22.3125 23.3125 C-20.62449964 20.33840412 -18.53323483 18.27991135 -16 16 C-15.34 16 -14.68 16 -14 16 C-13.773125 15.443125 -13.54625 14.88625 -13.3125 14.3125 C-11.62449964 11.33840412 -9.53323483 9.27991135 -7 7 C-6.34 7 -5.68 7 -5 7 C-4.731875 6.401875 -4.46375 5.80375 -4.1875 5.1875 C-3.01506533 3.02775192 -1.80630718 1.64209744 0 0 Z " fill="#FF5948" transform="translate(159,19)"/>
+</svg>
diff --git a/registry/harsh9485/modules/sourcegraph_amp/README.md b/registry/harsh9485/modules/sourcegraph_amp/README.md
new file mode 100644
index 00000000..f6a8b397
--- /dev/null
+++ b/registry/harsh9485/modules/sourcegraph_amp/README.md
@@ -0,0 +1,91 @@
+---
+
+display\_name: Sourcegraph AMP
+icon: ../../../../.icons/sourcegraph-amp.svg
+description: Run Sourcegraph AMP CLI in your workspace with AgentAPI integration
+verified: true
+tags: \[agent, sourcegraph, amp, ai, tasks]
+---
+
+# Sourcegraph AMP CLI
+
+Run [Sourcegraph AMP CLI](https://sourcegraph.com/amp) in your workspace to access Sourcegraph's AI-powered code search and analysis tools, with AgentAPI integration for seamless Coder Tasks support.
+
+```tf
+module "sourcegraph_amp" {
+  source                  = "registry.coder.com/harsh9485/sourcegraph-amp/coder"
+  version                 = "1.0.0"
+  agent_id                = coder_agent.example.id
+  sourcegraph_amp_api_key = var.sourcegraph_amp_api_key
+  install_sourcegraph-amp = true
+  agentapi_version        = "latest"
+}
+```
+
+## Prerequisites
+
+* Include the [Coder Login](https://registry.coder.com/modules/coder-login/coder) module in your template
+* Node.js and npm are automatically installed (via NVM) if not already available
+
+## Usage Example
+
+```tf
+data "coder_parameter" "ai_prompt" {
+  name        = "AI Prompt"
+  description = "Write an initial prompt for Aider to work on."
+  type        = "string"
+  default     = ""
+  mutable     = true
+  ephemeral   = true
+}
+
+# Set system prompt for Sourcegraph Amp via environment variables
+resource "coder_agent" "main" {
+  # ...
+  env = {
+    SOURCEGRAPH_AMP_SYSTEM_PROMPT = <<-EOT
+      You are an AMP assistant that helps developers debug and write code efficiently.
+
+      Always log task status to Coder.
+    EOT
+    SOURCEGRAPH_AMP_TASK_PROMPT = data.coder_parameter.ai_prompt.value
+  }
+}
+
+variable "sourcegraph_amp_api_key" {
+  type        = string
+  description = "Sourcegraph AMP API key"
+  sensitive   = true
+}
+
+module "sourcegraph_amp" {
+  count                       = data.coder_workspace.me.start_count
+  source                      = "registry.coder.com/harsh9485/sourcegraph-amp/coder"
+  version                     = "1.0.0"
+  agent_id                    = coder_agent.example.id
+  sourcegraph_amp_api_key     = var.sourcegraph_amp_api_key # recommended for authenticated usage
+  install_sourcegraph-amp     = true
+}
+```
+
+## How it Works
+
+* **Install**: Installs Sourcegraph AMP CLI using npm (installs Node.js via NVM if required)
+* **Start**: Launches AMP CLI in the specified directory, wrapped with AgentAPI to enable tasks and AI interactions
+* **Environment Variables**: Sets `SOURCEGRAPH_AMP_API_KEY` and `SOURCEGRAPH_AMP_START_DIRECTORY` for the CLI execution
+
+## Troubleshooting
+
+* If `amp` is not found, ensure `install_sourcegraph-amp = true` and your API key is valid
+* Logs are written under `/home/coder/.sourcegraph-amp-module/` (`install.log`, `agentapi-start.log`) for debugging
+* If AgentAPI fails to start, verify that your container has network access and executable permissions for the scripts
+
+> \[!IMPORTANT]
+> For using **Coder Tasks** with Sourcegraph AMP, make sure to pass the `AI Prompt` parameter and set `sourcegraph_amp_api_key`.
+> This ensures task reporting and status updates work seamlessly.
+
+## References
+
+* [Sourcegraph AMP Documentation](https://sourcegraph.com/amp)
+* [AgentAPI Documentation](https://github.com/coder/agentapi)
+* [Coder AI Agents Guide](https://coder.com/docs/tutorials/ai-agents)
diff --git a/registry/harsh9485/modules/sourcegraph_amp/main.test.ts b/registry/harsh9485/modules/sourcegraph_amp/main.test.ts
new file mode 100644
index 00000000..542ab521
--- /dev/null
+++ b/registry/harsh9485/modules/sourcegraph_amp/main.test.ts
@@ -0,0 +1,126 @@
+import {
+  test,
+  afterEach,
+  describe,
+  setDefaultTimeout,
+  beforeAll,
+  expect,
+} from "bun:test";
+import { execContainer, readFileContainer, runTerraformInit } from "~test";
+import {
+  loadTestFile,
+  writeExecutable,
+  setup as setupUtil,
+  execModuleScript,
+  expectAgentAPIStarted,
+} from "../../../coder/modules/agentapi/test-util";
+
+let cleanupFunctions: (() => Promise<void>)[] = [];
+const registerCleanup = (cleanup: () => Promise<void>) => {
+  cleanupFunctions.push(cleanup);
+};
+afterEach(async () => {
+  const cleanupFnsCopy = cleanupFunctions.slice().reverse();
+  cleanupFunctions = [];
+  for (const cleanup of cleanupFnsCopy) {
+    try {
+      await cleanup();
+    } catch (error) {
+      console.error("Error during cleanup:", error);
+    }
+  }
+});
+
+interface SetupProps {
+  skipAgentAPIMock?: boolean;
+  skipAmpMock?: boolean;
+  moduleVariables?: Record<string, string>;
+  agentapiMockScript?: string;
+}
+
+const setup = async (props?: SetupProps): Promise<{ id: string }> => {
+  const projectDir = "/home/coder/project";
+  const { id } = await setupUtil({
+    moduleDir: import.meta.dir,
+    moduleVariables: {
+      install_sourcegraph_amp: props?.skipAmpMock ? "true" : "false",
+      install_agentapi: props?.skipAgentAPIMock ? "true" : "false",
+      sourcegraph_amp_model: "test-model",
+      ...props?.moduleVariables,
+    },
+    registerCleanup,
+    projectDir,
+    skipAgentAPIMock: props?.skipAgentAPIMock,
+    agentapiMockScript: props?.agentapiMockScript,
+  });
+
+  // Place the AMP mock CLI binary inside the container
+  if (!props?.skipAmpMock) {
+    await writeExecutable({
+      containerId: id,
+      filePath: "/usr/bin/amp",
+      content: await loadTestFile(`${import.meta.dir}`, "amp-mock.sh"),
+    });
+  }
+
+  return { id };
+};
+
+setDefaultTimeout(60 * 1000);
+
+describe("Sourcegraph AMP Module", async () => {
+  beforeAll(async () => {
+    await runTerraformInit(import.meta.dir);
+  });
+
+  test("happy-path", async () => {
+    const { id } = await setup();
+    await execModuleScript(id);
+    await expectAgentAPIStarted(id);
+  });
+  
+  test("sourcegraph-amp-api-key", async () => {
+    const apiKey = "test-api-key-123";
+    const { id } = await setup({
+      moduleVariables: {
+        sourcegraph_amp_api_key: apiKey,
+      },
+    });
+    await execModuleScript(id);
+    const resp = await readFileContainer(id, "/home/coder/.sourcegraph-amp-module/agentapi-start.log");
+    expect(resp).toContain("AMP version: AMP CLI mock version v1.0.0");
+  });
+
+  test("custom-folder", async () => {
+    const folder = "/tmp/sourcegraph-amp-test";
+    const { id } = await setup({
+      moduleVariables: {
+        folder,
+      },
+    });
+    await execModuleScript(id);
+    const resp = await readFileContainer(id, "/home/coder/.sourcegraph-amp-module/install.log");
+    expect(resp).toContain(folder);
+  });
+
+  test("pre-post-install-scripts", async () => {
+    const { id } = await setup({
+      moduleVariables: {
+        pre_install_script: "#!/bin/bash\necho 'pre-install-script'",
+        post_install_script: "#!/bin/bash\necho 'post-install-script'",
+      },
+    });
+    await execModuleScript(id);
+    const preLog = await readFileContainer(id, "/home/coder/.sourcegraph-amp-module/pre_install.log");
+    expect(preLog).toContain("pre-install-script");
+    const postLog = await readFileContainer(id, "/home/coder/.sourcegraph-amp-module/post_install.log");
+    expect(postLog).toContain("post-install-script");
+  });
+
+  test("amp-not-installed", async () => {
+    const { id } = await setup({ skipAmpMock: true });
+    await execModuleScript(id);
+    const log = await readFileContainer(id, "/home/coder/.sourcegraph-amp-module/install.log");
+    expect(log).toContain("Error");
+  });
+});
diff --git a/registry/harsh9485/modules/sourcegraph_amp/main.tf b/registry/harsh9485/modules/sourcegraph_amp/main.tf
new file mode 100644
index 00000000..66b9a974
--- /dev/null
+++ b/registry/harsh9485/modules/sourcegraph_amp/main.tf
@@ -0,0 +1,160 @@
+terraform {
+  required_version = ">= 1.0"
+
+  required_providers {
+    coder = {
+      source  = "coder/coder"
+      version = ">= 2.7"
+    }
+  }
+}
+
+variable "agent_id" {
+  type        = string
+  description = "The ID of a Coder agent."
+}
+
+data "coder_workspace" "me" {}
+
+data "coder_workspace_owner" "me" {}
+
+variable "order" {
+  type        = number
+  description = "The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order)."
+  default     = null
+}
+
+variable "group" {
+  type        = string
+  description = "The name of a group that this app belongs to."
+  default     = null
+}
+
+variable "icon" {
+  type        = string
+  description = "The icon to use for the app."
+  default     = "/icon/sourcegraph-amp.svg"
+}
+
+variable "folder" {
+  type        = string
+  description = "The folder to run sourcegraph-amp in."
+  default     = "/home/coder"
+}
+
+variable "install_sourcegraph-amp" {
+  type        = bool
+  description = "Whether to install sourcegraph-amp."
+  default     = true
+}
+
+variable "sourcegraph-amp_api_key" {
+  type        = string
+  description = "sourcegraph-amp API Key"
+  default     = ""
+}
+
+resource "coder_env" "sourcegraph-amp_api_key" {
+  agent_id = var.agent_id
+  name     = "SOURCEGRAPH_AMP_API_KEY"
+  value    = var.sourcegraph-amp_api_key
+}
+
+variable "install_agentapi" {
+  type        = bool
+  description = "Whether to install AgentAPI."
+  default     = true
+}
+
+variable "agentapi_version" {
+  type        = string
+  description = "The version of AgentAPI to install."
+  default     = "v0.3.0"
+}
+
+variable "pre_install_script" {
+  type        = string
+  description = "Custom script to run before installing sourcegraph-amp"
+  default     = null
+}
+
+variable "post_install_script" {
+  type        = string
+  description = "Custom script to run after installing sourcegraph-amp."
+  default     = null
+}
+
+locals {
+  base_extensions = <<-EOT
+coder:
+  args:
+  - exp
+  - mcp
+  - server
+  cmd: coder
+  description: Report ALL tasks and statuses (in progress, done, failed) you are working on.
+  enabled: true
+  envs:
+    CODER_MCP_APP_STATUS_SLUG: ${local.app_slug}
+    CODER_MCP_AI_AGENTAPI_URL: http://localhost:3284
+  name: Coder
+  timeout: 3000
+  type: stdio
+developer:
+  display_name: Developer
+  enabled: true
+  name: developer
+  timeout: 300
+  type: builtin
+EOT
+
+  app_slug        = "amp"
+  install_script  = file("${path.module}/scripts/install.sh")
+  start_script    = file("${path.module}/scripts/start.sh")
+  module_dir_name = ".sourcegraph-amp-module"
+}
+
+module "agentapi" {
+  source  = "registry.coder.com/coder/agentapi/coder"
+  version = "1.0.1"
+
+  agent_id             = var.agent_id
+  web_app_slug         = local.app_slug
+  web_app_order        = var.order
+  web_app_group        = var.group
+  web_app_icon         = var.icon
+  web_app_display_name = "Sourcegraph Amp"
+  cli_app_slug         = "${local.app_slug}-cli"
+  cli_app_display_name = "Sourcegraph Amp CLI"
+  module_dir_name      = local.module_dir_name
+  install_agentapi     = var.install_agentapi
+  agentapi_version     = var.agentapi_version
+  pre_install_script   = var.pre_install_script
+  post_install_script  = var.post_install_script
+  start_script         = <<-EOT
+     #!/bin/bash
+     set -o errexit
+     set -o pipefail
+
+     echo -n '${base64encode(local.start_script)}' | base64 -d > /tmp/start.sh
+     chmod +x /tmp/start.sh
+     SOURCEGRAPH_AMP_API_KEY='${var.sourcegraph-amp_api_key}' \
+     SOURCEGRAPH_AMP_START_DIRECTORY='${var.folder}' \
+     /tmp/start.sh
+   EOT
+
+  install_script = <<-EOT
+    #!/bin/bash
+    set -o errexit
+    set -o pipefail
+
+    echo -n '${base64encode(local.install_script)}' | base64 -d > /tmp/install.sh
+    chmod +x /tmp/install.sh
+    ARG_INSTALL_SOURCEGRAPH_AMP='${var.install_sourcegraph-amp}' \
+    SOURCEGRAPH_AMP_START_DIRECTORY='${var.folder}' \
+    BASE_EXTENSIONS='${replace(local.base_extensions, "'", "'\\''")}' \
+    /tmp/install.sh
+  EOT
+}
+
+
diff --git a/registry/harsh9485/modules/sourcegraph_amp/scripts/install.sh b/registry/harsh9485/modules/sourcegraph_amp/scripts/install.sh
new file mode 100644
index 00000000..473b98e3
--- /dev/null
+++ b/registry/harsh9485/modules/sourcegraph_amp/scripts/install.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+set -euo pipefail
+
+# ANSI colors
+BOLD='\033[1m'
+
+echo "--------------------------------"
+echo "Install flag: $ARG_INSTALL_SOURCEGRAPH_AMP"
+echo "Workspace: $SOURCEGRAPH_AMP_START_DIRECTORY"
+echo "--------------------------------"
+
+# Helper function to check if a command exists
+command_exists() {
+    command -v "$1" >/dev/null 2>&1
+}
+
+function install_node() {
+    if ! command_exists npm; then
+        printf "npm not found, checking for Node.js installation...\n"
+        if ! command_exists node; then
+            printf "Node.js not found, installing Node.js via NVM...\n"
+            export NVM_DIR="$HOME/.nvm"
+            if [ ! -d "$NVM_DIR" ]; then
+                mkdir -p "$NVM_DIR"
+                curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
+                [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
+            else
+                [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
+            fi
+
+            # Temporarily disable nounset (-u) for nvm to avoid PROVIDED_VERSION error
+            set +u
+            nvm install --lts
+            nvm use --lts
+            nvm alias default node
+            set -u
+
+            printf "Node.js installed: %s\n" "$(node --version)"
+            printf "npm installed: %s\n" "$(npm --version)"
+        else
+            printf "Node.js is installed but npm is not available. Please install npm manually.\n"
+            exit 1
+        fi
+    fi
+}
+
+function install_sourcegraph_amp() {
+    if [ "${ARG_INSTALL_SOURCEGRAPH_AMP}" = "true" ]; then
+        install_node
+
+        # If nvm is not used, set up user npm global directory
+        if ! command_exists nvm; then
+            mkdir -p "$HOME/.npm-global"
+            npm config set prefix "$HOME/.npm-global"
+            export PATH="$HOME/.npm-global/bin:$PATH"
+            if ! grep -q "export PATH=$HOME/.npm-global/bin:\$PATH" ~/.bashrc; then
+                echo "export PATH=$HOME/.npm-global/bin:\$PATH" >> ~/.bashrc
+            fi
+        fi
+
+        printf "%s Installing Sourcegraph AMP CLI...\n" "${BOLD}"
+        npm install -g @sourcegraph/amp@0.0.1754179307-gba1f97
+        export AMP_API_KEY="$SOURCEGRAPH_AMP_API_KEY"
+        printf "%s Successfully installed Sourcegraph AMP CLI. Version: %s\n" "${BOLD}" "$(amp --version)"
+    fi
+}
+
+function setup_system_prompt() {
+    if [ -n "${SOURCEGRAPH_AMP_SYSTEM_PROMPT:-}" ]; then
+        echo "Setting Sourcegraph AMP system prompt..."
+        mkdir -p "$HOME/.sourcegraph-amp"
+        echo "$SOURCEGRAPH_AMP_SYSTEM_PROMPT" > "$HOME/.sourcegraph-amp/SYSTEM_PROMPT.md"
+        echo "System prompt saved to $HOME/.sourcegraph-amp/SYSTEM_PROMPT.md"
+    else
+        echo "No system prompt provided for Sourcegraph AMP."
+    fi
+}
+
+install_sourcegraph_amp
+setup_system_prompt
diff --git a/registry/harsh9485/modules/sourcegraph_amp/scripts/start.sh b/registry/harsh9485/modules/sourcegraph_amp/scripts/start.sh
new file mode 100644
index 00000000..df8ec7ef
--- /dev/null
+++ b/registry/harsh9485/modules/sourcegraph_amp/scripts/start.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -euo pipefail
+
+# Load user environment
+# shellcheck source=/dev/null
+source "$HOME/.bashrc"
+# shellcheck source=/dev/null
+source "$HOME/.nvm/nvm.sh"
+
+function ensure_command() {
+  command -v "$1" &>/dev/null || { echo "Error: '$1' not found." >&2; exit 1; }
+}
+
+ensure_command amp
+echo "AMP version: $(amp --version)"
+
+
+dir="$SOURCEGRAPH_AMP_START_DIRECTORY"
+if [[ -d "$dir" ]]; then
+  echo "Using existing directory: $dir"
+else
+  echo "Creating directory: $dir"
+  mkdir -p "$dir"
+fi
+cd "$dir"
+echo "Add AMP API key"
+export AMP_API_KEY=$SOURCEGRAPH_AMP_API_KEY
+# Launch AgentAPI server with AMP
+agentapi server --term-width=67 --term-height=1190 -- amp
\ No newline at end of file
diff --git a/registry/harsh9485/modules/sourcegraph_amp/testdata/amp-mock.sh b/registry/harsh9485/modules/sourcegraph_amp/testdata/amp-mock.sh
new file mode 100644
index 00000000..259db57a
--- /dev/null
+++ b/registry/harsh9485/modules/sourcegraph_amp/testdata/amp-mock.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Mock behavior of the AMP CLI
+if [[ "$1" == "--version" ]]; then
+  echo "AMP CLI mock version v1.0.0"
+  exit 0
+fi
+
+# Simulate AMP running in a loop for AgentAPI to connect
+set -e
+while true; do
+  echo "$(date) - AMP mock is running..."
+  sleep 15
+done
