# 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="eve" agent="company-knowledge" />

<AgentPreview
  agent="company-knowledge"
  framework="eve"
  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 @agentcn/eve/company-knowledge
```

## Composition [#composition]

```text
agent/
├── agent.ts                 # Agent definition (model + config)
├── instructions.md          # Corpus-first, PII-safe instructions
├── lib/
│   ├── pii.ts               # PII redaction helper
│   └── vector-store.ts      # libSQL vector store + embeddings
└── tools/
    ├── index_document.ts    # Add a document to the corpus
    └── search_knowledge.ts  # Search the corpus (redacted)
```

## Customization [#customization]

* **Connect sources.** Feed `index_document` from Linear, Notion, or your wiki —
  on a schedule 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.** Edit `agent/agent.ts`.
