Langfuse 文档 中文 英文原文 ↗
文档 / 提示词管理入门

提示词管理入门

本指南带你完成在 Langfuse 中创建和使用提示词的过程。如果你想了解什么是提示词管理以及它为什么重要,请先查看提示词管理概览。关于提示词在 Langfuse 中的结构以及它在后台如何工作的细节,参见核心概念

Agent 化安装

安装 Langfuse Agent Skill,让你的编码 agent 能够访问所有 Langfuse 功能。

让你的编码 agent 安装

让你的编码 agent 通过指向 GitHub 仓库 来安装该 skill,并指示它迁移你的提示词。

txtAgent instruction
Install the Langfuse Agent Skill from github.com/langfuse/skills
and use it to migrate the prompts in this codebase to Langfuse.

Cursor 插件

Langfuse 有一个 Cursor 插件,其中自动包含该 skill。

在 Cursor 中安装插件

然后提示你的 agent:

txtAgent instruction
Migrate the prompts in this codebase to Langfuse.

手动安装

通过 npm 安装(skills CLI):

bash
npx skills add langfuse/skills --skill "langfuse"

如果你想直接针对某个特定 agent:

bash
npx skills add langfuse/skills --skill "langfuse" --agent "<agent-id>"
或者你可以手动克隆该 skill
  1. 将仓库克隆到某个稳定的位置
bash
git clone https://github.com/langfuse/skills.git /path/to/langfuse-skills
  1. 确保你的 agent 的 skills 目录存在
bash
mkdir -p /path/to/<agent-skill-root>/skills
  1. 为 skill 文件夹创建符号链接
bash
ln -s /path/to/langfuse-skills/skills/langfuse /path/to/<agent-skill-root>/skills/langfuse

然后提示你的 agent:

txtAgent instruction
Migrate the prompts in this codebase to Langfuse.

手动安装

本指南帮助你手动开始使用 Langfuse 提示词管理。

没看到你预期的内容?

后续步骤

既然你已经使用了第一个提示词,我们建议你接下来做以下几件事,以充分发挥 Langfuse 提示词管理的价值:

在找某个具体功能?查看 Features 下的具体主题指南。

非官方中文翻译 · 图片/视频/代码均链接官方资源 · 版权归 Langfuse GmbH 所有 查看英文原文 ↗