@axlsdk/studio 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -29
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -22,41 +22,40 @@ npx @axlsdk/studio
22
22
 
23
23
  ### 1. Create a config file
24
24
 
25
- Studio needs an `axl.config.ts` that exports an `AxlRuntime` as the default export. Register your workflows, agents, and tools so Studio can discover them:
25
+ Studio needs an `axl.config.ts` at your project root that default-exports an `AxlRuntime`. The recommended pattern is to keep your tools, agents, workflows, and runtime in your application code, then re-export the runtime for Studio to discover:
26
+
27
+ ```
28
+ src/
29
+ config.ts — defineConfig (providers, state, trace)
30
+ runtime.ts — creates AxlRuntime, registers everything
31
+ tools/ — tool definitions (wrap your services)
32
+ agents/ — agent definitions (import their tools)
33
+ workflows/ — workflow definitions (orchestrate agents)
34
+ axl.config.ts — re-exports runtime for Studio
35
+ ```
26
36
 
27
37
  ```typescript
28
- // axl.config.ts
29
- import { AxlRuntime, agent, tool, workflow } from '@axlsdk/axl';
30
- import { z } from 'zod';
31
-
32
- const getWeather = tool({
33
- name: 'get_weather',
34
- description: 'Get weather for a city',
35
- input: z.object({ city: z.string() }),
36
- handler: async ({ city }) => ({ city, temp: 72, condition: 'sunny' }),
37
- });
38
-
39
- const assistant = agent({
40
- name: 'assistant',
41
- model: 'openai-responses:gpt-5.4',
42
- system: 'You are a helpful assistant.',
43
- tools: [getWeather],
44
- });
45
-
46
- const chat = workflow({
47
- name: 'chat',
48
- input: z.object({ message: z.string() }),
49
- handler: async (ctx) => ctx.ask(assistant, ctx.input.message),
50
- });
51
-
52
- const runtime = new AxlRuntime();
53
- runtime.register(chat);
54
- runtime.registerAgent(assistant);
55
- runtime.registerTool(getWeather);
38
+ // src/runtime.ts
39
+ import { AxlRuntime } from '@axlsdk/axl';
40
+ import { config } from './config.js';
41
+ import { handleTicket } from './workflows/handle-ticket.js';
42
+ import { supportAgent } from './agents/support.js';
43
+ import { lookupOrder } from './tools/db.js';
44
+
45
+ export const runtime = new AxlRuntime(config);
46
+ runtime.register(handleTicket);
47
+ runtime.registerAgent(supportAgent);
48
+ runtime.registerTool(lookupOrder);
49
+ ```
56
50
 
51
+ ```typescript
52
+ // axl.config.ts — thin entry point for Studio
53
+ import { runtime } from './src/runtime.js';
57
54
  export default runtime;
58
55
  ```
59
56
 
57
+ Your application imports from `src/runtime.ts` directly. Studio discovers everything via `axl.config.ts`. See the [`@axlsdk/axl` README](../axl/README.md#project-structure) for the full recommended project structure.
58
+
60
59
  ### 2. Start Studio
61
60
 
62
61
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axlsdk/studio",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Local development UI for debugging, testing, and iterating on Axl agents and workflows",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.cjs",
@@ -29,7 +29,7 @@
29
29
  "@hono/node-server": "^1.13.0",
30
30
  "@hono/node-ws": "^1.1.0",
31
31
  "tsx": "^4.19.0",
32
- "@axlsdk/axl": "0.6.0"
32
+ "@axlsdk/axl": "0.7.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@tailwindcss/vite": "^4.1.0",
@@ -49,10 +49,10 @@
49
49
  "vite": "^6.0.0",
50
50
  "vitest": "^3.0.0",
51
51
  "zod": "^3.24.0",
52
- "@axlsdk/testing": "0.6.0"
52
+ "@axlsdk/testing": "0.7.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@axlsdk/eval": "0.6.0"
55
+ "@axlsdk/eval": "0.7.0"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@axlsdk/eval": {