---
title: "Add Caveman without breaking PromptLayer prompt releases"
description: "Keep prompt delivery stable during the first Caveman trial. PromptLayer may be in the application's execution path, not just its logging path. Identify that contract before changing SDK initialization"
canonical: https://caveman.so/switch/promptlayer
last-updated: 2026-09-07
---

# Add Caveman without breaking PromptLayer prompt releases

Keep prompt delivery stable during the first Caveman trial. PromptLayer may be in the application's execution path, not just its logging path. Identify that contract before changing SDK initialization or provider calls.

Local Caveman tools can be evaluated independently. Moving broader observability and evaluation workflows requires a private Caveman Platform pilot; there is no universal PromptLayer project importer.

## Classify every integration point

Find prompt fetches, managed workflow calls, provider wrappers, logging calls, evaluation jobs, release labels, and webhooks. Record which calls must succeed for the application to produce an answer.

For each production prompt, preserve its identifier, exact version, variables, model configuration, and fallback behavior. If a release label can move, save the resolved version used by the baseline.

Review [PromptLayer's API documentation](https://docs.promptlayer.com/reference/introduction) and [prompt-registry webhook documentation](https://docs.promptlayer.com/features/prompt-registry/webhooks) for your integration. Retain deployment jobs that depend on those events until their replacements are tested.

## Save a reproducible prompt baseline

Choose tasks that exercise required variables, optional fields, tool calls, and a malformed input. Include a prompt-registry outage if your application defines fallback behavior.

Record the rendered prompt and tool definitions only where your data policy allows it. Otherwise preserve a reproducible fixture and its version identifiers. Keep expected outputs and scorer code with the test, not only the latest score.

Use the same resolved prompt version for direct and candidate runs. A prompt release during the test would make the result ambiguous.

## Test the expensive context separately

Inspect a representative tool result with the local CLI:

```bash
npm install -g @caveman-ai/cli
caveman shrink --file ./fixtures/catalog-results.json
```

Check that the smaller view preserves the fields the task needs. Where recovery is offered, retrieve an omitted detail using the emitted handle. Follow [the compression guide](/guides/prompt-compression) for an end-to-end task trial.

For a supported local coding agent:

```bash
caveman setup --install
caveman doctor claude
caveman claude
```

This tests the launched session. It does not intercept every application that uses PromptLayer, import its prompts, or execute its managed workflows.

## Keep runtime and collection changes separate

If the application fetches prompts from PromptLayer and calls a provider itself, you may be able to keep prompt fetching intact while testing a supported model-client path. Verify the actual request protocol, authentication, tools, and streaming behavior before changing the endpoint.

If PromptLayer executes the model call or workflow for you, a laptop-local proxy is not automatically in that path. Start with exported test fixtures or a staging application whose execution you control. Do not assume an OpenAI-shaped client means the same place runs inference.

For Platform access, agree on the supported event source and capture policy with Caveman. Compare a small staging run's usage, errors, parent relationships, and prompt provenance against the source records.

## Validate the release process

| Contract | Acceptance check |
| --- | --- |
| Prompt selection | Caller resolves the intended version |
| Variables | Required values and validation remain correct |
| Workflow execution | Branches and tool side effects match expectations |
| Release automation | Labels and webhook consumers still update correctly |
| Evaluation | Same grader checks the final output |
| Cost evidence | Complete run includes retries and recovery |

Only migrate the responsibility that has passed its check. Keep the registry or managed workflow in PromptLayer if the candidate does not cover it.

## Roll back

Restore the original client path, resolved prompt configuration, and collection settings. Retain the previous release and its credentials until every consumer has moved. Confirm a fresh request uses that release after rollback.

Read [Caveman vs PromptLayer](/compare/promptlayer) for the decision and [agent evaluations](/guides/agent-evaluations) for judging the candidate without changing the grading rules halfway through.
