Skip to content
Open
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
17 changes: 17 additions & 0 deletions actions/agent-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ 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.3.0] - 2026-03-20

### Added

- New `sema4_api_url` Secret parameter to all actions, enabling explicit API URL configuration
- New `create_work_items_for_agent()` action for batch-creating multiple Work Items for an agent in one call
- New `get_current_conversation_id()` action to retrieve the current thread/conversation ID for passing to worker agents
- Snowflake deployment support: URL normalization and `Snowflake Token` auth header for `snowflakecomputing` endpoints
- Auto-detection fallback: when `SEMA4AI_API_V1_URL` env var is set, explicit URL is ignored in favor of auto-detection
- Better JSON parse error reporting with status code and response body on failed API responses

### Changed

- `_AgentAPIClient` now accepts an optional `api_url` parameter alongside `api_key`
- `create_work_item_for_agent()` derives Work Item API URL from `sema4_api_url` instead of a separate `work_item_api_url` parameter (removed)
- Auth header logic extracted to `_get_auth_header()` helper, used consistently across all request paths

### [4.2.1] - 2026-02-10

### Changed
Expand Down
38 changes: 35 additions & 3 deletions actions/agent-connector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ The easiest way to interact with agents is using the `ask_agent` function:

**Work Items:**
- Create a Work Item for an agent by name
- Create multiple Work Items in a single batch call
- Get the current conversation ID (for passing back to a parent agent)

## Example Usage

Expand Down Expand Up @@ -80,6 +82,28 @@ If an attachment path is not found locally, the action will try to fetch it from
Create a work item for "Invoice Worker" with payload {"invoice_id": "IN-100017"} and attachments ["ad03f9489278c8e19d01ea5e05ee0aeb.pdf"]
```

### Create Multiple Work Items in One Call

Use `create_work_items_for_agent` to dispatch several items at once. Each entry can have its own message, payload, and attachments:

```
Create work items for "Invoice Agent":
[
{"message": "Process invoice IN-001", "payload": {"invoice_id": "IN-001"}},
{"message": "Process invoice IN-002", "payload": {"invoice_id": "IN-002"}, "attachments": ["IN-002.pdf"]}
]
```

The `message` field is automatically merged into the payload so the worker receives it as `payload["message"]`.

### Pass the Current Conversation ID to Worker Agents

When orchestrating workers, use `get_current_conversation_id` to retrieve the calling conversation's ID and include it in the work item payload so workers can send replies back:

```
Get the current conversation ID and create a work item for "Summarizer Agent" with payload {"conversation_id": "<id>", "document": "report.pdf"}
```

### Intelligent Suggestions

If you mistype an agent name, the system will suggest the closest match:
Expand Down Expand Up @@ -109,10 +133,18 @@ For more control, you can also use the individual actions:
2. **Conversation Management**: Create conversations manually or retrieve existing ones
3. **Message Sending**: Send messages to specific conversations with full control over the process

### Authentication
### Authentication & API URL

All actions require two Secret parameters:

| Parameter | Description |
|---|---|
| `sema4_api_key` | API key for the Sema4 API. Use `LOCAL` when running in Studio or SDK. |
| `sema4_api_url` | Base URL for the Sema4 API. Use `LOCAL` when running in Studio or SDK. |

- **Cloud Environment**: Uses Bearer token authentication with your API key
- **Local Development**: Use "LOCAL" as the API key value (no authentication required)
- **Cloud Environment**: Provide your API key and the deployment base URL (e.g. `https://your-tenant.sema4.ai`).
- **Snowflake Environment**: Provide the Snowflake endpoint URL — the connector automatically uses `Snowflake Token` authentication and normalises the URL to end with `/api/v1`.
- **Local Development**: Use `LOCAL` for both values — the connector discovers the agent server automatically via environment variable or PID file.

### Intelligent Features

Expand Down
Loading
Loading