{"record":{"id":"a2be9d95bd493851","repo":"NousResearch/hermes-agent","slug":"run-oneshot-requires-a-template-or-instructions-us","errorCode":null,"errorMessage":"run_oneshot requires a template or instructions/user_input","messagePattern":"run_oneshot requires a template or instructions/user_input","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent/oneshot.py","lineNumber":131,"sourceCode":"    max_tokens: int = 1024,\n    temperature: Optional[float] = 0.3,\n    timeout: float = 60.0,\n    main_runtime: Optional[Dict[str, Any]] = None,\n) -> str:\n    \"\"\"Run a single stateless LLM request and return its text.\n\n    Provide either a registered ``template`` (+ ``variables``) or an explicit\n    ``instructions`` / ``user_input`` pair. Returns the model's text answer,\n    stripped of surrounding whitespace and any wrapping code fence.\n\n    Raises RuntimeError when no LLM provider is configured (surfaced from\n    :func:`call_llm`) and KeyError for an unknown template name.\n    \"\"\"\n    if template:\n        instructions, user_input = render_template(template, variables)\n\n    if not (instructions or \"\").strip() and not (user_input or \"\").strip():\n        raise ValueError(\"run_oneshot requires a template or instructions/user_input\")\n\n    messages = []\n    if (instructions or \"\").strip():\n        messages.append({\"role\": \"system\", \"content\": instructions})\n    messages.append({\"role\": \"user\", \"content\": user_input or \"\"})\n\n    response = call_llm(\n        task=task,\n        messages=messages,\n        max_tokens=max_tokens,\n        temperature=temperature,\n        timeout=timeout,\n        main_runtime=main_runtime,\n    )\n\n    text = (extract_content_or_reasoning(response) or \"\").strip()\n    return _strip_code_fence(text)\n","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/oneshot.py#L113-L149","documentation":"Error \"run_oneshot requires a template or instructions/user_input\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/oneshot.py:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a template name, or provide instructions/user_input for an ad-hoc one-shot."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}