Build plan
Doc references are files in the claude-api skill's shared/ folder.
Phase 0: Prerequisites (you do these by hand, 30-45 min)
- Console: sign in at https://platform.claude.com with the account from
DECISIONS.md. Create aci-agentworkspace to keep costs and resources separate. Set a workspace spend limit as the backstop under per-run budgets (cost-optimization.md; check docs for the screen). - Repo: a private GitHub repo holding this pack and
data/2026-10-22-index.csv. Open a Claude Code cloud session on it. - CLI:
ant1.34.0 or later.ant auth login --no-browserprints a URL and takes a code back;ant auth statusconfirms the org and workspace (anthropic-cli.md). - Availability: Managed Agents is beta on the Claude API and Claude Platform on AWS only, not Bedrock, Vertex or Foundry (
platform-availability.md).
Done when: ant auth status shows the ci-agent workspace, and the session has read the pack.
Phase 1: One manual debrief, as an outcome (1-2 hours)
Learn: agent, environment, session, outcome and rubric, web allowlists.
- Run
/claude-api managed-agents-onboard field-monitor. Adaptagent.mdto [[BRIEF-SPEC]]. Writeenvironment.yamlwithlimitednetworking, the [[DECISIONS]] host list, andallow_mcp_servers: true(needed once the Notion server is declared, or session create fails with a 400); enableweb_searchandweb_fetchwith matchingallowed_domains. Apply after the dry run. - Upload the seed CSV (Files API) and attach it as a
fileresource withmount_path: /data/partners-index.csv; the agent sees/mnt/session/uploads/data/partners-index.csv(managed-agents-environments.md-> Resources). session.yaml:budget"500"($5.00);initial_events= auser.messagenaming the week and files, then auser.define_outcomewith [[RUBRIC]] as the rubric,max_iterations: 3(managed-agents-outcomes.md).- Watch in the Console session viewer (Managed Agents -> Sessions; the session prints its link).
ant beta:sessions connectneeds an interactive terminal, so use it only from your own laptop. Read eachspan.outcome_evaluation_endresultandexplanation. - Download the brief from session outputs and grade it yourself.
Done when: a spec-following brief is in /mnt/session/outputs/, the grader said satisfied (or you know why not), and you know the run's list cost from usage.
Watch for (likely): the directory is a JavaScript app; a 2026-10-22 Playwright scrape needed about 52 "View more" clicks. Before writing the brief, the agent fetches the directory and one profile page and logs what came back. If it cannot read them, the header says "Directory readable: no", and sections (a) and (b) say "Directory not readable this run; tier data from snapshot YYYY-MM-DD", never "no change". Pick a refresh route ([[DECISIONS]] item 9) before Phase 2.
Phase 2: Memory, so the agent compares weeks (about 1 hour)
Learn: memory stores, access modes, seeding, memory versions.
- Create two stores as
ant applyfiles (managed-agents-memory.md):memory_store-ci-config.yaml, attached read-only: watched set, phData public strengths, source list. You edit it; the agent cannot. Read-only is set byaccess: read_onlyon the store's resources entry in the session and the deployment, not in the store file.memory_store-ci-snapshots.yaml, read-write:/snapshots/latest.csv, dated weekly copies,/log/reported.md(so the brief does not repeat itself), one file per watched partner.
- Seed with
ant beta:memory-stores:memories create; read back with--view full. To load a file, setcontentin a piped YAML body (content: "@data/2026-10-22-index.csv");--content @filesends the literal text. Each memory is capped at 100KB (the seed is about 45KB); split by tier if you add columns. Stores attach at session create only. - Prompt change: read
latest.csv, build this week's snapshot, compare, write the brief, replacelatest.csv. - Run twice; run 2 should say "nothing changed" wherever nothing did.
Done when: run 2 reports real differences (or "nothing changed") and memory versions show the agent's writes.
Phase 3: Delivery (45-90 min)
Learn: MCP servers, vaults, permission policies. Two options that the docs support:
| A. Notion page (template default) | B. Email through an email API | |
|---|---|---|
| How | The field-monitor template already declares the Notion MCP server. The agent writes a dated page to a "CI Debriefs" database. | An environment_variable vault credential (for example an email API key) with allowed_hosts set to that API's host. The agent calls it with curl from bash. |
| Setup | Connect Notion with OAuth in the Console (Vaults). No keys, and the token refreshes automatically. | An email provider account and a verified sender domain. Add the host to both credential and environment allowlists. Header-only injection. |
| Gets to you | You open Notion (or subscribe to the database). | It arrives in your inbox. |
| Risk | The OAuth grant covers whatever pages you share with it. Share one database only. | The key can send to anyone. A malicious page could try to steer the agent into emailing someone else. |
Recommendation (Ray's guess): A. The template's own path, fewest new parts, no secret you handle, and it teaches vaults and MCP cleanly. Move to B if you find you do not open Notion.
Permission policy: the onboarding recommends auto for unattended runs that read outsider text and write somewhere. But an auto call it cannot judge pauses the run with nobody to approve. If that happens, narrow the Notion toolset to the page-create tool with always_allow (exact name from Notion's docs; a wrong name silently disables it).
Done when: a manual session puts the brief in your chosen destination, with no approval pauses.
Phase 4: Scheduled deployment (30 min)
Learn: deployments, deployment runs, pause and unpause (managed-agents-scheduled-deployments.md).
deployment-weekly.yaml: cron"0 6 * * 1",America/New_York(Mondays 6:00 AM Eastern Time), outside the 1-3 AM daylight-saving window. Runs can start up to 9 minutes late.- Starting event:
user.define_outcomewith the rubric uploaded once (rubric: {type: file, file_id}). Memory stores inresources; vault invault_ids(IDs, not paths). budgetfromDECISIONS.md; it is copied onto each run.- Before unpausing, make sure nothing can wait for approval: no one is attached to a scheduled run, so an
autocall the server cannot judge, or anyalways_asktool, waits indefinitely. Use the Phase 3always_allowpage-create tool, or add asession.status_idledwebhook handler (managed-agents-webhooks.md). Confirmant beta:deployments --helpworks first. - Apply paused, trigger one manual run (
ant beta:deployments run), then unpause.
Done when: schedule.upcoming_runs_at shows Mondays, the manual run succeeded, and ant beta:deployment-runs list shows no errors.
Phase 5: Tuning (30 min a week for 3 weeks)
- Rubric: tighten any criterion the grader passed but you would fail.
- Sources: add hosts that missed news, drop noisy ones. Each change is a new agent version.
- Cost: read
usage.list_costper run. Web searches are $10 per 1,000; runtime is $0.08 per hour (managed-agents-core.md-> Session budgets). Try lower effort or the cheaper-worker option. - Quality: after 3 weeks, ask "Did any brief change what I would say in a positioning conversation?" If not, revise
BRIEF-SPEC.md.