Step 5: Deploy & Next Steps
Deploy to Kernova Cloud
Push to GitHub
git initgit add .git commit -m "feat: multi-agent coding team"git remote add origin https://github.com/YOUR_USERNAME/coding-team.gitgit push -u origin mainDeploy
kernova loginkernova deployOr import from the Kernova Cloud dashboard.
Add Environment Variables
In the Kernova Cloud dashboard → your project → Environment tab:
| Key | Value |
|---|---|
OPENAI_API_KEY | sk-... |
Click “Save & Redeploy.”
Your team is now live and accessible via the deployed URL.
Advanced: Adding Tools to Agents
Give agents the ability to actually read/write files:
import { defineTool } from '@kernova/framework';
export default defineTool({ name: 'read-project-files', description: 'Read the contents of a file in the project', parameters: { path: { type: 'string', description: 'File path relative to project root', required: true }, }, execute: async ({ path }) => { const fs = await import('node:fs/promises'); try { const content = await fs.readFile(path as string, 'utf-8'); return { content, path }; } catch { return { error: `File not found: ${path}` }; } },});Then add tools to specific agents:
export default defineAgent({ name: 'senior-dev', instructions: '...', tools: ['read-project-files'], // Can read code for reviews});Advanced: Using the Shared Workspace
Give agents the ability to coordinate through shared state:
// agents/senior-dev.ts (with custom handler using workspace)import { defineAgent } from '@kernova/framework';
export default defineAgent({ name: 'senior-dev', instructions: '...', handler: async (ctx) => { // Set architecture decisions in workspace ctx.workspace.set('conventions', { naming: 'camelCase for functions, PascalCase for components', imports: 'Use absolute imports with @/ prefix', errorHandling: 'Always use try/catch in API routes', });
// Delegate with context const frontend = await ctx.delegateTo('frontend-dev', 'Build a UserCard component. Check workspace for conventions.' );
// Read what the frontend dev produced const componentCode = ctx.workspace.get('frontend-output');
return { content: `Architecture set. Frontend code:\n${frontend}` }; },});Advanced: Different Strategies
Try Pipeline (Content Creation)
import { defineTeam } from '@kernova/framework';
export default defineTeam({ name: 'Content Pipeline', strategy: 'pipeline', members: [ { agent: 'researcher', role: 'member', description: 'Finds relevant data' }, { agent: 'writer', role: 'member', description: 'Writes the article' }, { agent: 'editor', role: 'reviewer', description: 'Edits for clarity' }, ],});Try Broadcast (Get Best Answer)
import { defineTeam } from '@kernova/framework';
export default defineTeam({ name: 'Solutions Team', strategy: 'broadcast', members: [ { agent: 'conservative', role: 'member', description: 'Safe, proven approaches' }, { agent: 'innovative', role: 'member', description: 'Creative, novel approaches' }, { agent: 'pragmatic', role: 'lead', description: 'Picks the best approach' }, ],});Complete Project Structure
coding-team/├── agents/│ ├── senior-dev.ts # Lead: decomposes & reviews│ ├── frontend-dev.ts # Specialist: React/UI│ ├── backend-dev.ts # Specialist: API/DB│ ├── tester.ts # Reviewer: tests/QA│ ├── teams/│ │ └── dev-team.ts # Team definition│ └── tools/│ └── read-project-files.ts # Optional: file reading├── app/│ ├── page.tsx # Team dashboard UI│ └── layout.tsx├── .env.local├── kernova.config.ts├── package.json└── tsconfig.jsonWhat You Built
| Feature | Implementation |
|---|---|
| 4 specialized agents | Each with unique expertise and personality |
| Team orchestration | defineTeam() with hierarchical strategy |
| Task decomposition | Lead automatically breaks down complex goals |
| Delegation | Work assigned based on specialization |
| Code review | Lead reviews before returning final output |
| Real-time progress | SSE streaming with useTeam() hook |
| Shared workspace | Agents can share structured data |
| Production deploy | One-command deploy to Kernova Cloud |
Ideas to Extend
- Add a Designer agent — Generates UI mockups and color schemes
- Add a DevOps agent — Writes Dockerfiles, CI/CD configs
- Add tools — File read/write, git operations, linting
- Add memory — Team remembers past decisions and conventions
- Add approval gates — Require human sign-off before executing generated code
- Try collaborative strategy — Let agents freely delegate to each other
- Multiple teams — A “Design Team” and an “Engineering Team” that hand off
Full Tutorial Navigation
- Introduction
- Project Setup
- Define the Agents
- Define the Team
- Build the Chat UI
- Deploy & Next Steps (you are here)