API Reference
Agents OpenClaw

Agents OpenClaw API Reference

Full API for @veridex/agents-openclaw — bridging the OpenClaw/Pi ecosystem into Veridex.


Context File Parsing

parseContextFile

function parseContextFile(
  filename: string,
  content: string,
): ContextFile;

Parse a single OpenClaw context file (e.g., AGENTS.md, IDENTITY.md).

parseWorkspaceContextFiles

function parseWorkspaceContextFiles(
  files: Record<string, string>,
): ContextFile[];

Parse all context files from a workspace directory.

compileContextSections

function compileContextSections(
  contextFiles: ContextFile[],
): Record<string, string>;

Compile parsed context files into text blocks keyed by type.


Skill Import

parseSkillDocument

function parseSkillDocument(
  path: string,
  content: string,
): SkillDocument;

Parse a SKILL.md file with YAML frontmatter into a structured document.

importSkillDocument

function importSkillDocument(
  doc: SkillDocument,
): { tool: ToolContract; warnings: string[] };

Convert a parsed skill document into a Veridex ToolContract.

importSkill

function importSkill(
  path: string,
  content: string,
): { tool: ToolContract; warnings: string[] };

Convenience function: parse + import in one step.

importSkillManifest

function importSkillManifest(
  manifest: SkillManifest,
): { tools: ToolContract[]; warnings: string[] };

Import all skills in a manifest.

inferSafetyClassFromSkill

function inferSafetyClassFromSkill(
  doc: SkillDocument,
): ToolSafetyClass;

Infer Veridex safety class from skill metadata (name, description, tags).


ACP Agent Cards

toACPAgentCard

function toACPAgentCard(
  definition: AgentDefinition,
): ACPAgentCard;

Export a Veridex agent definition as an ACP-compatible agent card.

fromACPCapabilities

function fromACPCapabilities(
  capabilities: ACPCapability[],
): ToolContract[];

Import ACP capabilities as Veridex tool contracts.

createRemoteAgentTool

function createRemoteAgentTool(options: {
  name: string;
  description: string;
  endpoint: string;
  auth?: { type: 'bearer'; token: string };
  timeoutMs?: number;
}): ToolContract;

Create a tool that calls a remote ACP agent.


Session Translation

translateEvent

function translateEvent(
  event: OpenClawEvent,
): { event: TraceEvent; warnings: string[] };

Translate a single OpenClaw event into a Veridex trace event.

translateSession

function translateSession(
  session: OpenClawSession,
): { events: TraceEvent[]; warnings: string[] };

Translate a full OpenClaw session into Veridex trace events.

translateSessions

function translateSessions(
  sessions: OpenClawSession[],
): { events: TraceEvent[]; warnings: string[] }[];

Batch translate multiple sessions.


Compatibility Audit

buildCompatibilityAuditReport

function buildCompatibilityAuditReport(
  contextFiles: ContextFile[],
  skills: SkillDocument[],
): CompatibilityReport;
 
interface CompatibilityReport {
  compatible: number;
  warnings: CompatibilityWarning[];
  unsupported: UnsupportedFeature[];
  summary: string;
}