1

Register and create your App

  1. Register with a new account or login to your existing

  2. Create your app, and sync it with your GitHub repository and branch

Tip: Your puzzlet repo doesn’t need to be the same as where you store your app code. Your data is still accessible via our secure data layer.

2

Run Puzzlet init and Push to GitHub

  1. Initialize your puzzlet configuration in the root of your repo.
npx @puzzlet/cli@latest init
  1. Commit & push the changes to your synced branch.
3

Publish your first Prompt Template

4

Fetch your prompt and run it with tracing

  1. Create your API key, and grab your appId.
  2. Run your prompt
import { Puzzlet } from "@puzzlet/sdk";
import { ModelPluginRegistry, createTemplateRunner } from "@puzzlet/agentmark";
import AllModels from "@puzzlet/all-models";
const puzzletClient = new Puzzlet({ apiKey, appId }, createTemplateRunner);
const tracer = puzzletClient.initTracing();

// Note: Registering all latest models for demo/development purposes. 
// In production, you'll likely want to selectively load these, and pin models.
// See AgentMark docs for more details: https://docs.puzzlet.ai/agentmark/model-providers
ModelPluginRegistry.registerAll(AllModels);

async function run () {
  const basicPrompt = await puzzletClient.fetchPrompt("basic.prompt.mdx");
  const props = { myProp: 'hello' };
  const telemetry = {
    isEnabled: true,
    functionId: 'example-function-id',
    metadata: { userId: 'example-user-id' }
  };
  return (await basicPrompt.run(props, { telemetry }));
}
// Note: You only need to shutdown the tracer for local/short running tasks.
run().then(() => tracer.shutdown());
  1. View the results in your dashboard

Have Questions?

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