create-agentuity 3.0.0-beta.0 → 3.0.0-beta.2
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.
- package/README.md +34 -123
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
# {{PROJECT_NAME}}
|
|
2
|
-
|
|
3
1
|
# create-agentuity
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Scaffold a new Agentuity project with one command. This package is a thin
|
|
4
|
+
launcher that delegates to `@agentuity/cli`'s `project create` flow.
|
|
6
5
|
|
|
7
6
|
## Usage
|
|
8
7
|
|
|
@@ -12,141 +11,53 @@ cd my-project
|
|
|
12
11
|
bun run dev
|
|
13
12
|
```
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## What You Get
|
|
18
|
-
|
|
19
|
-
A fully configured Agentuity project with:
|
|
20
|
-
|
|
21
|
-
- ✅ **TypeScript** - Full type safety out of the box
|
|
22
|
-
- ✅ **Bun runtime** - Fast JavaScript runtime and package manager
|
|
23
|
-
- ✅ **Hot reload** - Development server with auto-rebuild
|
|
24
|
-
- ✅ **Example agent** - Sample "hello" agent to get started
|
|
25
|
-
- ✅ **React frontend** - Pre-configured web interface
|
|
26
|
-
- ✅ **API routes** - Example API endpoints
|
|
27
|
-
- ✅ **Type checking** - TypeScript configuration ready to go
|
|
28
|
-
|
|
29
|
-
## Project Structure
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
my-app/
|
|
33
|
-
├── src/
|
|
34
|
-
│ ├── agent/ # Agent definitions
|
|
35
|
-
│ │ └── hello/
|
|
36
|
-
│ │ └── agent.ts # Example agent
|
|
37
|
-
│ ├── api/ # Custom API routes
|
|
38
|
-
│ │ └── route.ts # Example route
|
|
39
|
-
│ └── web/ # React web application
|
|
40
|
-
│ └── app.tsx # Main React component
|
|
41
|
-
├── app.ts # Application entry point
|
|
42
|
-
├── tsconfig.json # TypeScript configuration
|
|
43
|
-
├── package.json # Dependencies and scripts
|
|
44
|
-
└── README.md # Project documentation
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Available Commands
|
|
48
|
-
|
|
49
|
-
After creating your project, you can run:
|
|
50
|
-
|
|
51
|
-
### Development
|
|
14
|
+
Or with npm:
|
|
52
15
|
|
|
53
16
|
```bash
|
|
54
|
-
|
|
17
|
+
npm create agentuity@latest my-project
|
|
55
18
|
```
|
|
56
19
|
|
|
57
|
-
|
|
20
|
+
## What you get
|
|
58
21
|
|
|
59
|
-
|
|
22
|
+
`agentuity project create` scaffolds a project using the official CLI for the
|
|
23
|
+
framework you pick (Next.js, Nuxt, Remix, SvelteKit, Astro, Hono, or
|
|
24
|
+
Vite + React) and overlays:
|
|
60
25
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
26
|
+
- **AI translation demo** — a working `/translate` endpoint plus landing page
|
|
27
|
+
using the [AI SDK](https://sdk.vercel.ai) and `@ai-sdk/openai`.
|
|
28
|
+
- **Agentuity wiring** — `@agentuity/cli` as a devDependency, a `deploy`
|
|
29
|
+
script, the Agentuity badge on the landing page, and `.gitignore` entries.
|
|
30
|
+
- **Optional service augments** — a multi-select prompts you to add any of
|
|
31
|
+
DB (Postgres + Drizzle), KeyValue, Queue, Vector, or Storage. Each
|
|
32
|
+
augment composes into the translate demo so you see the service working
|
|
33
|
+
in context (e.g. cached translations, history panel, similar-translation
|
|
34
|
+
search) instead of a separate playground page.
|
|
64
35
|
|
|
65
|
-
|
|
36
|
+
The output project is plain framework code — no Agentuity runtime imports,
|
|
37
|
+
no `createApp()`, no agent registry. You bring the framework, Agentuity
|
|
38
|
+
provides the deploy pipeline and service clients.
|
|
66
39
|
|
|
67
|
-
|
|
40
|
+
## Available scripts in the generated project
|
|
68
41
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Runs TypeScript type checking
|
|
74
|
-
|
|
75
|
-
## Next Steps
|
|
76
|
-
|
|
77
|
-
After creating your project:
|
|
78
|
-
|
|
79
|
-
1. **Customize the example agent** - Edit `src/agent/hello/agent.ts`
|
|
80
|
-
2. **Add new agents** - Create new folders in `src/agent/`
|
|
81
|
-
3. **Add API routes** - Create new routes in `src/web/`
|
|
82
|
-
4. **Customize the UI** - Edit `src/web/app.tsx`
|
|
83
|
-
5. **Configure your app** - Modify `app.ts` to add middleware, configure services, etc.
|
|
84
|
-
|
|
85
|
-
## Creating Custom Agents
|
|
86
|
-
|
|
87
|
-
Create a new agent by adding a folder in `src/agent/`:
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
// src/agent/my-agent/agent.ts
|
|
91
|
-
import { createAgent } from '@agentuity/runtime';
|
|
92
|
-
import { s } from '@agentuity/schema';
|
|
93
|
-
|
|
94
|
-
const agent = createAgent({
|
|
95
|
-
metadata: {
|
|
96
|
-
description: 'My amazing agent',
|
|
97
|
-
},
|
|
98
|
-
schema: {
|
|
99
|
-
input: s.object({
|
|
100
|
-
message: s.string(),
|
|
101
|
-
}),
|
|
102
|
-
output: s.object({
|
|
103
|
-
response: s.string(),
|
|
104
|
-
}),
|
|
105
|
-
},
|
|
106
|
-
handler: async (ctx, input) => {
|
|
107
|
-
return { response: `Processed: ${input.message}` };
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
export default agent;
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Adding API Routes
|
|
115
|
-
|
|
116
|
-
Create custom routes in `src/api/`:
|
|
117
|
-
|
|
118
|
-
```typescript
|
|
119
|
-
// src/api/my-route/route.ts
|
|
120
|
-
import { createRouter } from '@agentuity/runtime';
|
|
121
|
-
import myAgent from '../../agent/my-agent/agent';
|
|
42
|
+
The exact scripts depend on the framework you pick (the official CLI's own
|
|
43
|
+
defaults are preserved). Every project gets at least:
|
|
122
44
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return c.json(result);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
router.post('/', myAgent.validator(), async (c) => {
|
|
131
|
-
const data = c.req.valid('json');
|
|
132
|
-
const result = await myAgent.run(data);
|
|
133
|
-
return c.json(result);
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
export default router;
|
|
45
|
+
```bash
|
|
46
|
+
bun run dev # Run the framework's dev server with AI Gateway env
|
|
47
|
+
bun run build # Framework build
|
|
48
|
+
agentuity deploy # Deploy to Agentuity Cloud
|
|
137
49
|
```
|
|
138
50
|
|
|
139
|
-
##
|
|
51
|
+
## Requirements
|
|
140
52
|
|
|
141
|
-
- [
|
|
142
|
-
- [
|
|
143
|
-
|
|
144
|
-
- [Zod Documentation](https://zod.dev/)
|
|
53
|
+
- [Bun](https://bun.sh/) 1.3+ or Node.js 24+
|
|
54
|
+
- An [Agentuity](https://agentuity.com) account (sign in via `agentuity login`
|
|
55
|
+
before running `agentuity deploy`)
|
|
145
56
|
|
|
146
|
-
##
|
|
57
|
+
## See also
|
|
147
58
|
|
|
148
|
-
- [
|
|
149
|
-
-
|
|
59
|
+
- [`@agentuity/cli`](https://www.npmjs.com/package/@agentuity/cli) — the underlying CLI
|
|
60
|
+
- [Agentuity docs](https://agentuity.dev)
|
|
150
61
|
|
|
151
62
|
## License
|
|
152
63
|
|