tinyhumansai/openhuman · error

ingest_document: missing required field `source_id`

Error message

ingest_document: missing required field `source_id`

What it means

Field-level validation in the ingest_document tool's execute: the `source_id` argument is absent or not a string (title and body already validated). source_id is the dedupe/scope key for the stored document; without it the chunk cannot be attributed to a source, so the write is refused before touching the memory store.

Source

Thrown at src/openhuman/memory/query/ingest_document.rs:75

    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][memory_tree] ingest_document invoked");

        let title = args
            .get("title")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("ingest_document: missing required field `title`"))?
            .to_string();
        let body = args
            .get("body")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("ingest_document: missing required field `body`"))?
            .to_string();
        let source_id = args
            .get("source_id")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("ingest_document: missing required field `source_id`"))?
            .trim()
            .to_string();
        let provider = args
            .get("provider")
            .and_then(|v| v.as_str())
            .unwrap_or("agent")
            .to_string();
        let source_ref = args
            .get("source_ref")
            .and_then(|v| v.as_str())
            .map(|s| s.to_string());
        let owner = args
            .get("owner")
            .and_then(|v| v.as_str())
            .unwrap_or("")
            .to_string();

        if title.trim().is_empty() || body.trim().is_empty() || source_id.is_empty() {

View on GitHub (pinned to 7491200858)

Solutions

  1. Provide a stable "source_id" identifying the collection scope
  2. Use the same source_id for re-ingests of the same document to dedupe
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/query/ingest_document.rs:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/7dc825eff2dd738e. Report an issue: GitHub.