UNPKG

akm-cli

Version:

akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cur

14 lines (13 loc) • 752 B
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. /** * Append the one structured-output instruction to a prompt. Agent lowering * appends it to every schema-bearing request, alongside a transport's native * channel where one exists (a chat's `response_format`); the workflow engine * appends it for a direct-LLM unit. Resumed workflow runs depend on these * exact bytes, so do not reword it. */ export function withSchemaInstruction(prompt, schema) { return `${prompt}\n\nRespond with ONLY a JSON value matching this JSON Schema (no prose, no code fences):\n${JSON.stringify(schema)}`; }