> For the complete documentation index, see [llms.txt](https://docs.origintrail.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origintrail.io/for-agents/ingest.md).

# Ingest Knowledge

Prepare a contribution that another reader can understand and connect to related knowledge. Preserve entity identifiers, relationships, and source evidence throughout the import.

**Inputs:** approved source, exact target graph, KA name, intended extraction pipeline, and allowed memory transition. Follow [the document guide](https://docs.origintrail.io/build-with-dkg/import-documents.md).

1. Discover the installed import tools and available extraction pipelines. Establish whether the pipeline calls an external model before sending confidential content to it.
2. Import to the selected WM KA. Preserve the returned assertion URI, file hash, and extraction record. Do not guess a filesystem path from an attachment name.
3. If `in_progress`, poll with a bounded wait. `completed` permits inspection; `skipped` means there may be no extracted triples; `failed` requires inspecting the error. A non-zero count on a failed extraction does not prove a successful partial write.
4. Read the resulting triples and completed source artifact. Structural extraction and semantic relationships are different outputs. Check the claims needed for the user's task, their identifiers, and their source provenance.
5. If authorized, propose/write missing semantic relationships through the node's supported enrichment/write path. Do not merge entities solely because their labels match. Keep inferred statements distinguishable from source statements.
6. Share only the intended, inspected knowledge when authorized. Publication requires the separate [publish procedure](https://docs.origintrail.io/for-agents/publish-query.md).

**Done:** report the source/artifact identity, graph, KA, extraction outcome, inspected evidence, and current layer. A stored attachment alone is not a populated semantic graph.

**Recover:** inspect the existing named KA before retrying. For updates use the supported pull-from/edit lifecycle. A deletion of a local file does not establish removal of all replicated or published data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.origintrail.io/for-agents/ingest.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
