A full-stack example application demonstrating AIDK features:
- Express Backend - Agent execution, channels, persistence
- React Frontend - Hooks-based integration
- Angular Frontend - Service-based integration
- Node.js >= 20.0.0
- pnpm >= 9.0.0
- OpenAI API key
From the repository root:
pnpm installcd example/express
cp env.example .envEdit .env and add your OpenAI API key:
OPENAI_API_KEY=sk-...
Terminal 1 - Backend:
cd example
pnpm dev:expressTerminal 2 - Frontend (React or Angular):
cd example
pnpm dev:react # React on http://localhost:5173
# or
pnpm dev:angular # Angular on http://localhost:4200- Agents: Task assistant with tools for todo lists and scratchpad
- Tools: Todo management, scratchpad notes, calculator
- Channels: Real-time sync between server and clients
- Persistence: In-memory storage (demo only)
See express/README.md for API details.
useEngineClient- Client connection and lifecycleuseExecution- Agent execution and streaminguseTodoList,useScratchpad- Channel subscriptions- Content block rendering components
See react/README.md for details.
EngineService- Client connection and configurationExecutionService- Agent execution handlingChannelsService- Channel subscriptions- Content block rendering components
See angular/README.md for details.
example/
├── express/ # Backend
│ ├── src/
│ │ ├── agents/ # Agent definitions
│ │ ├── tools/ # Tool implementations
│ │ ├── channels/ # Channel definitions
│ │ ├── routes/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── persistence/ # Storage layer
│ └── README.md
│
├── react/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ └── hooks/ # AIDK hooks
│ └── README.md
│
└── angular/ # Angular frontend
├── src/app/
│ └── components/ # UI components
└── README.md
# Run everything in dev mode (from example/)
pnpm dev
# Build all
pnpm build
# Type check
pnpm typecheckMake sure the backend is running on port 3000 and the frontend proxy is configured correctly.
The backend must be running before the frontend. Start pnpm dev:express first.
Verify your OPENAI_API_KEY in express/.env is valid and has credits.