{"id":41079097,"url":"https://github.com/yolo-sh/agent","last_synced_at":"2026-01-22T13:35:32.920Z","repository":{"id":58634915,"uuid":"531417749","full_name":"yolo-sh/agent","owner":"yolo-sh","description":"The agent that connects your environments, the Yolo CLI and your code editor","archived":false,"fork":false,"pushed_at":"2022-09-16T18:54:40.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T07:55:34.531Z","etag":null,"topics":["golang","grpc","protobuf","ssh","yolo"],"latest_commit_sha":null,"homepage":"https://yo-lo.sh","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yolo-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-01T07:51:09.000Z","updated_at":"2022-12-21T05:50:33.000Z","dependencies_parsed_at":"2022-09-14T12:41:11.202Z","dependency_job_id":null,"html_url":"https://github.com/yolo-sh/agent","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/yolo-sh/agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yolo-sh%2Fagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yolo-sh%2Fagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yolo-sh%2Fagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yolo-sh%2Fagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yolo-sh","download_url":"https://codeload.github.com/yolo-sh/agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yolo-sh%2Fagent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28663794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":["golang","grpc","protobuf","ssh","yolo"],"created_at":"2026-01-22T13:35:32.368Z","updated_at":"2026-01-22T13:35:32.910Z","avatar_url":"https://github.com/yolo-sh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent / Host\n\nThis repository contains the source code of the host agent. \n\nThe host agent is installed in the instance running your environment during its creation (most of the time via `cloud-init` but it may vary depending on the cloud provider used).\n\nThe main role of this agent is to enable communication between your environments, the [CLI](https://github.com/yolo-sh/cli) and your code editor.\n\nIt is composed of two components: \n\n - An `SSH server`.\n\n - A `gRPC server`.\n\n## Table of contents\n- [Requirements](#requirements)\n- [Usage](#usage)\n  - [Generating the gRPC server's code](#generating-the-grpc-servers-code)\n- [Host agent](#host-agent)\n  - [SSH Server](#ssh-server)\n  - [gRPC Server](#grpc-server)\n- [License](#license)\n\n## Requirements\n\nThe host agent only works on nix-based OS and requires:\n\n  - `go \u003e= 1.17`\n\n  - `protoc \u003e= 3.0` (see [Protocol Buffer Compiler Installation](https://grpc.io/docs/protoc-installation/))\n  \n  - `google.golang.org/protobuf/cmd/protoc-gen-go@latest` (install via `go install`)\n  \n  - `google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest` (install via `go install`)\n\n## Usage\n\nThe host agent could be run using the `go run main.go` command. \n\nThe `gRPC server` will listen on an Unix socket at `/yolo-config/agent-grpc.sock` whereas the `SSH server` will listen on `:2200` by default.\n\n### Generating the gRPC server's code\n\nThe `gRPC server`'s code could be generated by running the following command **in the `proto` directory**:\n\n```bash\nprotoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative agent.proto \n```\n\n## Host agent\n\nThe `SSH server` lets you access your environment via `SSH` without having to install and configure it. \n\nThe `gRPC server`, on the other hand, is used to enable communication with the [CLI](https://github.com/yolo-sh/cli) (via `SSH`, using the OpenSSH's `Unix domain socket forwarding` feature).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/1233275/187863602-775b14db-f88d-4bfd-9b0b-c543643d020e.png\" alt=\"infra\" /\u003e\n\u003c/p\u003e\n\n### SSH Server\n\nThe `SSH server` is the sole public-facing component. It will listen on port `2200` and redirect traffic to the `gRPC server` or to the `environment` depending on the requested `channel type`.\n\n**The authentication will be done using the Public Key authentication method**. The key pair will be generated once, during the creation of the environment.\n\n### gRPC server\n\nThe `gRPC server` listens on an Unix socket and, as a result, is not public-facing. It will be accessed by the [CLI](https://github.com/yolo-sh/cli) via `SSH`, using the OpenSSH's `Unix domain socket forwarding` feature.\n\nIt is principally used to build your environment as you can see in the service definition:\n\n```proto\nservice Agent {\n  rpc InitInstance (InitInstanceRequest) returns (stream InitInstanceReply) {}\n  rpc BuildAndStartEnv (BuildAndStartEnvRequest) returns (stream BuildAndStartEnvReply) {}\n  rpc InitEnv (InitEnvRequest) returns (stream InitEnvReply) {}\n}\n\nmessage InitInstanceRequest {}\n\nmessage InitInstanceReply {\n  string log_line_header = 1;\n  string log_line = 2;\n}\n\nmessage BuildAndStartEnvRequest {\n  string env_name_slug = 1;\n  string env_repo_owner = 2;\n  string env_repo_name = 3;\n  repeated string env_repo_languages_used = 4;\n}\n\nmessage BuildAndStartEnvReply {\n  string log_line_header = 1;\n  string log_line = 2;\n}\n\nmessage InitEnvRequest {\n  string env_repo_owner = 1;\n  string env_repo_name = 2;\n  repeated string env_repo_languages_used = 3;\n  string github_user_email = 4;\n  string user_full_name = 5;\n}\n\nmessage InitEnvReply {\n  string log_line_header = 1;\n  string log_line = 2;\n  optional string github_ssh_public_key_content = 3;\n  optional string github_gpg_public_key_content = 4;\n}\n\n```\n\nThe `InitInstance` method will run a [shell script](https://github.com/yolo-sh/agent/blob/main/internal/grpcserver/init_instance.sh) that will, among other things, install `Docker` and `Sysbox`.\n\nThe `BuildAndStartEnv` method will pull the `ghcr.io/yolo-sh/workspace-full` image and build the environment container.\n\nThe `InitEnv` method will call the `Init` method of the [container agent](https://github.com/yolo-sh/agent-container)'s gRPC service.\n\n**These methods are idempotent**.\n\n## License\n\nYolo is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyolo-sh%2Fagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyolo-sh%2Fagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyolo-sh%2Fagent/lists"}