## Goal
Let users save documents to the Knowledge Base directly from inside the agent conversation — drop a file (or link) in the agent and have it ingested into the knowledge base, not just via the standalone Knowledge page.
## Why
Knowledge ingestion currently only happens on the Knowledge page / onboarding (POST /api/knowledge/upload). The agent is the central working surface, so a user in a conversation should be able to add reference material to their knowledge base in-context (e.g. "save this PDF to my knowledge base") and have it available for grounding.
## Scope / Acceptance Criteria
- [ ] In the agent, allow attaching/uploading a document and saving it to the Knowledge Base (reuse the existing ingestion pipeline: upload to storage → POST /api/knowledge/upload → extract → chunk → embed → document_chunks).
- [ ] Surface ingestion status in the conversation (processing / ready / error), consistent with the unified "Saving…/Saved" indicator pattern the agent already uses for attach media.
- [ ] Saved docs appear in the Knowledge page list (source tagged appropriately, e.g. add an agent value to the source CHECK constraint — needs migration).
- [ ] Respect current ingestion limits/types (today: pdf/txt/docx/md/csv, 10MB, 50 docs) — or note where they should be raised (ties into CAP-52).
- [ ] Workspace isolation + user scoping (effectiveUserId, ViewAs); storage path uses workspace_id.
- [ ] Localization for new UI strings (en/pl/fr/de).
## Notes
* The knowledge_documents.source column is a CHECK IN ('onboarding','knowledge_page') — adding an 'agent' source requires a migration.
* Depends on / pairs with KB revamp (CAP-52): broader file types, links, and RAG retrieval. Once retrieval is wired, agent-saved docs become usable context immediately.
* Sibling issue: idea generation in the agent.
Please authenticate to join the conversation.
Planned
Feature Request
About 3 hours ago

Chris Koronowski
Get notified by email when there are changes.
Planned
Feature Request
About 3 hours ago

Chris Koronowski
Get notified by email when there are changes.