Add Agent Playbooks
RedisOfficialCreated by redis
- Skill
- Workflow
- Automation and integrations
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for migrating existing agent prompts, document retrieval, or semantic caches into Redis Iris Agent Playbooks. It guides developers through orienting their current agent architecture, provisioning the necessary infrastructure, authoring and publishing content (FAQs and Skills), and integrating these components into the application runtime. The process emphasizes verifying agent behavior through controlled application turns, ensuring that approved answers and procedures are correctly loaded and executed.
What it does
- Maps existing agent tasks and answers to structured Playbook Skills and FAQs.
- Provides commands to validate, plan, and sync content files for deployment.
- Guides the integration of Playbook context objects into Python agent runtimes.
- Facilitates verification of agent turns to ensure content is correctly retrieved and followed.
- Supports the implementation of review proposals for uncovered agent queries.
- Assists in cleaning up obsolete prompt-based logic after successful migration.
When to use it
- When you need to move hardcoded procedures or answers out of prompts into a managed system.
- When implementing a semantic response cache for an existing agent.
- When you need to standardize agent behavior across multiple audiences.
- When you want to enable a review process for agent responses to uncovered queries.
Advantages
- Decouples business logic and approved answers from the agent's core prompt.
- Enables versioned management of agent procedures and FAQs.
- Supports audience-specific content delivery via attributes.
- Provides a clear path for verifying and debugging agent turns.
Usage examples
- “How do I start migrating my agent's refund procedure to a Playbook?”
- The agent will guide you through creating a new Skill directory, defining the procedure in a Markdown file, and using the CLI to validate and sync the content.
- “I need to add an FAQ for our shipping policy to my existing agent.”
- The agent will help you format the FAQ as a JSON entry, validate it against your project structure, and publish it to the active environment.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/redis/add-agent-playbooks/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip add-agent-playbooks.zip -d .agents/skills
Documentation by redis
Add Agent Playbooks
Bring an existing Python agent to one verified Playbook-backed turn, then finish the requested content migration or integration. FAQs supply published answers; Skills supply procedures loaded separately from discovery previews. The application owns response policy, tool permissions, and approval of actions.
1. Orient and choose the behavior
Find the model call, tool registration, framework/version, and existing policy or procedure sources. Preserve the graph, business tools, and global response/authorization rules. Infer these decisions from the request and code; ask only about unresolved choices and state defaults used:
| Decision | Result |
|---|---|
| Which repeated tasks need procedures? | One Skill per procedure; skip when none. Move task-specific tool guidance out of prompts. |
| Which questions require approved answers? | One FAQ per approved answer; skip when none. |
| Which audiences use the content? | One audience: no attribute or filter. Several: matching attributes on content and a trusted runtime audience. |
| Should uncovered answers be submitted for review? | Default no. Yes: choose automatic uncovered proposals or an application-owned quality/privacy gate; preserve existing gates. |
| Where does the content live today? | Convert relevant prompt text, docs, or retrieved content into versioned files. Retain authoritative sources. |
Prefer progressive disclosure when the agent can execute tools; use score-based hooks otherwise. Define clarification, escalation, and outage behavior: approved-only answers need an explicit policy for insufficient content.
2. Check prerequisites and connect
Follow provisioning for the short prerequisite check and new, partial, or existing setup. Reuse usable configuration and published content. Local defaults require a running stack; Cloud and self-managed administration use different paths.
Check framework APIs against the installed version before editing. Use an available docs MCP. For the CLI, run iris agent-playbooks <command> --help. Inspect installed package source when documentation does not match the installed API. Report unresolved compatibility questions.
3. Publish the first relevant content
Follow content authoring for file formats, quality checks, audience attributes, validation, previews, and publication. Begin with one approved FAQ or procedure relevant to the requested task; use both only when needed. Confirm its serving version before wiring the agent. Complete any broader requested migration after the first turn works.
4. Integrate with the application
Follow runtime integration for the chosen mode, async variants, and framework placement. Create one configured context object and use it throughout. Build context from the base prompt afresh each turn. Register disclosure tools with both the model and executor.
5. Run, inspect, and improve
Follow first success: execute the actual application, inspect the content keys/versions and procedure loads, check a paraphrase and missing-content behavior, fix observed gaps, and rerun. Show the user what worked and how to repeat it. Once replacement reads work, remove obsolete runtime prompt/retriever/cache code and its unused embedding pipeline; run affected application checks on the final integration.
6. Hand off and maintain
Use the handoff in first success to distinguish observed results from unverified work and leave an exact repeat command. Walk through the next approved content update, naming the content owner/publisher and any remaining deployment configuration.
Essential constraints and optional paths
Every
iriscommand uses root options--json --no-input. The CLI handles administration and content management; the Python SDK runs inside the application.Keep runtime
.envcredentials separate from.env.contentpublishing credentials and administrative tokens. Grant the agentread, addingproposeonly for submissions. Never print secrets or commit env files.Publication selects serving content. A proposal is a review candidate; submitting or accepting one does not implicitly publish it.
For a semantic response cache, read cache migration before replacing its lookup/write path.
For background proposals from Agent Memory, read Memory extraction before enabling another submission path.
Files
- ATTRIBUTION.mdAdded by AutoGineer894 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md4.9 KiB
- references/content.md4.4 KiB
- references/first-success.md6.1 KiB
- references/integration.md4.1 KiB
- references/memory-extraction.md2.0 KiB
- references/provisioning.md11.6 KiB
- references/response-cache.md2.1 KiB
references/integration.md
Integrate Playbooks with the agent
Read this when adding or checking runtime discovery, procedure loading, and proposal submission. Use the choices from the main skill.
Create the Playbook once at startup, with the environment loaded by the application's launcher. from_env() reads process variables, not iris.toml or dotenv files by itself. A working CLI profile does not configure the application's SDK:
from redis_iris import AgentPlaybooks
playbook = AgentPlaybooks.from_env()
audience = None # e.g. "support" only when the content has that attribute
propose_uncovered = False # use the decision from the main skillCreate one of these objects with those same choices:
# Progressive disclosure: the model chooses which procedure to load.
context = playbook.disclosure(audience=audience, propose_uncovered=propose_uncovered)Register all three tools from context.tools(): load_skill, read_skill_resource, and discover_playbook. Adapt their name, description, JSON-schema parameters, and sync/async call to the framework's tool interface. Give the same tools to the model and its tool executor. Instruct the model to load a Skill using the key and version shown in the menu before following it.
# Score-based hooks: the top matching procedure is loaded automatically.
context = playbook.hooks(
audience=audience,
propose_uncovered=propose_uncovered,
load_skills_above=0.75,
)Tune that threshold against observed scores. These hooks load one Skill's instructions; they do not register resource-loading tools. Procedures needing attached files require explicit resource reads or progressive disclosure.
For either mode, insert the context before the model and submit the accepted final answer afterward:
system_prompt = f"{BASE_SYSTEM}\n\n{context.before(question)}"
# Run the existing agent with this prompt, its response policy, and its tools.
context.after(question, answer)Build from the base prompt afresh each turn to avoid accumulating old content. Async equivalents are abefore and aafter.
Preserve the application's response/authorization rules in BASE_SYSTEM and its acceptance path. Define how it asks for clarification or escalates insufficient content. Playbook failures raise by default; implement the agreed outage behavior using the application's existing error handling. Use the SDK's optional fail_open only when continuing without Playbook guidance fits that policy.
| Framework | Placement |
|---|---|
| LangGraph | attach(context, graph) from redis_iris.integrations.langgraph, before compile(). For disclosure, add langchain_tools(context) to both bind_tools and ToolNode. Use answer_from= if the accepted answer lives outside the last message. |
| Google ADK | attach(context, agent) from redis_iris.integrations.adk. Register adapted disclosure tools separately. |
| OpenAI Agents SDK | Add context through dynamic instructions; call after on the final answer after Runner.run. |
| Pydantic AI | Add context through a dynamic system prompt; call after after agent.run. |
| CrewAI | Add context to task/agent inputs before execution; use the final accepted task output for after. |
| Plain loop | Assemble context before the model call; call after after the final answer. |
Use the configured context object throughout. Passing playbook to attach constructs fresh default hooks and loses the choices above.
propose_uncovered=True files the final answer unchanged as an FAQ proposal only when discovery is empty and neither truncation flag is set. It has no source or evidence. If submission needs a judge, normalization, provenance, or evidence, leave automatic proposals off and call playbook.propose_faq(...) behind the application's existing gate. An identical candidate resolves to an existing proposal; a different answer can create another.
For direct retrieval, custom filters, version-frozen turns, FAQ/Skill proposal APIs, and package submission, inspect the installed redis_iris.agent_playbooks source. If sessions are also recorded in Agent Memory, read memory extraction before enabling a second proposal path.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- redis
- Publisher
- Redis (Official)
- Source
- redis/agent-skills · skills/add-agent-playbooks · commit 74708da
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- redis/agent-skills
AutoGineer is not affiliated with or endorsed by redis.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download add-agent-playbooks.zip