lelangfuse-eve

Skills from Langfuse

Make one Langfuse prompt or a prompt folder available as on-demand Eve skills.

Langfuse-backed skills let prompt authors update procedures without changing the agent code. Eve advertises each skill's description and loads its full instructions only when a request needs them.

Create a skill prompt

Create a Langfuse text prompt containing Eve skill Markdown. Add a routing description in YAML frontmatter:

Langfuse prompt: skills/release-notes
---
description: Use when writing release notes for a completed change
license: MIT
metadata:
  owner: product
---

Lead with the user-visible outcome. Keep implementation details brief.

Add one skill

Create a TypeScript file in the agent's skills directory:

agent/skills/release-notes.ts
import { defineLangfuseSkill } from "@vantezzen/langfuse-eve/skills";

export default defineLangfuseSkill("skills/release-notes", {
  fallback: `---
description: Use when writing release notes
---
Lead with the user-visible outcome.`,
  label: "production",
});

Eve exposes the skill as release-notes. The integration records the Langfuse prompt name and version in trace metadata.

Add a folder of skills

Use one Eve file to expose every text prompt under a Langfuse folder:

agent/skills/company.ts
import { defineLangfuseSkills } from "@vantezzen/langfuse-eve/skills";

export default defineLangfuseSkills("skills/company", {
  label: "production",
  tag: "skill",
});

The prompt path becomes the Eve skill name:

Langfuse promptEve skill
skills/company/release-notesrelease-notes
skills/company/ads/copyads__copy

Folder discovery follows Langfuse pagination, caches the listing for five minutes, sorts the result, and limits simultaneous prompt fetches. Use name to choose another naming scheme.

Filter skills for the current user

The filter receives the Langfuse prompt summary and the current Eve resolve context:

agent/skills/company.ts
export default defineLangfuseSkills("skills/company", {
  filter: async (prompt, context) =>
    !prompt.tags.includes("internal") || userMaySeeInternalSkills(context),
  tag: "skill",
});

Handle unavailable prompts

Individual prompt failures stop skill resolution by default. Use onError and skipFailed only when the agent can operate with a partial skill set:

defineLangfuseSkills("skills/company", {
  onError: (error, skill) => reportSkillError(skill.name, error),
  skipFailed: true,
});

Folder fallbacks also act as local catalog entries. They remain available when Langfuse listing fails or does not include that prompt:

defineLangfuseSkills("skills/company", {
  fallbacks: {
    "release-notes": `---
description: Write release notes
---
Lead with the outcome.`,
  },
});

Give skills to a subagent

Skills are scoped to the Eve agent directory that contains them. Put the resolver below a declared subagent when only that subagent should receive the skills:

agent.ts
research.ts
agent/subagents/researcher/skills/research.ts
import { defineLangfuseSkill } from "@vantezzen/langfuse-eve/skills";

export default defineLangfuseSkill("skills/research", {
  label: "production",
});

Large folder catalogs are not copied into every trace by default. Set tracePrompt: true when you want every resolved folder prompt recorded before a skill is loaded. Single skills enable prompt tracking by default.

On this page