feat(actors): add BatchProcessingMode to ActorConfiguration for Claude batch API support #4928

Open
opened 2026-04-08 22:59:47 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: feat(actors): add BatchProcessingMode to ActorConfiguration for Claude batch API support
  • Branch: feature/m9-claude-batch-mode
  • Milestone: v3.8.0
  • Parent Epic: #1251

Background and Context

Claude's Batch Processing API allows requests to be submitted asynchronously at half the cost of synchronous requests, with responses delivered within 24 hours. To support this, the ActorConfiguration domain model needs a new batch_processing field that actors can use to opt into batch mode when cost efficiency is preferred over immediate response.

This is the foundational data model change that enables all other batch processing features.

Expected Behavior

  • ActorConfiguration has a new optional batch_processing: bool field (default False)
  • When batch_processing=True, the actor signals that it should use Claude's Batch API
  • The YAML actor configuration format supports batch_processing: true
  • The field is validated and serialized/deserialized correctly
  • The ActorLoader reads and applies the batch_processing field from YAML

Acceptance Criteria

  • ActorConfiguration dataclass/model has batch_processing: bool = False field
  • YAML actor config supports batch_processing: true/false
  • ActorLoader.load() reads batch_processing from YAML and sets it on ActorConfiguration
  • Type annotations are complete and Pyright passes
  • Existing actor YAML files continue to work without modification (backward compatible)

Supporting Information

Subtasks

  • Add batch_processing: bool = False field to ActorConfiguration model
  • Update ActorLoader to read batch_processing from YAML config
  • Add type annotations and ensure Pyright passes
  • Tests (Behave): Add scenarios for batch_processing field loading from YAML
  • Tests (Behave): Add scenarios for default value when field is absent
  • Tests (Robot): Add integration test for actor config with batch_processing flag
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Metadata - **Commit Message**: `feat(actors): add BatchProcessingMode to ActorConfiguration for Claude batch API support` - **Branch**: `feature/m9-claude-batch-mode` - **Milestone**: v3.8.0 - **Parent Epic**: #1251 ## Background and Context Claude's Batch Processing API allows requests to be submitted asynchronously at half the cost of synchronous requests, with responses delivered within 24 hours. To support this, the `ActorConfiguration` domain model needs a new `batch_processing` field that actors can use to opt into batch mode when cost efficiency is preferred over immediate response. This is the foundational data model change that enables all other batch processing features. ## Expected Behavior - `ActorConfiguration` has a new optional `batch_processing: bool` field (default `False`) - When `batch_processing=True`, the actor signals that it should use Claude's Batch API - The YAML actor configuration format supports `batch_processing: true` - The field is validated and serialized/deserialized correctly - The `ActorLoader` reads and applies the `batch_processing` field from YAML ## Acceptance Criteria - [ ] `ActorConfiguration` dataclass/model has `batch_processing: bool = False` field - [ ] YAML actor config supports `batch_processing: true/false` - [ ] `ActorLoader.load()` reads `batch_processing` from YAML and sets it on `ActorConfiguration` - [ ] Type annotations are complete and Pyright passes - [ ] Existing actor YAML files continue to work without modification (backward compatible) ## Supporting Information - Claude Batch Processing API: https://platform.claude.com/docs/en/build-with-claude/batch-processing - Parent Epic: #1251 (CleverAgents should support Claude's batch processing) ## Subtasks - [ ] Add `batch_processing: bool = False` field to `ActorConfiguration` model - [ ] Update `ActorLoader` to read `batch_processing` from YAML config - [ ] Add type annotations and ensure Pyright passes - [ ] Tests (Behave): Add scenarios for `batch_processing` field loading from YAML - [ ] Tests (Behave): Add scenarios for default value when field is absent - [ ] Tests (Robot): Add integration test for actor config with batch_processing flag - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.8.0 milestone 2026-04-08 23:00:45 +00:00
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — Claude batch API support is a cost-optimization feature, not blocking core functionality
  • Milestone: v3.8.0 (already assigned correctly)
  • Story Points: 3 — M — Adding a new optional field to ActorConfiguration with proper defaults and validation is a medium-sized task
  • MoSCoW: Should Have — Batch processing reduces cost by 50% which is important for production efficiency, but not blocking core agent functionality
  • Parent Epic: #1251 (as noted in issue metadata)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — Claude batch API support is a cost-optimization feature, not blocking core functionality - **Milestone**: v3.8.0 (already assigned correctly) - **Story Points**: 3 — M — Adding a new optional field to ActorConfiguration with proper defaults and validation is a medium-sized task - **MoSCoW**: Should Have — Batch processing reduces cost by 50% which is important for production efficiency, but not blocking core agent functionality - **Parent Epic**: #1251 (as noted in issue metadata) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#4928
No description provided.