Prompts Encode
# `prompts_encode`
Purpose-built encoder for chat-style prompts. It detects nested JSON, schemas, and metadata automatically.
## Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | `Any` | ✅ | Chat payload (`messages`, `tools`, `metadata`, etc.). |
| `options` | `EncodeOptions` | ❌ | Same tuning knobs as `compress`. |
| `auto_detect_json` | `bool` | ❌ (default `True`) | Detect JSON fragments embedded inside strings. |
| `schemas` | `dict[str, Any]` | ❌ | Supply JSON Schemas to help Kaizen segment structured fields. |
| `metadata` | `dict[str, Any]` | ❌ | Arbitrary observability data echoed in responses. |
| `token_models` | `list[str]` | ❌ | Request model-specific token stats. |
## Code examplewhen to use it
Community prompt sourced from the open-source GitHub repo getkaizen/kaizen-sdk (Apache-2.0). A "Prompts Encode" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
getkaizen/kaizen-sdk · Apache-2.0
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar