This repository was archived by the owner on Jun 3, 2026. It is now read-only.
docs(designs): background tasks #66
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
| name: "Docs: Strands Command Handler" | |
| on: | |
| issue_comment: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| issue_id: | |
| description: 'Issue ID to process (can be issue or PR number)' | |
| required: true | |
| type: string | |
| command: | |
| description: 'Strands command to execute' | |
| required: false | |
| type: string | |
| default: '' | |
| session_id: | |
| description: 'Optional session ID to use' | |
| required: false | |
| type: string | |
| default: '' | |
| jobs: | |
| authorization-check: | |
| if: startsWith(github.event.comment.body, '/strands') || github.event_name == 'workflow_dispatch' | |
| name: Check access | |
| permissions: read-all | |
| runs-on: ubuntu-latest | |
| outputs: | |
| approval-env: ${{ steps.auth.outputs.approval-env }} | |
| steps: | |
| - name: Check Authorization | |
| id: auth | |
| uses: strands-agents/devtools/authorization-check@main | |
| with: | |
| skip-check: ${{ github.event_name == 'workflow_dispatch' }} | |
| username: ${{ github.event.comment.user.login || 'invalid' }} | |
| allowed-roles: 'triage,write,admin' | |
| setup-and-process: | |
| needs: [authorization-check] | |
| environment: ${{ needs.authorization-check.outputs.approval-env }} | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Parse input | |
| id: parse | |
| uses: strands-agents/devtools/strands-command/actions/strands-input-parser@main | |
| with: | |
| issue_id: ${{ inputs.issue_id }} | |
| command: ${{ inputs.command }} | |
| session_id: ${{ inputs.session_id }} | |
| execute-readonly-agent: | |
| needs: [setup-and-process] | |
| permissions: | |
| contents: read | |
| issues: read | |
| pull-requests: read | |
| id-token: write # Required for OIDC | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Run Strands Agent | |
| id: agent-runner | |
| uses: strands-agents/devtools/strands-command/actions/strands-agent-runner@main | |
| with: | |
| aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} | |
| sessions_bucket: ${{ secrets.AGENT_SESSIONS_BUCKET }} | |
| write_permission: 'false' | |
| langfuse_public_key: ${{ secrets.LANGFUSE_PUBLIC_KEY }} | |
| langfuse_secret_key: ${{ secrets.LANGFUSE_SECRET_KEY }} | |
| langfuse_host: ${{ secrets.LANGFUSE_HOST }} | |
| evals_sqs_queue_arn: ${{ secrets.EVALS_SQS_QUEUE_ARN }} | |
| finalize: | |
| if: always() && (startsWith(github.event.comment.body, '/strands') || github.event_name == 'workflow_dispatch') | |
| needs: [setup-and-process, execute-readonly-agent] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Execute write operations | |
| uses: strands-agents/devtools/strands-command/actions/strands-finalize@main |