Overview

As AI systems mature, teams need more than model access. They need prompt lifecycle control, encrypted configuration, and a standard way to turn existing APIs into reusable tools. Console covers those operational layers in one place.

This use case is for platform teams that want prompt changes, secret/config handling, and OpenAPI-to-MCP conversion managed centrally instead of scattered across apps.

When to reach for this recipe

If your team needs the capabilities described above and you'd rather build on proven primitives than wire one from scratch — this is the shape to start from.

Architecture

Console owns prompt deployments, config groups and items, MCP servers, and tool discovery. Console SDK gives app and platform teams a typed interface to render prompts, resolve config, and call these platform capabilities from CI pipelines or admin backends.

1. Manage Prompt Versions From Console

List prompt versions, compare them, and promote the right version into the right environment without changing application code.

1import { ConsoleClient } from '@cognipeer/console-sdk';
2 
3const client = new ConsoleClient({
4 apiKey: process.env.COGNIPEER_API_KEY!,
5 baseURL: 'https://console.example.com',
6});
7 
8const { prompt } = await client.prompts.get('incident-summary', {
9 environment: 'staging',
10});
11 
12const versions = await client.prompts.listVersions('incident-summary');
13const comparison = await client.prompts.compare(
14 'incident-summary',
15 versions.versions[0].id,
16 versions.versions[1].id,
17);
18 
19await client.prompts.deploy('incident-summary', {
20 action: 'activate',
21 environment: 'prod',
22 versionId: versions.versions[0].id,
23 note: 'Promote the tested incident-summary prompt to production',
24});

2. Store Secrets And Runtime Settings In Config

Console config groups are useful for provider secrets, webhook targets, or environment-specific runtime knobs that should not live in app source code.

1const group = await client.config.createGroup({
2 name: 'Incident Automation',
3 tags: ['sre', 'automation'],
4});
5 
6await client.config.createItem(group.key, {
7 name: 'Jira API Token',
8 value: process.env.JIRA_API_TOKEN!,
9 isSecret: true,
10 tags: ['jira'],
11});
12 
13await client.config.createItem(group.key, {
14 name: 'Default Severity Threshold',
15 value: 'sev-2',
16 tags: ['runtime'],
17});
18 
19const resolved = await client.config.resolve({
20 keys: ['cfg-jira-api-token', 'cfg-default-severity-threshold'],
21});
22 
23console.log(resolved['cfg-default-severity-threshold'].value);

3. Convert OpenAPI Specs Into MCP Servers

Console can expose an uploaded OpenAPI spec as an MCP server. That gives agents and tools a consistent protocol surface instead of raw one-off HTTP integrations.

1// Example Console workflow:
2// 1. Open Console > MCP Servers
3// 2. Upload the Jira or internal incident API OpenAPI spec
4// 3. Console parses operations and creates MCP tools automatically
5// 4. Agents can consume the generated MCP endpoint or import actions into the tool system
6 
7// Example generated action shapes from an OpenAPI spec:
8// - createIncidentComment
9// - getIncidentById
10// - listServiceHealthChecks
11 
12// Console then exposes a tenant-scoped MCP endpoint for these actions.

Result

You get a platform operations pattern that:

- Versions and deploys prompts through Console - Stores secrets and runtime settings in encrypted config groups - Converts OpenAPI specs into MCP servers and reusable tool actions - Reduces app-side duplication for prompt, config, and API integration management

All recipesSuggest a change