Skip to content

Commit 4dfbd93

Browse files
committed
fix(doc): update instructions for first time setup
1 parent c1fdeb1 commit 4dfbd93

6 files changed

Lines changed: 215 additions & 11 deletions

File tree

docs/guides/DEVELOPER_GUIDE.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ The repository is organized around four main pieces:
1313

1414
## Repository preparation
1515

16-
The CDK stack ships with a **sample onboarded repository** (`krokoko/agent-plugins` in `src/stacks/agent.ts`) so the project deploys and tests cleanly out of the box. To use ABCA with **your** GitHub repositories, you need to point the platform at those repos and give the agent the right tools and permissions.
16+
The CDK stack ships with a **sample onboarded repository** (`krokoko/agent-plugins` in `src/stacks/agent.ts`) so the project deploys and CDK tests run cleanly out of the box. That value is for **default wiring only**: a real agent run **pushes branches and opens pull requests** with your GitHub PAT, so the onboarded repo must be one your token can **clone, push to, and open PRs on**. Most people do **not** have that access to the upstream repo.
17+
18+
**Recommended first setup:** fork [`awslabs/agent-plugins`](https://github.com/awslabs/agent-plugins) on GitHub, set the `Blueprint` **`repo`** to **`your-github-username/agent-plugins`** (match your fork’s owner and repo name), and create a **fine-grained PAT** with access **only to that fork** (clone, push, PRs—see `agent/README.md` for scopes). Use that token for **`GITHUB_TOKEN`** when running `./agent/run.sh` locally and store the same value in Secrets Manager after deploy. For use on your own codebases, point the Blueprint at those repos instead and scope the PAT to match.
19+
20+
Register every repo you want tasks to target and align tools and permissions (steps below).
1721

1822
### 1. Register repositories with `Blueprint` (required)
1923

2024
The Task API only accepts tasks for repositories that are **onboarded** — each one is a `Blueprint` construct in `src/stacks/agent.ts` that writes a `RepoConfig` row to DynamoDB.
2125

2226
1. Open **`src/stacks/agent.ts`** and locate the `Blueprint` block (for example `AgentPluginsBlueprint`).
23-
2. Set **`repo`** to your repository in **`owner/repo`** form (e.g. `acme/my-service`). This must match the `repo` field users pass in the CLI or API.
27+
2. Set **`repo`** to your repository in **`owner/repo`** form. For a quick end-to-end test, use your **fork** of the sample plugin repo (e.g. `jane-doe/agent-plugins` after forking `awslabs/agent-plugins`). For your own services, use something like `acme/my-service`. This must match the `repo` field users pass in the CLI or API.
2428
3. **Multiple repositories:** add another `new Blueprint(this, 'YourBlueprintId', { repo: 'owner/other-repo', repoTable: repoTable.table, ... })` and append it to the **`blueprints`** array. That array is used to aggregate per-repo **DNS egress** allowlists; skipping it can block the agent from reaching domains your Blueprint declares.
2529

2630
Optional per-repo overrides (same file / `Blueprint` props) include a different AgentCore **`runtimeArn`**, **`modelId`**, **`maxTurns`**, **`systemPromptOverrides`**, or a **`githubTokenSecretArn`** for a dedicated PAT. If you use a custom `runtimeArn` or secret per repo, you must also pass the corresponding ARNs into **`TaskOrchestrator`** via **`additionalRuntimeArns`** and **`additionalSecretArns`** so the orchestrator Lambda’s IAM policy allows them (see [Repo onboarding](../design/REPO_ONBOARDING.md) for the full model).
@@ -29,7 +33,7 @@ After changing Blueprints, redeploy: `npx projen deploy`.
2933

3034
### 2. GitHub personal access token
3135

32-
The agent clones, pushes, and opens pull requests using a **GitHub PAT** stored in Secrets Manager (see [Post-deployment setup](#post-deployment-setup)). The token must have permission to access **every** onboarded repository (clone, push to branches, create/update PRs). Use a fine-grained PAT scoped to the right org/repos; see `agent/README.md` for required scopes.
36+
The agent clones, pushes, and opens pull requests using a **GitHub PAT** stored in Secrets Manager (see [Post-deployment setup](#post-deployment-setup)). The token must have permission to access **every** onboarded repository (clone, push to branches, create/update PRs). Use a fine-grained PAT scoped to those repos—for the fork workflow above, restrict the token to **your fork** only; see `agent/README.md` for required scopes.
3337

3438
### 3. Agent image (`agent/Dockerfile`)
3539

@@ -76,7 +80,7 @@ Default output format [None]: json
7680
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/) >= 1.22.19
7781
- [mise](https://mise.jdx.dev/getting-started.html) (required for local agent Python tasks and checks)
7882
- [Docker](https://docs.docker.com/engine/install/)
79-
- A **GitHub personal access token** (PAT) with permission to access every repository you onboard (clone, push to branches, create and update pull requests). After deployment, store it in the Secrets Manager secret the stack creates ([Post-deployment setup](#post-deployment-setup)); for local agent runs, export `GITHUB_TOKEN` (see **Local testing** below). Required scopes are documented in `agent/README.md`.
83+
- A **GitHub personal access token** (PAT) with permission to access every repository you onboard (clone, push to branches, create and update pull requests)—often a fine-grained token scoped to **your fork** of `awslabs/agent-plugins` if you follow the fork workflow under **Repository preparation** at the start of this guide. After deployment, store it in the Secrets Manager secret the stack creates ([Post-deployment setup](#post-deployment-setup)); for local agent runs, export `GITHUB_TOKEN` (see **Local testing** below). Required scopes are documented in `agent/README.md`.
8084

8185
#### One-time AWS account setup
8286

@@ -127,6 +131,8 @@ Before deploying to AWS, you can build and run the agent Docker container locall
127131

128132
#### Prerequisites
129133

134+
The `owner/repo` you pass to `run.sh` must match an onboarded Blueprint and be a repository your `GITHUB_TOKEN` can **push to and open PRs on** (same rules as **Repository preparation** at the start of this guide). If you have not changed the Blueprint, fork `awslabs/agent-plugins`, set **`repo`** to your fork, and use a PAT scoped to that fork—then pass the same **`owner/repo`** here.
135+
130136
Set the following environment variables:
131137

132138
```bash

docs/src/content/docs/design/Memory.md

Lines changed: 97 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)