create-agentuity 0.0.101 → 0.0.103

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 +8 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -31,10 +31,10 @@ A fully configured Agentuity project with:
31
31
  ```
32
32
  my-app/
33
33
  ├── src/
34
- │ ├── agents/ # Agent definitions
34
+ │ ├── agent/ # Agent definitions
35
35
  │ │ └── hello/
36
36
  │ │ └── agent.ts # Example agent
37
- │ ├── apis/ # Custom API routes
37
+ │ ├── api/ # Custom API routes
38
38
  │ │ └── route.ts # Example route
39
39
  │ └── web/ # React web application
40
40
  │ └── app.tsx # Main React component
@@ -113,23 +113,23 @@ export default agent;
113
113
 
114
114
  ## Adding API Routes
115
115
 
116
- Create custom routes in `src/web/` or add routes to an agent folder:
116
+ Create custom routes in `src/api/`:
117
117
 
118
118
  ```typescript
119
- // src/agent/my-agent/route.ts
119
+ // src/api/my-route/route.ts
120
120
  import { createRouter } from '@agentuity/runtime';
121
- import agent from './agent';
121
+ import myAgent from '../../agent/my-agent/agent';
122
122
 
123
123
  const router = createRouter();
124
124
 
125
125
  router.get('/', async (c) => {
126
- const result = await c.agent.myAgent.run({ message: 'Hello!' });
126
+ const result = await myAgent.run({ message: 'Hello!' });
127
127
  return c.json(result);
128
128
  });
129
129
 
130
- router.post('/', agent.validator(), async (c) => {
130
+ router.post('/', myAgent.validator(), async (c) => {
131
131
  const data = c.req.valid('json');
132
- const result = await c.agent.myAgent.run(data);
132
+ const result = await myAgent.run(data);
133
133
  return c.json(result);
134
134
  });
135
135
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agentuity",
3
- "version": "0.0.101",
3
+ "version": "0.0.103",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Agentuity employees and contributors",
6
6
  "description": "Create a new Agentuity project",