Conversation
…d Agent workers. Includes the HTTP adapter, Terraform, session scripts, and an AWS blog draft that uses Mitra as the integration example. Co-authored-by: Cursor <cursoragent@cursor.com>
…vider IAM. Operator PassRole and instance-role naming match the managed AgentCore policy so RunInstances can succeed; local contract tests run without Docker Desktop. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
first commit |
Treat origin fetch as best-effort so a private HTTPS WORKER_REPOSITORY_URL without credentials does not fail the worker before it starts. Add adapter tests, the 15-step secrets-and-flow diagram, ignore __pycache__, and drop the laptop-only blog draft from the tree.
One row per step and one column per component so arrows no longer cross. Short codes stay on the grid; the full 15-step wording moves into the legend.
Replace the crossing-arrow swimlane with laptop export commands, the four places those variables land, the CURSOR_API_KEY copy path, and a 15-step list with the make/gh/aws command for each step.
Keep the crisp component sketch in the README Architecture section and point to secrets-and-flow.png plus terraform/README.md for the full env-var and command path.
Show Operator, Secrets Manager, ECR, AgentCore Runtime, the managed instance, EBS, Cursor, and GitHub with labeled edges. Keep the detailed secrets runbook linked from the Architecture section.
Label the eleven flows 1–11 so setup, session start, registration, kickoff, and the PR can be read in order.
The cookbook does not generate .github/scripts; those files are static templates in agentcore/github/ that the operator copies into the sample app. Number that copy, GitHub App grant, and gh secret set on the architecture diagram.
Move the Operator out of Configure so push-image no longer looks like a configure step. Drop numbered lane titles so box 2 is not confused with missing edge 2. Grant GitHub App is edge 2 on the sample repo.
Apply the parent README row, Makefile agentcore-% delegate, and .env.example pointer that used to live as suggested edits, then drop that section. Point readers at a short command sequence on the AgentCore README.
Pool jobs match on pool name and repo. Logs of Repo: (repo unavailable) mean the worker registered without a repo label, so Cloud Agents wait with no connected workers even while AgentCore reports HealthyBusy. Pass --label repo=owner/repo from WORKER_REPOSITORY_URL, put the same slug in the labels file and Terraform env, and set git safe.directory for the worker process.
StopRuntimeSession only stops the agent inside the session. On AgentCore Instances the managed instance stays until IdleInstanceTimeout or DeleteCapacityProviderSession. Document that split, add agentcore-delete-session, and stop listing terminated instances.
delete-capacity-provider-session exists on current AWS CLI, but older
builds report Found invalid choice. Detect that and SigV4 DELETE
/capacity-providers/{id}/sessions/{sessionId} instead.
List output was paging away extra boxes and delete-session was using cursor-worker-<uuid>, while AgentCore tags instances with a bare UUID from earlier invokes. Print RuntimeSessionId, treat ResourceNotFound as already gone, and add agentcore-delete-listed-sessions.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 18d6d35. Configure here.
The Cursor worker CLI rejects --label together with --labels-file, so the process exited 1 and never registered. Keep repo= in the JSON file only.
Clarify it is the example repo used to demonstrate Cloud Agent capacity, not production software and not this cookbook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Medium Risk
Introduces new AWS control-plane resources, IAM execution roles, and runtime secret/git credential handling on managed instances; behavior is largely documented but unproven in production and depends on several open AgentCore API/schema assumptions.
Overview
Adds a fourth self-hosted deployment path for Cursor pool workers on Amazon Bedrock AgentCore Runtime (Instances), alongside EC2, ECS, and EKS. The repo root now documents AgentCore, forwards
make agentcore-*into a self-containedagentcore/tree (withenv -uso parent.envdoes not override AgentCore-specific image/region/secret settings), and extends ignore rules for Python artifacts.The core runtime change is an HTTP adapter (
worker_adapter.py) as container PID 1: it serves AgentCoreGET /ping/POST /invocations, reportsHealthyBusywhile supervisingagent worker, fetches Cursor API and optional Git push tokens from Secrets Manager, and prepares/mnt/workspace(persistent EBS) with gitorigin, repo routing labels, and best-effort fetch. Packaging includes an arm64 Dockerfile, Terraform/Makefile targets for capacity provider + runtime (via Cloud Control API where providers lag), session lifecycle scripts (start/status/stop/delete/list), local contract tests, GitHub kickoff templates, and extensive runbooks/diagrams. Docs note the target has not been validated in a live AWS account yet and call out first-run risks (image arch, metadata/IMDS configuration).Reviewed by Cursor Bugbot for commit 29bd85c. Bugbot is set up for automated code reviews on this repo. Configure here.