Skip to content

Agent Connector: Use WorkItemPayload model for create_work_item_for_agent#269

Merged
mikahanninen merged 1 commit intomainfrom
agent-connector-payload-model
Feb 10, 2026
Merged

Agent Connector: Use WorkItemPayload model for create_work_item_for_agent#269
mikahanninen merged 1 commit intomainfrom
agent-connector-payload-model

Conversation

@mikahanninen
Copy link
Contributor

@mikahanninen mikahanninen commented Feb 10, 2026

Summary

The payload parameter type dict is causing problems in tool discovery and recognition between the action server and the agent server.

Below is an example of agent reasoning, which eventually can cause unwanted disruption (manual input from the user) in the agent flow, which is meant to run automatically after initial input

Adapting to tool limitations

I've noticed that the API signature for functions.create_work_item_for_agent only requires agent_name, an attachments list, and the work_item_api_url. There's a mismatch between the tool's definition and what the Runbook Step 8 suggests. The tool doesn’t allow for payload fields, which limits what I can send.

Although the Runbook provides an extended signature, I need to follow the tool reference closely. I can still create a work item using the agent name and attachments, and I'll assume the context may be added automatically. After success, I’ll categorize the emails based on classification.

  • Changed create_work_item_for_agent() payload parameter from dict to WorkItemPayload Pydantic model
  • WorkItemPayload uses ConfigDict(extra="allow") for flexible payload structure
  • Updated sema4ai-actions to 1.6.6
  • Bumped version to 4.2.1

Test plan

  • Test create_work_item_for_agent() with various payload structures
  • Verify extra properties are passed through correctly

🤖 Generated with Claude Code

Copy link
Contributor

@raivolink raivolink left a comment

Choose a reason for hiding this comment

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

LGTM

@mikahanninen mikahanninen merged commit f698ac3 into main Feb 10, 2026
7 checks passed
@mikahanninen mikahanninen deleted the agent-connector-payload-model branch February 10, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants