In Module 7.5, you built a dapr-deployment skill that understands sidecar architecture, state management, pub/sub, and service invocation. That skill can generate code for stateless microservices. But your AI agents need more.
Consider a chat agent that maintains conversation history for thousands of concurrent users. Each user needs isolated state, and you want state to persist even when pods restart. Or consider an order processing workflow that must survive failures, retry automatically, and rollback gracefully if payment fails.
These patterns require two advanced Dapr building blocks: Actors for stateful entities with identity, and Workflows for durable orchestration. Your current skill does not know these patterns.
This lesson extends your Dapr skill with actor and workflow capabilities. You will write a specification defining what your skill should learn, fetch official documentation using /fetching-library-docs, and update your skill with production-ready patterns. By the end, your skill will generate actor interfaces, workflow definitions, and runtime setup code grounded in official Dapr documentation rather than memory.
The traditional approach would be: read about actors, try some code, maybe build something, and later codify what you learned. The problem? By "later," you have forgotten the nuances, and your skill ends up with hallucinated patterns.
The Skill-First approach inverts this:
This ensures your skill contains accurate, production-ready patterns from day one. Every lesson in this chapter will test and improve this skill, so the investment compounds.
Start with a clean environment. Your skills-lab may have accumulated state from previous chapters.
Why fresh clone? Skills accumulate context. If your previous skill had errors, they propagate. A fresh clone ensures you start from known-good state.
Verify your existing Dapr skill exists:
Expected output:
If dapr-deployment does not exist, you need to complete Module 7.5 first. This lesson assumes you have the base skill from that chapter.
Before extending your skill, write a specification that defines exactly what it should learn. This prevents scope creep and ensures focused improvement.
Create LEARNING-SPEC.md in your skill directory:
Write the specification:
This specification serves two purposes:
Now use /fetching-library-docs to retrieve the official Dapr Python SDK documentation. This ensures your skill is grounded in authoritative sources, not AI memory.
What you're retrieving:
Review the output and note:
What you're retrieving:
Review the output and note:
Open your skill file and add the actor knowledge section:
Add this section to your skill (after the existing content):
Continue adding the workflow knowledge section:
Workflows MUST be deterministic for replay to work.
DO NOT use in workflows:
DO use:
Test your skill against the success criteria from your LEARNING-SPEC.md.
"Using my dapr-deployment skill, generate a TaskActor that stores task state and has a deadline reminder." Expected: Your skill should generate code matching the patterns you added, with proper imports, StateManager usage, and reminder registration.
"Using my dapr-deployment skill, generate a TaskProcessingWorkflow with validate, assign, and notify activities." Expected: Your skill should generate a workflow with yield-based activity calls, proper dataclass inputs/outputs, and WorkflowRuntime setup.
"When should I use a Dapr actor vs a Dapr workflow for my AI chat agent that needs conversation history and also needs to process multi-step reasoning chains?" Expected: Your skill should recommend actors for conversation state (per-user identity, turn-based concurrency) and workflows for multi-step reasoning (durable execution, retry on failure).
You now have an extended dapr-deployment skill that:
Now practice extending skills with AI collaboration. These prompts help you explore actor and workflow patterns beyond what we covered.
"Using /fetching-library-docs, fetch the Dapr actors documentation for Python. I want to understand actor reentrancy, garbage collection timeout, and actor-to-actor communication. Summarize the key patterns I should add to my dapr-deployment skill." What you're learning: Using AI to research official documentation and extract patterns for skill extension.
"Help me extend my dapr-deployment skill with workflow patterns. Using /fetching-library-docs for dapr-ext-workflow, find: fan-out/fan-in, saga pattern, and monitor pattern. Show me the code patterns I should add to my skill." What you're learning: Collaborative pattern discovery where AI fetches documentation and you encode those patterns.