Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion actions/agent-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

### [4.2.0] - 2026-01-27
### [4.2.1] - 2026-02-10

### Changed

- Updated `create_work_item_for_agent()` payload parameter from `dict` to `WorkItemPayload` Pydantic model with `extra="allow"` for flexible payload structure
- Updated sema4ai-actions to `1.6.6`

### [4.1.1] - 2026-01-27

### Added

Expand Down
14 changes: 10 additions & 4 deletions actions/agent-connector/actions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from sema4ai.actions import (
ActionError,
Response,
Expand Down Expand Up @@ -115,6 +115,12 @@ class WorkItemResponse(BaseModel):
agent_name: str
agent_id: str


class WorkItemPayload(BaseModel):
"""Payload for creating a work item. Accepts any additional properties."""

model_config = ConfigDict(extra="allow")

@action
def ask_agent(
agent_name: str,
Expand Down Expand Up @@ -312,7 +318,7 @@ def send_message(
@action
def create_work_item_for_agent(
agent_name: str,
payload: dict,
payload: WorkItemPayload,
sema4_api_key: Secret,
attachments: list[str] | None = None,
work_item_api_url: str | None = None,
Expand All @@ -321,7 +327,7 @@ def create_work_item_for_agent(

Args:
agent_name: The name of the agent to run the Work Item
payload: JSON payload to send as the Work Item payload
payload: JSON payload to send as the Work Item payload (any properties allowed)
sema4_api_key: The API key for the Sema4 API if running in cloud. Use LOCAL if in Studio or SDK!
attachments: Optional list of file paths to attach to the Work Item
work_item_api_url: Optional Work Item API URL override
Expand All @@ -337,7 +343,7 @@ def create_work_item_for_agent(
agent = agent_result.agent
work_item = client.create_work_item(
agent_id=agent.id,
payload=payload,
payload=payload.model_dump(exclude_none=True),
attachments=attachments,
work_item_api_url=work_item_api_url,
)
Expand Down
4 changes: 2 additions & 2 deletions actions/agent-connector/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Agent Connector
description: Actions to connect agents with each other

# Package version number, recommend using semver.org
version: 4.1.1
version: 4.2.1

# The version of the `package.yaml` format.
spec-version: v2
Expand All @@ -18,7 +18,7 @@ dependencies:
- python=3.11.11
- uv=0.6.11
pypi:
- sema4ai-actions=1.4.2
- sema4ai-actions=1.6.6

packaging:
# By default, all files and folders in this directory are packaged when uploaded.
Expand Down