Quick Start
Get up and running with Carnet in 5 minutes.
1. Install Carnet
See the Installation Guide for detailed instructions.
2. Initialize a Project
cd my-app
carnet initThis creates a carnet/ folder with the following structure:
my-app/
└── carnet/
├── carnet.config.json
├── agents/
├── skills/
└── toolsets/Note:
carnet initcreates acarnet/directory by default. You can specify a different name withcarnet init <directory-name>, or usecarnet init .to initialize in the current directory.
3. Build Your Content
carnet buildThis generates carnet/carnet.manifest.json with all your agents compiled.
See carnet build usage for options.
4. View Your Structure
carnet listYou should see a tree view of your agents, skills, and toolsets.
5. Use in Your Code
Integrate with Vercel AI SDK:
import { Carnet } from '@upstart-gg/carnet'
import { streamText } from 'ai'
import { openai } from '@ai-sdk/openai'
import { tool } from 'ai'
import { z } from 'zod'
import manifest from './carnet/carnet.manifest.json'
// Load your manifest
const carnet = new Carnet(manifest)
// Define your domain tools (from your toolsets)
const searchTool = tool({
description: 'Search for information',
inputSchema: z.object({ query: z.string() }),
execute: async ({ query }) => ({ results: `Results for "${query}"` })
})
// Get system prompt and tools for your agent
const result = await streamText({
model: openai('gpt-4'),
system: carnet.getSystemPrompt('my-agent'),
tools: carnet.getTools('my-agent', {
tools: { search: searchTool }
}),
messages: [{ role: 'user', content: 'Help me with a task!' }]
})See Using with Vercel AI SDK for complete examples and advanced patterns.
Next Steps
- Learn about Core Concepts
- Explore Using with Vercel AI SDK - Full LLM integration guide
- Browse CLI Commands
- Check API Reference
Tips
Watch mode during development:
carnet build --watchValidate without building:
carnet validateShow details about an entity:
carnet show agent my-agentThat's it! You now have a working Carnet project. 🎉
