NewWacht Bench is live — AI-assisted development for Wacht

readAgentSkillFile()

This method reads one file from the agent skill virtual filesystem.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function example() {  const client = await wachtClient();  const agentId: string = 'agentid-123';  const scope: SkillScope = 'agent';  const path: string = '/';  return client.ai.readAgentSkillFile(agentId, scope, path);}

Signature

function readAgentSkillFile(  agentId: string,  scope: SkillScope,  path: string,  client?: WachtClient,): Promise<SkillFileResponse>

Parameters

agentId: string;
Target agent id.
scope: SkillScope;
OAuth/skills scope key for the operation.
path: string;
Filesystem path selector.

Return value

result?: SkillFileResponse | undefined;
Operation result payload.

Examples

AI usage pattern

import { wachtClient } from '@wacht/nextjs/server';export async function inspectSkills(agentId: string) {  const client = await wachtClient();  const tree = await client.ai.listAgentSkillTree(agentId, 'agent');  const file = await client.ai.readAgentSkillFile(agentId, 'agent', '/README.md');  return { tree, file };}

On this page