Skip to content
Back to skills

Compache Setup

ASecurity

Integrate Compache into a chatbot or coding agent, fit a policy on its conversations, and verify request routing and usage.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 26, 2026
ai-agentsgonodegit

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add BarendPotijk/compache --skill compache-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compache Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Compache Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/barendpotijk-compache-setup/badge)](https://www.skillsdirectory.com/skills/barendpotijk-compache-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: compache-setup
description: Integrate Compache into a chatbot or coding agent, fit a policy on its conversations, and verify request routing and usage.
---

# Integrate Compache into an application

Locate the code that constructs the model client, the conversation ID and the history passed on each call. Identify any existing gateway, compaction, retry loop and scheduler. Use one integration point per request path and retain the application's original conversation history for recovery.

## Choose the integration

- **Existing provider SDK.** Reuse the application’s configured OpenAI, Anthropic or Google GenAI client. Wrap it where it is created and use the returned client throughout the app. Bind the application conversation ID with `compache.thread(id)`.
- **Framework.** For LangChain `create_agent`, use the middleware with a stable graph thread ID. For a custom LangGraph node, inject the wrapped transport into the node that calls the model. For other frameworks, follow the [integration guide](https://github.com/BarendPotijk/compache/blob/main/docs/integrations.md) for their actual extension point.
- **Gateway or configurable base URL.** Point the application at `compache proxy`. Preserve the existing final destination by explicitly setting the intended upstream when a gateway or cloud deployment is in use.
- **Application-owned prompt and sends.** Create one `policy.session(thread_id)` per active conversation. The host supplies usage receipts and handles the reopen tool and scheduled pings. [Session lifecycle](https://github.com/BarendPotijk/compache/blob/main/docs/sessions.md)
- **Coding agent CLI.** Use `compache wrap --watch <agent>` to observe, or `compache wrap <agent>` for the learning integration. `compache wrap --print <agent>` shows the harness-specific routing settings.

## Select the data and policy

Apply an existing policy with `compache.wrap(client, policy)`. If starting with observation, explicitly enable local recording with `compache.wrap(client, record="compache-record")`. Keep that directory out of version control. The default record holds sizes, timing, usage and identifiers for observed dependencies. Exported traces and generated labeling packets may contain full text.

Chat fitting on metadata alone tunes caching and preserves history. To fit chat compaction, use existing dependency labels, or sampled labeling when the user has opted into sending conversation text to their configured provider in additional billable requests. For tool-loop agents, quote-based dependency evidence can be inferred during recording. Keep training and evaluation conversations disjoint and preserve their original IDs.

## Verify the application's path

Use the project’s existing tests or an in-memory provider. Confirm a completed turn appears in the record or increases the live call counter. For multi-turn changes, inspect the actual outgoing request and verify the original application history remains available. An application that sends only server-side references or an already-truncated history gives Compache less context to manage.

Report the integration point, policy source, and what was verified. State whether a cost is a modeled replay estimate, a usage-based estimate or a provider charge. For evaluated workloads, include cost units, the baseline and observed held-out retention. [Offline examples](https://github.com/BarendPotijk/compache/blob/main/examples/README.md) · [Diagnostics](https://github.com/BarendPotijk/compache/blob/main/docs/troubleshooting.md)

Files in this skill

  • SKILL.md4.1 KB
  • agents/openai.yaml226 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.