tinyhumansai/openhuman · error

learning_save_profile: summarisation failed

Error message

learning_save_profile: summarisation failed: {e:#}

What it means

learning_save_profile with summarize=true asked the LLM to summarise the profile markdown first and that inference call failed — provider unreachable, no model configured, or API error. The save stops before writing anything.

Solutions

  1. Check the configured inference provider and API key, then retry
  2. Retry with summarize=false to save the raw markdown now and summarise later
  3. Fall back to writing the unsummarised profile if the provider stays unavailable
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/openhuman/agent/learning/tools.rs:541 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/7349700c2f2ea458. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/learning/tools.rs:541

        PermissionLevel::Write
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][learning] save_profile invoked");
        let markdown = read_required_str(&args, "markdown")?;
        let summarize = args
            .get("summarize")
            .and_then(serde_json::Value::as_bool)
            .unwrap_or(false);
        let config = config_rpc::load_config_with_timeout()
            .await
            .map_err(|e| anyhow::anyhow!("learning_save_profile: {e}"))?;
        let body = if summarize {
            crate::openhuman::agent::learning::linkedin_enrichment::summarise_profile_with_llm(
                &config, &markdown,
            )
            .await
            .map_err(|e| anyhow::anyhow!("learning_save_profile: summarisation failed: {e:#}"))?
        } else {
            markdown
        };
        let path = config.workspace_dir.join("PROFILE.md");
        if let Some(parent) = path.parent() {
            tokio::fs::create_dir_all(parent)
                .await
                .map_err(|e| anyhow::anyhow!("learning_save_profile: create dir failed: {e}"))?;
        }
        tokio::fs::write(&path, &body)
            .await
            .map_err(|e| anyhow::anyhow!("learning_save_profile: write failed: {e}"))?;
        Ok(ToolResult::success(serde_json::to_string(&json!({
            "path": path.display().to_string(),
            "bytes": body.len(),
        }))?))
    }
}

View on GitHub (pinned to 7491200858)