Ingest
What does the Knowledge Sources page do?
The Knowledge Sources page is a top-level Memory route at /memories/:memoryId/knowledge-sources (the legacy /import path redirects here). It provides a drag-and-drop upload interface for importing documents into the Areev context database as structured AI memory grains.
Drop a file onto the upload zone or click to select one from your filesystem. The autonomous memory engine accepts MG containers (up to 512 MB), PDF, DOCX, PPTX, HTML, and TXT files (up to 10 MB each). For document files (non-MG), the engine extracts text content, splits it into chunks, and stores the resulting grains. For .mg files, the engine imports pre-existing grains directly from the binary container via POST /api/memories/{memory_id}/import-file.
The page walks through three steps: upload (drag-and-drop), importing (live progress with percentage and grain counts), and completion (summary of imported and skipped grains). Failed imports show the specific error (invalid format, file too large, too many active imports) and allow you to retry.
How does document import work?
When you upload a document file (PDF, DOCX, PPTX, HTML, TXT) through the Knowledge Sources page, the Console processes it as a background job and streams live progress while the server parses the file, extracts text, and writes grains. For programmatic import, use the synchronous POST /api/memories/{memory_id}/import-document endpoint (see the HTTP REST reference).
As the server processes the document, the Knowledge Sources page shows a rotating status message (“Uploading…”, “Processing…”, “Importing grains…”), a progress bar with the percentage complete, and a running count of grains imported. You can cancel an in-progress import from the page.
For .mg container files, the import is synchronous — the file is sent as an application/octet-stream body to POST /api/memories/{memory_id}/import-file and the response includes the count of imported and skipped grains.
You can review and browse the imported grains in the Memory > Grains view after import completes.
# Import a document (synchronous)
curl -X POST https://acme.areev.ai/api/memories/{memory_id}/import-document \
-F "file=@report.pdf"
# Import an .mg container (synchronous)
curl -X POST https://acme.areev.ai/api/memories/{memory_id}/import-file \
-H "Content-Type: application/octet-stream" \
--data-binary @export.mg
# Python: import a document
import requests
memory_id = "my-memory"
with open("report.pdf", "rb") as f:
resp = requests.post(f"https://acme.areev.ai/api/memories/{memory_id}/import-document", files={
"file": ("report.pdf", f, "application/pdf")
})
print(resp.json())
How do I monitor import progress?
The Knowledge Sources page updates in real time via server-sent events as the server processes the file, showing percentage complete, grains written, grains skipped, and elapsed time.
The page reports the percentage complete and the number of grains imported as the server parses, analyzes, and writes grains. The server processes files independently of the Console session — if you navigate away and return, the Console checks for any active imports on load and resumes showing their progress.
Related
- Console: Console overview and setup
- Memory: Browse imported grains
- Ingest Guide: Ingest concepts and API reference