Default Integration

Agentmark can be used with default adapter to transform prompts into default agentmark format.

With the Default integration, you can map the parameters directly to your preferred provider (e.g., OpenAI, Ollama) or your own SDK. This allows you to maintain flexibility while using AgentMark’s interface.

Installation

npm install @agentmark/default-adapter

Usage

import { createAgentMarkClient } from "@agentmark/default-adapter";
import { generateText } from "ai";
import { FileLoader } from "@agentmark/agentmark-core";

const loader = new FileLoader("path/to/prompts");

const agentmark = createAgentMarkClient({
    loader,
});

const prompt = await agentmark.loadTextPrompt("<example>.prompt.mdx");
const result = await prompt.format({
    props: {
        // prompt props
    }
});

console.log(result);

Have Questions?

We’re here to help! Choose the best way to reach us: