Skip to content

Conversation

@solaris007
Copy link
Member

@solaris007 solaris007 commented Nov 16, 2025

Overview

  • The task processor now supports both asynchronous SQS-triggered execution and direct synchronous invocations (e.g., from Step Functions) while keeping the existing handler pipeline intact.
  • Brand-profile agents and future “agent” workloads can run via the new path, enabling workflows to wait for results before moving on to Slack notifications or other states.

Motivation

  • Agent workflows require deterministic sequencing and access to the agent’s output. Relying solely on SQS meant downstream steps (like Slack notifications) couldn’t see whether the agent succeeded. Direct invocation solves that while maintaining backward compatibility with existing SQS flows.

Key Changes

  • Refactored src/index.js so message processing lives in processTask, wrapped twice: once with the existing sqsEventAdapter pipeline, and once without. The exported main auto-detects event shape (Records vs single payload) and routes to the appropriate handler.
  • Added a README section describing both invocation modes (SQS and direct) and preserved the Azure env guidance for agent executor users.
  • Updated test/index.test.js with a direct invocation scenario to ensure the new path works.
  • (Earlier changes retained) — agent executor/slack-notify handlers, brand-profile agent + prompts, registry, unit coverage, integration test, test:brand-profile-it script, README sections for handlers/env vars.

Testing

  • npm test
  • npm run test:brand-profile-it (with BRAND_PROFILE_IT=1 and Azure env vars) to exercise the direct agent path.

This keeps legacy SQS consumers untouched while enabling Step Functions to call the same Lambda synchronously.

@solaris007 solaris007 self-assigned this Nov 16, 2025
@solaris007 solaris007 added the enhancement New feature or request label Nov 16, 2025
@solaris007 solaris007 changed the title Feat agent executor feat: agent executor Nov 16, 2025
@github-actions
Copy link

This PR will trigger a minor release when merged.

@solaris007
Copy link
Member Author

i will have to merge without review due to time pressure (cc @dzehnder for post-factum review)

@solaris007 solaris007 merged commit 6a14e06 into main Nov 16, 2025
8 checks passed
@solaris007 solaris007 deleted the feat-agent-executor branch November 16, 2025 15:06
solaris007 pushed a commit that referenced this pull request Nov 16, 2025
# [1.6.0](v1.5.4...v1.6.0) (2025-11-16)

### Features

* agent executor ([#132](#132)) ([6a14e06](6a14e06))
@solaris007
Copy link
Member Author

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants