Getting Started
Go from zero to a working AI chat widget in under a minute.
There are two ways to use Kody: hosted (we run the server) or self-hosted (you run everything). Both require your own AI API key.
Hosted (quickest)
Sign up, create a site in the dashboard, copy the script tag. No server to manage.
Sign Up FreeSelf-Hosted
RecommendedFull control, unlimited sites, MIT license. Requires running the Kody server yourself.
Self-Hosting GuideHosted: 3 Steps
1. Create an account
Sign up with your email and verify it. You'll get access to the Dashboard where you can create and manage sites.
2. Create a site
In the dashboard, click Create Site. Enter a site ID, your website URL as an allowed origin, your AI provider details (base URL, API key, model), and configure the topics your assistant should cover.
3. Copy the embed code
After creating the site, copy the script tag from the site details page and paste it into your website:
<script
src="https://api.kody.codai.app/widget.js"
data-site-id="your-site-id"
async
></script>That's it. The widget will appear as a chat bubble on your site.
Self-Hosted: Quick Overview
Follow the Self-Hosting guide to deploy the Kody server, then create a site through the built-in admin dashboard at http://your-server:3456/admin or via the API:
# Log in
curl -X POST http://localhost:3456/api/admin/login \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{"email": "admin@example.com", "password": "your-password"}'
# Create a site
curl -X POST http://localhost:3456/api/admin/sites \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"siteId": "my-site",
"allowedOrigins": ["https://example.com"],
"ai": {
"baseUrl": "http://localhost:11434/v1",
"apiKey": "ollama",
"model": "llama3"
},
"guardrails": {
"allowedTopics": ["general"],
"topicDescription": "General questions about our product"
}
}'Then embed the widget pointing at your own server:
<script
src="https://your-server.com/widget.js"
data-site-id="my-site"
async
></script>Client-Side Overrides
For more control, set window.KodyConfig before the script loads to override branding values on the current page:
<script>
window.KodyConfig = {
siteId: "my-site",
position: "bottom-left",
name: "Support Bot",
primaryColor: "#10b981"
};
</script>
<script src="https://api.kody.codai.app/widget.js" async></script>Widget Features
- Shadow DOM isolation — widget styles never leak to or from your page
- Markdown rendering — bold, italic, inline code, code blocks, links, and lists
- SSE streaming — responses stream in real-time
- Output scrubbing — AI provider names are replaced with your configured assistant name
- Ticket creation — users can create support tickets directly from chat
- Auto-growing textarea — input field expands as users type
Next Steps
- Configuration — full schema reference for branding, AI, guardrails, and more
- Knowledge Sources — give your assistant context about your product
- Ticket Providers — connect Jira, GitHub, Linear, or a webhook
- Security — how guardrails and prompt injection protection work