Skip to content

docs(#6599): add scheduled agent example guide - #6601

Open
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/6599-scheduled-agent-docs
Open

docs(#6599): add scheduled agent example guide#6601
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/6599-scheduled-agent-docs

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Adds a new user guide (docs/guides/user/scheduled-agent-example.md) documenting the recommended way to run a fullsend agent on a recurring cron schedule via GitHub Actions. The guide provides a copy-paste-able workflow that constructs a pre-computed matrix and calls reusable-dispatch.yml@v0, covering single-agent, multi-agent, and status-reporting variants.

Related Issue

Closes #6599

Changes

  • New guide: docs/guides/user/scheduled-agent-example.md — minimal nightly workflow example with schedule + workflow_dispatch triggers, matrix construction, status posting, multi-agent support, prerequisites, and tips
  • Cross-link from bring-your-own-agent.md: new "Scheduling agents" section and See Also entry pointing to the new guide
  • Cross-link from custom-poller-example.md: callout at the top for users who need a simpler nightly schedule without external polling
  • docs/guides/README.md: added the new guide to the User Guides index
  • docs/.vitepress/config.ts: added sidebar entry next to "Bring Your Own Agent"

Testing

  • lychee link checker passes on all changed markdown files (105 total, 0 errors)
  • lint-docs-links passes (no docs/ links escape repo root)
  • prettier passes on config.ts
  • gitlint passes on commit message
  • No secrets detected (scan-secrets --staged)

Closes #6599

Post-script verification

  • Branch is not main/master (agent/6599-scheduled-agent-docs)
  • Secret scan passed (gitleaks — 8fc412bbd86c77e42d2063bc37f581ae8879b199..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add docs/guides/user/scheduled-agent-example.md showing how to run a
fullsend agent on a cron schedule using a minimal GitHub Actions
workflow with a pre-computed matrix and reusable-dispatch.yml@v0.

The guide covers building the dispatch matrix directly (without
needing fullsend dispatch), passing it to reusable-dispatch, posting
status to a tracking issue, and running multiple agents on the same
schedule.

Cross-link from bring-your-own-agent.md (new "Scheduling agents"
section and See Also entry), custom-poller-example.md (callout for
simpler use case), and docs/guides/README.md. Add sidebar entry in
docs/.vitepress/config.ts.

Pre-commit could not fetch remote hook repos (network-restricted
sandbox). Ran hooks directly: trailing-whitespace, end-of-file-fixer,
lint-docs-links, lychee (lint-md-links), and prettier all passed.

Closes #6599
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Site preview

Preview: https://3aca09f3-site.fullsend-ai.workers.dev

Commit: 7527cc0aee4f707de5dc1fa0b0c257e74dad4731

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:10 PM UTC · Completed 5:24 PM UTC

Commit: 5373d17 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.83

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

Looks good to me

Previous run

Review

Findings

Low

  • [edge-case] docs/guides/user/scheduled-agent-example.md:39 — The default value for the dry_run workflow_dispatch input is "true", and the schedule trigger also defaults to 'true' via ${{ inputs.dry_run || 'true' }}. This means the nightly cron always runs in dry-run/preview mode and never performs real writes unless a user manually triggers the workflow and selects "false". Users following this guide as-is for a nightly job will get a no-op agent run every night. Consider noting this explicitly in the guide, or defaulting dry_run to "false" for the schedule trigger.

Labels: All changed files are under docs/ - documentation-only PR adding a new user guide

Previous run (2)

Review

Findings

High

  • [logic-error] docs/guides/user/scheduled-agent-example.md:69 — The example matrix uses event_payload: "{}" (empty JSON object), but the harness-run job in reusable-dispatch.yml has a mandatory step "Export dispatch context env" that extracts issue.html_url or pull_request.html_url from the event payload and exits with an error if neither is present. An empty {} payload will always cause the harness-run job to fail. The "Posting status to an issue" variant (line 127) and the "Running multiple agents" variant (line 160) also use empty payloads and have the same issue.
    Remediation: The event_payload field must contain at minimum an issue or pull_request object with an html_url field. Update all three example variants to pass a valid event payload, or document the requirement and show how to construct a minimal valid payload.

Medium

  • [api-contract] docs/guides/user/scheduled-agent-example.md:193 — The Tips section states "your agent reads it from the event payload" about the dry_run input, but the build-matrix step hardcodes event_payload: "{}" without wiring in the dry_run workflow_dispatch input. The agent receives its event payload from the matrix (written to .fullsend/dispatch/event-payload.json), not from github.event.inputs, so it would never see the dry_run value.
    Remediation: Either update the build-matrix step to include dry_run in the event payload JSON, or rewrite the tip to explain that users must manually wire workflow_dispatch inputs into the event_payload field and show how.

Low

  • [list-separator inconsistency] docs/guides/user/scheduled-agent-example.md:176 — The Variables/Secrets list items use em dashes (' — ') for separators, while the closest sibling custom-poller-example.md uses plain hyphens (' - ') for the identical list format. These two documents share nearly identical variable/secret sections and are cross-linked.
    Remediation: Use plain hyphens to match custom-poller-example.md, or update both files to use em dashes for consistency.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 5:26 PM UTC · Completed 5:35 PM UTC

Commit: 5373d17 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.78

- Populate event_payload with valid issue object (html_url, number) in
  all three example variants; empty {} payload causes harness-run
  "Export dispatch context env" step to fail
- Wire workflow_dispatch dry_run input into event_payload via DRY_RUN
  env variable so agents can read it from the payload file
- Update Tips section to describe the dry_run wiring accurately
- Add tracking-issue prerequisite explaining the event_payload
  requirement
- Switch Variables/Secrets list separators from em dashes to plain
  hyphens to match custom-poller-example.md

Addresses review feedback on #6601
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Addressed all 3 review findings. Fixed empty event_payload (which would fail the harness-run step) by populating it with a valid issue object in all example variants, wired the dry_run workflow_dispatch input into the payload, and aligned list separators with the sibling doc.

Fixed (3):

  1. empty event_payload causes harness-run failure (docs/guides/user/scheduled-agent-example.md): Updated all three example variants (main, status-posting, multi-agent) to construct a valid event_payload containing an issue object with html_url and number fields. Added a tracking-issue prerequisite explaining the requirement. The harness-run 'Export dispatch context env' step extracts issue.html_url or pull_request.html_url and exits with error if neither is present.
  2. dry_run input not wired into event_payload (docs/guides/user/scheduled-agent-example.md): Added DRY_RUN env variable (${{ inputs.dry_run || 'true' }}) and wired it into the event_payload via the jq command (as dry_run: true/false). Updated the Tips section to accurately describe the wiring and explain how agents read it from .fullsend/dispatch/event-payload.json.
  3. list separator inconsistency with custom-poller-example.md (docs/guides/user/scheduled-agent-example.md): Changed em dashes to plain hyphens in the Variables and Secrets list items to match the separator style used in custom-poller-example.md.

Tests: passed

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:38 PM UTC · Completed 5:53 PM UTC

Commit: ba46f05 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.15

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Purely additive documentation PR authored by a bot with well-aligned issue scope. All changes are docs-only with no protected paths, security-sensitive files, or CI/dependency changes.

Previous run

Risk Assessment: low (1/5)

Details

Documentation-only PR by a bot adding a scheduled agent example guide with minor cross-reference additions to existing docs; no protected paths, no security-sensitive files, no dependency or CI changes.

@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review August 25, 2026 17:53

Superseded by updated review

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge component/docs User-facing documentation labels Aug 25, 2026
Comment thread docs/guides/user/scheduled-agent-example.md Outdated
Comment thread docs/guides/user/scheduled-agent-example.md Outdated
@ralphbean

Copy link
Copy Markdown
Member

/fs-fix see my inline comments -> simplify

@fullsend-ai-coder

fullsend-ai-coder Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 6:09 PM UTC · Completed 6:18 PM UTC

Commit: ba46f05 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.37

Remove the build-matrix job and pass a matrix literal directly to
reusable-dispatch.yml. Remove the "Posting status to an issue"
section (ISSUE_URL is already in the main example). Drop the
dry_run workflow_dispatch input and simplify the "Running multiple
agents", "How it works", and "Tips" sections accordingly.

Addresses review feedback on #6601
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (human-triggered)

Simplified the scheduled agent example guide from 225 to ~110 lines per human reviewer's inline comments. Eliminated the build-matrix job (replaced with a matrix literal), removed the Posting status to an issue section, dropped dry_run complexity, and simplified all related sections.

Fixed (4):

  1. Remove build-matrix job, use matrix literal (docs/guides/user/scheduled-agent-example.md): Eliminated the build-matrix job entirely and passed a matrix JSON literal directly in the harness job's with: block, as requested by reviewer
  2. Remove Posting status to an issue section (docs/guides/user/scheduled-agent-example.md): Removed the entire section per reviewer comment ('This is too much detail. Just include the ISSUE_URL in the original example and omit this section.'). The ISSUE_URL was already in the main example from the previous iteration.
  3. Simplify workflow_dispatch inputs (docs/guides/user/scheduled-agent-example.md): Removed dry_run workflow_dispatch input and related DRY_RUN env wiring, which was unnecessary complexity in the build-matrix step that no longer exists
  4. Simplify How it works, Running multiple agents, and Tips sections (docs/guides/user/scheduled-agent-example.md): Updated all sections to reflect the simplified single-job workflow: shorter How it works description, simplified flow diagram, condensed Running multiple agents to a brief paragraph with cross-reference to custom-poller-example matrix format, and trimmed Tips

Tests: passed

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:21 PM UTC · Completed 6:36 PM UTC

Commit: 7527cc0 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.29

@fullsend-ai-review fullsend-ai-review Bot added risk/moderate PR risk: moderate and removed risk/low PR risk: low labels Aug 25, 2026
Comment on lines +36 to +42
permissions:
actions: write
contents: write
id-token: write
issues: write
packages: read
pull-requests: write

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really powerful permission set that probably needs a rationale...

And also, is really highlighting Fullsend's lack of a https://github.github.com/gh-aw/reference/safe-outputs/ equivalent (or reusing the code!).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On safe-outputs, we rely on a combination of declarative safety for the agent to (for example) limit agent activities to read-only but imperative safety in the post script that respects things like create_issues.allowed_repos to accomplish something similar to gh-aw's safe-outputs.create-issue.allowed-repos. That safe-outputs schema from gh-aw is clearer for a user to understand as things stand now.

On the permission set, agreed - let's document the rationale here or dilute it before this PR moves forwards.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to this and our private chat, I created #6614

uses: fullsend-ai/fullsend/.github/workflows/reusable-dispatch.yml@v0
with:
# Matrix literal — replace "my-nightly-agent" and "42" (see Prerequisites).
matrix: '{"include":[{"agent":"my-nightly-agent","source_repo":"${{ github.repository }}","role":"harness","event_payload":"{\"issue\":{\"html_url\":\"https://github.com/${{ github.repository }}/issues/42\",\"number\":42}}","status_repo":"","status_number":""}]}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agreed. Let's redo this APIbefore merging guidance to use it.

with:
# Matrix literal — replace "my-nightly-agent" and "42" (see Prerequisites).
matrix: '{"include":[{"agent":"my-nightly-agent","source_repo":"${{ github.repository }}","role":"harness","event_payload":"{\"issue\":{\"html_url\":\"https://github.com/${{ github.repository }}/issues/42\",\"number\":42}}","status_repo":"","status_number":""}]}'
mint_url: ${{ vars.FULLSEND_MINT_URL }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a failure trying

shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
    env:
      MINT_URL: https://......
      ROLE: harness
      REPOS: kdn
    
  Requesting token: role=harness repos=kdn
  curl: (22) The requested URL returned error: 403
  curl: (22) The requested URL returned error: 403

is that harness is the correct role to use ?

Comment on lines +19 to +20
2. **Repository variables and secrets** configured for fullsend (see [Variables and secrets](#variables-and-secrets) below).
3. **GCP Workload Identity Federation** provisioned for your repo — run [`fullsend inference provision`](../../cli/inference.md) first.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "fullsend installed" covers these two.

@rh-hemartin

Copy link
Copy Markdown
Member

@ralphbean remember to keep this healthy, the bot can only do so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/docs User-facing documentation ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

document the recommended way of running an agent every day (nightly job)

4 participants