{"id":51619986,"url":"https://github.com/coder/ai.coder.com","last_synced_at":"2026-07-12T18:02:14.803Z","repository":{"id":319726101,"uuid":"1066676491","full_name":"coder/ai.coder.com","owner":"coder","description":"Coder's AI-Agent Demo Environment","archived":false,"fork":false,"pushed_at":"2026-03-11T15:50:59.000Z","size":630,"stargazers_count":8,"open_issues_count":4,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T14:07:36.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T20:10:47.000Z","updated_at":"2026-05-29T23:26:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"96e87fe7-c8d7-4989-b652-dffd9ca97cff","html_url":"https://github.com/coder/ai.coder.com","commit_stats":null,"previous_names":["coder/ai.coder.com"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coder/ai.coder.com","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fai.coder.com","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fai.coder.com/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fai.coder.com/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fai.coder.com/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/ai.coder.com/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fai.coder.com/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35398566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-12T18:02:13.916Z","updated_at":"2026-07-12T18:02:14.792Z","avatar_url":"https://github.com/coder.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Demo Environment (ai.coder.com)\n\nWelcome to the AI Demo Environment's Github repository! \n\nThis project is used by [\"ai.coder.com\"](https://ai.coder.com), allowing users to experiment with the latest AI features in Coder and create demoes for them.\n\n---\n\n## Getting Hand's On\n\n\u003e [!IMPORTANT] Before accessing the deployment, make sure you've been invited to our \"coder-contrib\" Github organization.  If not, reach out to `jullian@coder.com` and send your Github handle to be added in. Otherwise, if you're an internal user, you should already have access to to the environment.\n\n### Accessing the Deployment:  \n\nGet Started Here 👉 [https://ai.coder.com](https://ai.coder.com)\n\n**Login Flow**  \n\n- Non-Coder Employee\n\n1. Select \"GitHub\"\n\n2. Login with your Github account (that has access to the coder-contrib Github Organization).\n\n- Coder Employee\n\n1. Select \"Okta\"\n\n2. Login with your Github account (that has access to the coder-contrib Github Organization).\n\n\n--- \n\n## How-To-Deploy\n\n\u003e [!WARNING] The following environment is heavily opinionated towards: AWS. Make sure to pull the modules and modify according to your use-case. Additionally, the [`infra/aws/us-east-2`](./infra/aws/us-east-2) project is not repeatable. For repeatable references, check out [`infra/aws/us-west-2`](./infra/aws/us-west-2) and [`infra/aws/eu-west-2`](./infra/aws/eu-west-2)\n\nIn this repository, we deploy the infrastructure separately from the K8s applications which includes Coder.\n\nTo make things easy, we generate K8s app manifests from any `k8s/` project subfolders which reference the main `eks/` application indirectly which auto-populates any infrastructure dependent resource names.\n\n### About the Infrastructure\n\nThe deployment currently has 2 repeatable components: [`eks-vpc` module](./modules/network/eks-vpc) and [`eks-cluster` module](./modules/compute/cluster).\n\n#### [`eks-vpc`](./modules/network/eks-vpc)\n\nThe following module creates an opinionated VPC that let's you granularly define individual subnets. This includes unevenly defining public and private subnets.\n\nThis will come with an Internet Gateway and a Custom NAT Gateway (using [RaJiska/terraform-aws-fck-nat](github.com/RaJiska/terraform-aws-fck-nat)).\n\nThe public subnets will have automatic routes to the IGW and private subnets with routes to the NAT.\n\n#### [`eks-cluster`](./modules/compute/cluster).\n\nThe following module creates an opinionated cluster, similar to [EKS Auto Mode](https://docs.aws.amazon.com/eks/latest/userguide/automode.html), that creates both the EKS Cluster (using the [AWS Managed Terraform EKS module](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master)), and resources needed by:\n\n- [Karpenter](https://karpenter.sh/)\n- [Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html)\n- [AWS EBS Controller](https://github.com/kubernetes-sigs/aws-ebs-csi-driver)\n- [AWS Load Balancer Controller](https://github.com/kubernetes-sigs/aws-load-balancer-controller)\n- [Coder External Provisioner](https://coder.com/docs/admin/provisioners)\n\n##### Karpenter\n\nWe use the the [AWS Managed Terraform EKS Module for Karpenter in the background](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/karpenter).\n\nThis automatically creates:\n- SQS Queue\n- IAM Roles\n- Event Bridge\n\n##### Amazon Bedrock\n\nAuto-Creates\n- IAM Role\n\n##### AWS EBS Controller\n\nAuto-Creates\n- IAM Role\n\n##### AWS Load Balancer Controller\n\nAuto-Creates\n- IAM Role\n\n\n##### Coder External Provisioner\n\nAuto-Creates\n- IAM Role\n\n\n### Creating the Infrastructure (on AWS)\n\nTo deploy the base infrastructure, you can get started with referencing our [modules directory](./modules). \n\nIf you don't have an existing network infrastructure, then you can start with deploying the [`eks-vpc` module](./modules/network/eks-vpc).\n\nAdditionally, if you don't have an existing cluster infrastructure, then you can start with deploying the [`eks-cluster` module](./modules/compute/cluster).\n\nLastly, for Coder's backend database, you can refer to our deployment in [`./aidev/infra/aws/us-east-2/rds`](./aidev/infra/aws/us-east-2/rds) to see how to deploy it. \n\nWe just an [`aws_db_instance`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance) that uses Postgres.\n\nRefer to the example below to see how this would look like put together:\n\n```terraform\n\nterraform {\n    required_version = \"\u003e= 1.0\"\n    required_providers {\n        aws = {\n            source  = \"hashicorp/aws\"\n            version = \"\u003e= 5.100.0\"\n        }\n    }  \n}\n\nvariable \"name\" {\n    description = \"The resource name.\"\n    type        = string\n}\n\nvariable \"region\" {\n    description = \"The aws region to deploy eks cluster\"\n    type        = string\n}\n\nvariable \"cluster_version\" {\n    description = \"The EKS Version\"\n    type        = string\n}\n\nvariable \"cluster_instance_type\" {\n    description = \"EKS Instance Size/Type.\"\n    default     = \"t3.xlarge\"\n    type        = string\n}\n\nvariable \"coder_ws_volume_size\" {\n    description = \"Coder Workspace K8s Node Volume Size.\"\n    default     = 50\n    type        = number\n}\n\nvariable \"coder_ws_instance_type\" {\n    description = \"Coder Workspace K8s Node Instance Size/Type.\"\n    default     = \"t3.xlarge\"\n    type        = string\n}\n\nvariable \"network_cidr_block\" {\n    description = \"VPC CIDR Block\"\n    type = string\n    default = \"10.0.0.0/16\"\n}\n\nvariable \"db_instance_class\" {\n    description = \"RDS DB Instance Class\"\n    type = string\n    default = \"db.m5.large\"\n}\n\nvariable \"db_allocated_storage\" {\n    description = \"RDS DB Allocated Storage Amount\"\n    type = string\n    default = \"40\"\n}\n\nvariable \"db_master_username\" {\n    description = \"RDS DB Master Username\"\n    type = string\n    sensitive = true\n}\n\nvariable \"db_master_password\" {\n    description = \"RDS DB Master Password\"\n    type = string\n    sensitive = true\n}\n\nmodule \"eks-network\" {\n    source = \"../../../../modules/network/eks-vpc\"\n\n    name = var.name\n    vpc_cidr_block = var.network_cidr_block\n    public_subnets = {\n        # System subnets requiring public access (e.g. NAT Gateways, Load Balancers, IGW, etc.)\n        \"system0\" = {\n            cidr_block = \"10.0.10.0/24\"\n            availability_zone = \"${data.aws_region.this.name}a\"\n            map_public_ip_on_launch = true\n            private_dns_hostname_type_on_launch = \"ip-name\"\n        }\n        \"system1\" = {\n            cidr_block = \"10.0.11.0/24\"\n            availability_zone = \"${data.aws_region.this.name}b\"\n            map_public_ip_on_launch = true\n            private_dns_hostname_type_on_launch = \"ip-name\"\n        }\n    }\n    private_subnets = {\n        # System subnets that don't need to be exposed publically (e.g. K8s Worker Nodes, Database, etc.)\n        \"system0\" = {\n            cidr_block = \"10.0.20.0/24\"\n            availability_zone = \"${data.aws_region.this.name}a\"\n            private_dns_hostname_type_on_launch = \"ip-name\"\n            tags = local.system_subnet_tags\n        }\n        \"system1\" = {\n            cidr_block = \"10.0.21.0/24\"\n            availability_zone = \"${data.aws_region.this.name}b\"\n            private_dns_hostname_type_on_launch = \"ip-name\"\n            tags = local.system_subnet_tags\n        }\n        \"provisioner\" = {\n            cidr_block = \"10.0.22.0/24\"\n            availability_zone = \"${data.aws_region.this.name}a\"\n            map_public_ip_on_launch = true\n            private_dns_hostname_type_on_launch = \"ip-name\"\n            tags = local.provisioner_subnet_tags\n        }\n        \"ws-all\" = {\n            cidr_block = \"10.0.16.0/22\"\n            availability_zone = \"${data.aws_region.this.name}b\"\n            map_public_ip_on_launch = true\n            private_dns_hostname_type_on_launch = \"ip-name\"\n            tags = local.ws_all_subnet_tags\n        }\n    }\n}\n\ndata \"aws_iam_policy_document\" \"sts\" {\n    statement {\n        effect = \"Allow\"\n        actions = [\"sts:*\"]\n        resources = [\"*\"]\n    }\n}\n\nresource \"aws_iam_policy\" \"sts\" {\n    name_prefix = \"sts\"\n    path = \"/\"\n    description = \"Assume Role Policy\"\n    policy = data.aws_iam_policy_document.sts.json\n}\n\nmodule \"eks-cluster\" {\n    source = \"../../../../modules/compute/cluster\"\n\n    vpc_id     = module.eks-network.vpc_id\n    cluster_public_subnet_ids = module.eks-network.public_subnet_ids\n    cluster_private_subnet_ids = module.eks-network.private_subnet_ids\n    cluster_intra_subnet_ids = module.eks-network.intra_subnet_ids\n    cluster_instance_type = var.cluster_instance_type\n\n    cluster_name                    = var.name\n    cluster_version                 = var.cluster_version\n    cluster_asg_additional_policies = {\n        AmazonSSMManagedInstanceCore = \"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore\"\n        STSAssumeRole = aws_iam_policy.sts.arn\n    }\n    cluster_node_security_group_tags = merge(\n        local.system_sg_tags,\n        merge(local.provisioner_sg_tags, local.ws_all_sg_tags)\n    )\n    cluster_asg_node_labels = local.cluster_asg_node_labels\n    cluster_addons = {\n        coredns = {\n            most_recent = true\n        }\n        kube-proxy = {\n            most_recent = true\n        }\n        vpc-cni = {\n            most_recent = true\n        }\n    }\n\n    karpenter_controller_policy_statements = [{\n      effect = \"Allow\",\n      actions = toset([\"iam:PassRole\"]),\n      resources = toset([\"*\"]),\n    }]\n\n    karpenter_node_role_policies = {\n        AmazonSSMManagedInstanceCore = \"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore\"\n        STSAssumeRole = aws_iam_policy.sts.arn\n    }\n\n    coder_ws_instance_type = var.coder_ws_instance_type\n    coder_ws_volume_size = var.coder_ws_volume_size\n}\n\n###\n# Only deploy the database if you're creating the central Coder infrastructure. \n# Otherwise, if you're deploying separate clusters for Coder proxies + provisioners in a different network, then there's no need for another database.\n###\n\nresource \"aws_db_subnet_group\" \"db_subnet_group\" {\n  name       = \"${var.name}-db-subnet-group\"\n  subnet_ids = module.eks-network.private_subnet_ids\n\n  tags = {\n    Name = \"${var.name}-db-subnet-group\"\n  }\n}\n\nresource \"aws_db_instance\" \"db\" {\n  identifier        = \"${var.name}-db\"\n  instance_class    = var.instance_class\n  allocated_storage = var.allocated_storage\n  engine            = \"postgres\"\n  engine_version    = \"15.12\"\n  username               = var.master_username\n  password               = var.master_password\n  db_name                = \"coder\"\n  db_subnet_group_name   = aws_db_subnet_group.db_subnet_group.name\n  vpc_security_group_ids = [ aws_security_group.postgres.id ]\n  publicly_accessible = false\n  skip_final_snapshot = false\n\n  tags = {\n    Name = \"${var.name}-rds-db\"\n  }\n  lifecycle {\n    ignore_changes = [\n      snapshot_identifier\n    ]\n  }\n}\n\nresource \"aws_vpc_security_group_ingress_rule\" \"postgres\" {\n  security_group_id = aws_security_group.postgres.id\n  cidr_ipv4 = var.network_cidr_block\n  ip_protocol = \"tcp\"\n  from_port = 5432\n  to_port = 5432\n}\n\nresource \"aws_vpc_security_group_egress_rule\" \"all\" {\n  security_group_id = aws_security_group.postgres.id\n  cidr_ipv4 = \"0.0.0.0/0\"\n  ip_protocol = -1\n}\n\nresource \"aws_security_group\" \"postgres\" {\n  vpc_id      = module.eks-network.vpc_id\n  name        = \"${var.name}-postgres\"\n  description = \"Security Group for Postgres traffic\"\n  tags = {\n    Name = \"${var.name}-postgres\"\n  }\n}\n```\n\nThe deployment may take a while (~20 minutes or more). In the meantime, you can then get started with creating other dependencies.\n\n### Deploying Required Apps\n\nOnce the K8s (and maybe the Database) infrastructure is deployed, the next step is to deploy the K8s apps. \n\nBefore getting to Coder, we should first deploy:\n\n- [`AWS Load Balancer Controller`](https://github.com/kubernetes-sigs/aws-load-balancer-controller)\n- [`AWS EBS Controller`](https://github.com/kubernetes-sigs/aws-ebs-csi-driver)\n- [`K8s Metrics Server`](github.com/kubernetes-sigs/metrics-server)\n- [`Karpenter`](https://karpenter.sh/docs/getting-started/getting-started-with-karpenter/#4-install-karpenter)\n- [`Cert-Manager`](https://cert-manager.io/docs/installation/helm/)\n\nAfterwards, you can then deploy\n\n- [`Coder Server`](https://artifacthub.io/packages/helm/coder-v2/coder)\n- [`Coder Proxy` (uses same chart as the Coder Server)](https://artifacthub.io/packages/helm/coder-v2/coder)\n- [`Coder Workspace`](https://artifacthub.io/packages/helm/coder-v2/coder-provisioner)\n\nYou can deploy the above manually yourself following your own preferred methods. \n\nOtherwise, you can leverage our K8s app TF modules to automatically generate the manifests:\n\n#### [`lb-controller`](./modules/k8s/bootstrap/lb-controller)\n\n#### [`ebs-controller`](./modules/k8s/bootstrap/ebs-controller)\n\n#### [`metrics-server`](./modules/k8s/bootstrap/metrics-server)\n\n#### [`karpenter`](./modules/k8s/bootstrap/karpenter)\n\n#### [`cert-manager`](./modules/k8s/bootstrap/cert-manager)\n\n#### [`coder-server`](./modules/k8s/bootstrap/coder-server)\n\n#### [`coder-proxy`](./modules/k8s/bootstrap/coder-proxy)\n\n#### [`coder-provisioner`](./modules/k8s/bootstrap/coder-provisioner)\n\n## How-It-Works\n\n\u003e \u003c!TODO\u003e\n\n### Coder Tasks\n\n\u003e \u003c!TODO\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fai.coder.com","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Fai.coder.com","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fai.coder.com/lists"}