# Company Knowledge

Indexes internal documents into a vector store and answers questions over them, with PII redaction.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="flue" agent="company-knowledge" />

<AgentPreview
  agent="company-knowledge"
  framework="flue"
  inputFields="[
  {
    name: &#x22;query&#x22;,
    label: &#x22;Question&#x22;,
    placeholder: &#x22;What's our policy on refund requests over $500?&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **Company Knowledge Agent** answers questions over your internal documents —
issues, wiki pages, notes. It indexes them into a vector store, searches the
corpus first, and redacts personal data (emails, phone numbers, SSNs, card
numbers, API keys) from responses. Reach for it to build an internal "ask the
company" assistant.

## Install [#install]

```bash
npx shadcn@latest add https://agentcn.vercel.app/r/flue/company-knowledge.json
```

## Composition [#composition]

```text
agents/
└── company-knowledge.ts     # Corpus-first, PII-safe agent
workflows/
└── index-knowledge.ts       # Scheduled re-index workflow
tools/
├── search-knowledge.ts      # Search the corpus (redacted)
└── index-document.ts        # Add a document to the corpus
lib/
├── vector-store.ts          # libSQL vector store + embeddings
└── pii.ts                   # PII redaction helper
```

## Customization [#customization]

* **Connect sources.** Feed `index-knowledge` from Linear, Notion, or your wiki
  on a cron for fresh data.
* **Swap the vector store.** Replace `lib/vector-store.ts` with pgvector/Neon,
  Pinecone, or Qdrant.
* **Tune redaction.** Edit the patterns in `lib/pii.ts` for your data.
* **Swap the model.** Change the `model` field on the agent.
