Skip to content

feat: add upsert-agent-configuration method - #3

Merged
JulesBelveze merged 5 commits into
mainfrom
feat/agent-action
Apr 3, 2026
Merged

feat: add upsert-agent-configuration method#3
JulesBelveze merged 5 commits into
mainfrom
feat/agent-action

Conversation

@JulesBelveze

@JulesBelveze JulesBelveze commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new upsert-agent-configs method to the Dust GitHub Action for syncing agent configuration YAML files from repositories to Dust workspaces. The method searches for existing agents by handle name and updates them if found, or creates new ones otherwise. This enables GitOps-style workflows for managing Dust agents alongside the existing skills sync functionality. The PR also refactors the fetchWithRetry utility into a shared module for reuse across methods.

Tests

  • Added CI workflow test job for upsert-agent-configs using fixture YAML files
  • Verified output JSON structure in GitHub Actions
  • Tested locally with agent config files

Risk

Low - adds new functionality without modifying existing upsert-skills method.

Deploy Plan

Merge and tag new version once proven to work

 - provides a reusable fetch wrapper that retries on server errors with exponential backoff
 - helps make API requests more robust against transient outages and rate limiting
…ent yaml configs

 - introduce upsert-agent-configs action to sync agent configuration YAML files to Dust workspace
 - support glob patterns for agent-configs input and parse each YAML using js-yaml
 - update documentation and action metadata to describe new method and its options
 - output counts of imported and updated agent configs for feedback in action runs
 - refactor fetch with retry logic into a utility file for reuse
… agent configs

 - Introduces upsert-agent-configs utility to import and update agent YAML files to a Dust workspace via API
 - Handles glob resolution, YAML parsing, error tracking, and differentiates between creation and update based on agent handle
 - Outputs summary, details, and warnings for improved observability during sync operations
 - Adds a new CI job to test the upsert-agent-configs method using fixture YAML files
 - Ensures that agent config upsertion outputs valid JSON in Github Actions

[test] - test: add fixture for hello-world agent config

 - Provides a sample agent YAML file for CI tests of upsert-agent-configs
 - Allows end-to-end validation of agent configuration workflow steps
Comment thread src/methods/upsert-agent-configs.js Outdated
}

try {
const existingSId = await findAgentByHandle(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit

Suggested change
const existingSId = await findAgentByHandle(
const existingId = await findAgentByHandle(

Comment on lines +8 to +10
- email: jules@dust.tt
full_name: Jules Belveze
user_id: yzjnC7yZUD

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as per IRL: would be nice to change the endpoint to only have an array of emails here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup yup - doing in a follow up PR as it requires changes on the dust side

 - fixes a typo by changing "existingSId" to "existingId" to match function return
 - ensures correct variable is used for agent update operations
@JulesBelveze
JulesBelveze merged commit 5b2ce99 into main Apr 3, 2026
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