Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-agentuity) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
{{PROJECT_NAME}}
create-agentuity
Create a new Agentuity project with one command.
Usage
bun create agentuity my-project
cd my-project
bun run devTemplates are automatically downloaded from the latest version in the GitHub repository.
What You Get
A fully configured Agentuity project with:
- ✅ TypeScript - Full type safety out of the box
- ✅ Bun runtime - Fast JavaScript runtime and package manager
- ✅ Hot reload - Development server with auto-rebuild
- ✅ Example agent - Sample "hello" agent to get started
- ✅ React frontend - Pre-configured web interface
- ✅ API routes - Example API endpoints
- ✅ Type checking - TypeScript configuration ready to go
Project Structure
my-app/
├── src/
│ ├── agents/ # Agent definitions
│ │ └── hello/
│ │ └── agent.ts # Example agent
│ ├── apis/ # Custom API routes
│ │ └── route.ts # Example route
│ └── web/ # React web application
│ └── app.tsx # Main React component
├── app.ts # Application entry point
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies and scripts
└── README.md # Project documentationAvailable Commands
After creating your project, you can run:
Development
bun run devStarts the development server at http://localhost:3500
Build
bun run buildCompiles your application into the .agentuity/ directory
Type Check
bun run typecheckRuns TypeScript type checking
Next Steps
After creating your project:
- Customize the example agent - Edit
src/agents/hello/agent.ts - Add new agents - Create new folders in
src/agents/ - Add API routes - Create new routes in
src/apis/ - Customize the UI - Edit
src/web/app.tsx - Configure your app - Modify
app.tsto add middleware, configure services, etc.
Creating Custom Agents
Create a new agent by adding a folder in src/agents/:
// src/agents/my-agent/agent.ts
import { type AgentContext, createAgent } from '@agentuity/runtime';
import { z } from 'zod';
const agent = createAgent({
metadata: {
description: 'My amazing agent',
},
schema: {
input: z.object({
message: z.string(),
}),
output: z.object({
response: z.string(),
}),
},
handler: async (ctx: AgentContext, input) => {
return { response: `Processed: ${input.message}` };
},
});
export default agent;Adding API Routes
Create custom routes in src/apis/ or add routes to an agent folder:
// src/agents/my-agent/route.ts
import { createRouter } from '@agentuity/runtime';
import { zValidator } from '@hono/zod-validator';
import agent from './agent';
const router = createRouter();
router.get('/', async (c) => {
const result = await c.agent.myAgent.run({ message: 'Hello!' });
return c.json(result);
});
router.post('/', zValidator('json', agent.inputSchema!), async (c) => {
const data = c.req.valid('json');
const result = await c.agent.myAgent.run(data);
return c.json(result);
});
export default router;Learn More
Requirements
- Bun v1.0 or higher
- TypeScript 5+
License
Apache 2.0