Skip to content

Open source file-system and knowledge based agent template. Build AI agents that stay up to date with your knowledge base

add deploy on vercel button

Hugo Richard9acf152d6da0
diff --git a/README.md b/README.md
index ba76c0c..7c8f309 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,10 @@
<b>Template.</b> Fork it, customize it, and deploy your own file-system based AI agent.
</p>
+<p align="center">
+ <a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fknowledge-agent-template&env=BETTER_AUTH_SECRET,GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,AI_GATEWAY_API_KEY&envDescription=Required%20environment%20variables.%20See%20docs%2FENVIRONMENT.md%20for%20details.&envLink=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fknowledge-agent-template%2Fblob%2Fmain%2Fdocs%2FENVIRONMENT.md&project-name=knowledge-agent&repository-name=knowledge-agent"><img src="https://vercel.com/button" alt="Deploy with Vercel" /></a>
+</p>
+
---
Open source file-system and knowledge based agent template. Build AI agents that stay up to date with your knowledge base — grep, find, and cat across your sources, no embeddings, no vector DB. Plug any source (GitHub repos, YouTube transcripts, custom APIs) and deploy as a chat app, a GitHub bot, a Discord bot, or all at once.
@@ -114,6 +118,10 @@ const { text } = await generateText({
console.log(text)
```
+### Deploy to Vercel
+
+[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fknowledge-agent-template&env=BETTER_AUTH_SECRET,GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,AI_GATEWAY_API_KEY&envDescription=Required%20environment%20variables.%20See%20docs%2FENVIRONMENT.md%20for%20details.&envLink=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fknowledge-agent-template%2Fblob%2Fmain%2Fdocs%2FENVIRONMENT.md&project-name=knowledge-agent&repository-name=knowledge-agent)
+
### Self-hosting
```bash
diff --git a/apps/app/app/app.config.ts b/apps/app/app/app.config.ts
index c7364e1..1bb457b 100644
--- a/apps/app/app/app.config.ts
+++ b/apps/app/app/app.config.ts
@@ -3,6 +3,8 @@ export default defineAppConfig({
name: 'Knowledge Agent Template',
description: 'Open source file-system and knowledge based agent template.',
icon: 'i-simple-icons-vercel',
+ repoUrl: 'https://github.com/vercel-labs/knowledge-agent-template',
+ deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fknowledge-agent-template&env=BETTER_AUTH_SECRET,GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,AI_GATEWAY_API_KEY&envDescription=Required%20environment%20variables.%20See%20docs%2FENVIRONMENT.md%20for%20details.&envLink=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fknowledge-agent-template%2Fblob%2Fmain%2Fdocs%2FENVIRONMENT.md&project-name=knowledge-agent&repository-name=knowledge-agent',
},
ui: {
colors: {
diff --git a/apps/app/app/content/docs/getting-started.md b/apps/app/app/content/docs/getting-started.md
index 925830c..6474231 100644
--- a/apps/app/app/content/docs/getting-started.md
+++ b/apps/app/app/content/docs/getting-started.md
@@ -148,8 +148,11 @@ After adding or updating sources, trigger a sync from the admin interface. The s
1. Creates a [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) from the latest snapshot
2. Clones/updates all source repositories
-3. Pushes changes to the snapshot repository
-4. Takes a new sandbox snapshot for instant startup
+3. Filters files to keep only documentation types (`.md`, `.mdx`, `.yml`, `.yaml`, `.json`) -- all other files are discarded
+4. Pushes changes to the snapshot repository
+5. Takes a new sandbox snapshot for instant startup
+
+> **Note:** Only documentation files are synced. Source code (`.ts`, `.js`, `.vue`, etc.), images, and binaries are automatically excluded. See the [Sources documentation](https://github.com/vercel-labs/knowledge-agent-template/blob/main/docs/SOURCES.md#content-normalization) for details.
## How It Works
diff --git a/apps/app/app/pages/login.vue b/apps/app/app/pages/login.vue
index 5093f78..0e91a97 100644
--- a/apps/app/app/pages/login.vue
+++ b/apps/app/app/pages/login.vue
@@ -90,15 +90,24 @@ function onGitHub() {
<div class="w-full lg:w-1/2 flex items-center justify-center p-8 relative">
<div class="absolute top-4 right-4 flex items-center gap-1">
<UButton
- to="https://github.com/vercel-labs/knowledge-agent-template"
+ :to="appConfig.app.deployUrl"
+ target="_blank"
+ icon="i-simple-icons-vercel"
+ label="Deploy on Vercel"
+ color="neutral"
+ variant="ghost"
+ size="sm"
+ />
+ <UButton
+ :to="appConfig.app.repoUrl"
target="_blank"
icon="i-simple-icons-github"
color="neutral"
variant="ghost"
- size="md"
+ size="sm"
square
/>
- <UColorModeButton />
+ <UColorModeButton size="sm" />
</div>
<div class="w-full max-w-sm">
diff --git a/docs/SOURCES.md b/docs/SOURCES.md
index b4a9461..efd8035 100644
--- a/docs/SOURCES.md
+++ b/docs/SOURCES.md
@@ -110,21 +110,24 @@ The system tracks when sources were last synced:
## Content Normalization
-All content is normalized to Markdown:
+During sync, only documentation-relevant files are kept in the snapshot. All other files are discarded.
-| Input | Output |
-|-------|--------|
+### Supported File Types
+
+| Extension | Handling |
+|-----------|----------|
| `.md` | Preserved as-is |
-| `.mdx` | Converted to `.md` |
-| `.yml`/`.yaml` | Preserved |
+| `.mdx` | Preserved (treated as Markdown) |
+| `.yml` / `.yaml` | Preserved |
| `.json` | Preserved |
-| Other | Ignored |
+| All other types | **Deleted** during sync |
+
+Source code files (`.ts`, `.js`, `.vue`, etc.), images, binaries, and any file not in the list above are automatically removed after cloning. Only the supported types end up in the snapshot repository.
-### Excluded Files
+### Excluded Directories
-- Lock files (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `bun.lock`, etc.)
- `node_modules/`
-- Binary files
+- Empty directories (cleaned up after filtering)
## Snapshot Repository