Model-backed endpoint
For a server route that generates a reply, attach the integration where the route obtains its OpenAI client. Keep the calling code and its usual response handling in place.
Thin, dependency-free SDKs wrap LLM and MCP clients to deliver edge caching, request telemetry, and policy controls with TypeScript-first ergonomics.
Start with your client
Install the package, then wrap your workflow
Connect your client
OpenAI SDK or MCP client/server
Instrument the workflow
Capture request and response activity
Add caching and controls
Configure behavior for your use case
SDKs for OpenAI, MCP clients and servers that provide automatic caching, request/response instrumentation, scoped privacy, and programmatic purge APIs with TypeScript-first ergonomics.
Quick integrations
Add instrumentation to OpenAI and MCP workflows while keeping familiar APIs.
Drop-in wrapper that enables cache + telemetry instantly. Works with your existing OpenAI client configuration.
import OpenAI from "openai";
import { Alchymos } from '@alchymos/openai';
const openai = new OpenAI(process.env.OPENAI_API_KEY);
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);
alchymos.withLlm(openai);Instrument client-side tool calls for caching and metrics. Seamlessly integrates with the Model Context Protocol.
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { Alchymos } from '@alchymos/mcp';
const client = new Client();
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);
alchymos.withClient(client);Server middleware for edge caching and observability. Add caching capabilities to your tools with one line.
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { Alchymos } from '@alchymos/mcp';
const server = new Server();
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);
alchymos.withServer(server);Developer experience
Our SDK is designed for modern TypeScript environments. It includes full type definitions, zero runtime dependencies, and flexible configuration options for granular control.
Keep your bundle size small and fast.
Full type safety and autocompletion.
Cache scoped to specific orgs or users.
Replay logs locally without hitting API.
import OpenAI from "openai";
import { Alchymos } from '@alchymos/openai';
const openai = new OpenAI(process.env.OPENAI_API_KEY);
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);
alchymos.withLlm(openai);
const response = await openai.chat.completions.create(params);Pick a representative workflow with predictable inputs and an existing way to verify its output. A staging environment gives you room to compare behavior before rollout.
Start with the OpenAI or MCP integration example above. Initialize the integration where your application creates that client and load credentials from server-side environment variables.
Compare the same requests before and after the change. Check response shape, application error handling, and the cache behavior you expect for repeated inputs.
Inspect request latency, errors, and cache outcomes for the first workflow. Carry the integration to another client once you understand the behavior of the first one.
Start where your application makes a model or tool call. In a workflow with several services, put the integration where the team can identify the caller and see the request outcome.
For a server route that generates a reply, attach the integration where the route obtains its OpenAI client. Keep the calling code and its usual response handling in place.
For an MCP workflow, start at the boundary responsible for the calls you want to understand. A client can see which tools the agent asks for, while a tool server can see what happens during execution.
Make it easy to tell which service, credentials, and settings produced a request. That context helps when a workflow behaves differently in staging and production.
Use environment-specific credentials and representative test data. Exercise an ordinary response, a provider error, and a repeated call before widening the rollout.
Keep client setup in the service that owns the call. Record which workflow was enabled and which settings it uses so the team can interpret changes in latency or errors.
Run one known request and follow it from client initialization through the upstream response. This gives you a concrete request to inspect as you narrow down the issue.
Check that the code path handling the request uses the client you instrumented. A worker, alternate endpoint, or fallback can create and use a separate instance.
Check whether the inputs and scope match and whether the earlier response was eligible for reuse. Confirm that the repeat happened before the expected expiry.
Keep Alchymos and provider keys in your server environment or secret manager. Browser code can call a server endpoint that uses those keys to make the upstream request.
Choose the client side to observe outbound tool calls or the server side to focus on tool execution. Start at the boundary you control and trace a known request through it.
Check that each operation’s result is safe to reuse, that its scope reflects the caller’s permissions, and that an expired result can be fetched from the upstream service.