Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 30, 2026

[TRIAL] feat: add experimental Svelte support

Summary

This PR adds experimental Svelte support to the Agentuity SDK. This is a trial implementation and should be reviewed carefully before considering for merge.

The changes include:

  1. New @agentuity/svelte package - Client library with createClient, createAPIClient, and context initialization functions (initAgentuity, setAuthHeader, setBaseUrl). Uses global state management similar to @agentuity/react.

  2. Build system changes - Modified vite-builder.ts to detect Svelte projects (by checking for .svelte files or svelte in package.json) and dynamically load @sveltejs/vite-plugin-svelte instead of the React plugin.

  3. Registry generator updates - Added module augmentation for @agentuity/svelte in registry-generator.ts so route types are available in Svelte projects.

  4. Svelte example - Example project at examples/svelte/ with a hello agent and Svelte 5 component demonstrating API client usage. (Note: This is an example, not a template - it won't appear in agentuity create.)

Updates since last revision

  • Moved Svelte from templates/svelte/ to examples/svelte/ per review feedback
  • Removed Svelte entry from templates/templates.json (only one template should exist in this repo)
  • Removed svelte from template integration test packing

Review & Testing Checklist for Human

  • Test Svelte build manually: Copy examples/svelte/ to a new project, add dependencies, and verify agentuity build works
  • Test React projects still work: Ensure existing React projects build correctly (the detection logic should fall back to React)
  • Verify workbench builds: The workbench always uses React - confirm it still builds after the dynamic import changes in vite-builder.ts
  • Review global state approach: The Svelte package uses module-level globals for baseUrl/authHeader - verify this is acceptable

Recommended test plan:

  1. Create a standard React project with agentuity create and verify it works
  2. Manually set up a Svelte project using examples/svelte/ as reference
  3. Run agentuity dev on the Svelte project and verify the build succeeds
  4. Verify the workbench UI still loads correctly in both project types

Notes

  • This uses Svelte 5 syntax ($state, mount from 'svelte') - not compatible with Svelte 4
  • No unit tests added for the new package yet
  • The example in examples/svelte/ is a reference implementation, not a scaffoldable template
  • CI template tests only run the default template now (svelte was removed from template testing)

Link to Devin run: https://app.devin.ai/sessions/3d30dacf70bf47b5b085563f22a8c0f5
Requested by: @Huijiro

This is a trial implementation of Svelte support for the Agentuity SDK.

Changes:
- Add @agentuity/svelte package with client and context utilities
- Update vite-builder.ts to detect and use Svelte plugin for Svelte projects
- Update registry-generator.ts to add module augmentation for @agentuity/svelte
- Add Svelte template with example agent and API route
- Update templates.json to include Svelte template option

Note: This is an experimental feature and should be reviewed carefully.
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

📦 Canary Packages Published

version: 0.1.39-13702a6

Packages
Package Version URL
@agentuity/server 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-server-0.1.39-13702a6.tgz
@agentuity/frontend 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-frontend-0.1.39-13702a6.tgz
@agentuity/runtime 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-runtime-0.1.39-13702a6.tgz
@agentuity/svelte 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-svelte-0.1.39-13702a6.tgz
@agentuity/core 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-core-0.1.39-13702a6.tgz
@agentuity/opencode 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-opencode-0.1.39-13702a6.tgz
@agentuity/cli 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-cli-0.1.39-13702a6.tgz
@agentuity/evals 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-evals-0.1.39-13702a6.tgz
@agentuity/react 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-react-0.1.39-13702a6.tgz
@agentuity/schema 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-schema-0.1.39-13702a6.tgz
@agentuity/workbench 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-workbench-0.1.39-13702a6.tgz
@agentuity/auth 0.1.39-13702a6 https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-auth-0.1.39-13702a6.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-server-0.1.39-13702a6.tgz",
    "@agentuity/frontend": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-frontend-0.1.39-13702a6.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-runtime-0.1.39-13702a6.tgz",
    "@agentuity/svelte": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-svelte-0.1.39-13702a6.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-core-0.1.39-13702a6.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-opencode-0.1.39-13702a6.tgz",
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-cli-0.1.39-13702a6.tgz",
    "@agentuity/evals": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-evals-0.1.39-13702a6.tgz",
    "@agentuity/react": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-react-0.1.39-13702a6.tgz",
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-schema-0.1.39-13702a6.tgz",
    "@agentuity/workbench": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-workbench-0.1.39-13702a6.tgz",
    "@agentuity/auth": "https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-auth-0.1.39-13702a6.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-server-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-frontend-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-runtime-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-svelte-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-core-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-opencode-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-cli-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-evals-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-react-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-schema-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-workbench-0.1.39-13702a6.tgz
bun add https://agentuity-sdk-objects.t3.storage.dev/npm/0.1.39-13702a6/agentuity-auth-0.1.39-13702a6.tgz

devin-ai-integration bot and others added 3 commits January 30, 2026 01:52
This ensures the @agentuity/svelte package is built during the TypeScript
build step, which is required for CI verification.

Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
This ensures the @agentuity/svelte package is packed and available
for template integration tests, fixing the 404 error when testing
the Svelte template.

Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
"name": "Default Template",
"description": "Showcases core Agentuity features using OpenAI SDK",
"directory": "default"
},
Copy link
Member

Choose a reason for hiding this comment

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

we only want to have one template in this repo so remove this and the template and move to examples folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! I've moved the Svelte template from templates/svelte/ to examples/svelte/ and removed it from templates.json. The @agentuity/svelte package remains in packages/svelte/ for projects that want to use Svelte.

devin-ai-integration bot and others added 2 commits January 30, 2026 15:53
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
Co-Authored-By: grodrigues@agentuity.com <huijirohankei@gmail.com>
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