Agent SDK and Claude Code Configuration: Worked Example — Developer Productivity and Operational Enablement (Claude Certified Architect - Professional)
Agent SDK and Claude Code Configuration — Worked Example This worked example demonstrates how a senior architect configures the Claude Agent SDK and...
Agent SDK and Claude Code Configuration — Worked Example
This worked example demonstrates how a senior architect configures the Claude Agent SDK and Claude Code to enable a team workflow while maintaining safety, automation guardrails, and human accountability. The scenario involves packaging a Claude Code workflow proven on one team for organisation-wide use and configuring the Agent SDK to support multi-mode permissions and automation.
Scenario Overview
An AI development team has created a Claude Code workflow automating customer support ticket triage. The architect must package this workflow as a plugin with all necessary components, configure the Claude Agent SDK for team use, and establish controls that preserve human ownership of AI-generated code.
Step 1: Packaging the Claude Code Workflow
- Identify Plugin Contents: The workflow includes Agent Skills for ticket classification, hooks for pre- and post-processing, subagents handling escalation logic, commands for manual override, and MCP (Model Context Protocol) configuration to optimize prompt caching and context window usage.
- Define Managed Settings: Central controls enforce rate limits and logging to ensure safety when running unattended. Permissions for manual override commands are restricted to senior agents.
- Plugin Marketplace Preparation: The packaged plugin is documented with versioning and metadata, then published to the internal marketplace for organisation-wide adoption.
Step 2: Configuring the Claude Agent SDK
- Permission Modes: The architect configures the SDK with multiple permission modes:
- default for routine triage operations
- acceptEdits allowing agents to review and edit AI suggestions
- plan mode enabling the agent to generate multi-step plans for complex tickets
- auto for fully automated triage on low-risk tickets
- dontAsk to suppress unnecessary user prompts during batch processing
- bypassPermissions reserved for emergency override by administrators
- Hooks and Subagent Definitions: Pre-processing hooks validate incoming ticket data; post-processing hooks log outcomes and trigger notifications. Subagents manage escalation and fallback logic.
- Headless and CI Operation: The SDK is configured for headless operation in the continuous integration pipeline to automatically test workflow changes and enforce quality gates.
Step 3: Establishing Human Accountability
- Review Process: The architect designs a workflow where AI-generated code and triage decisions are logged and reviewed periodically by human agents.
- Control Selection: Controls such as acceptEdits mode ensure agents retain ownership by reviewing and modifying AI outputs before final submission.
- Audit Trails: Logs from the Agent SDK and Claude Code executions provide traceability for compliance and debugging.
Step 4: Reasoning from Artifacts
The architect analyses configuration files and logs to verify that permission modes align with organisational policies and that hooks correctly enforce safety checks. For example, a log excerpt shows a ticket triage operation in acceptEdits mode where a human agent modified the AI suggestion before approval, preserving accountability.
Worked Example: Configuring Permission Modes
Problem: The team wants to automate triage for low-risk tickets but requires human review for high-risk ones. How should the architect configure permission modes in the Claude Agent SDK?
Solution:
- Assign auto mode for low-risk tickets to enable unattended triage.
- Use acceptEdits mode for high-risk tickets to require human review and modification.
- Implement hooks to classify ticket risk before processing to route to the correct mode.
- Configure logging hooks to capture all decisions for audit.
This configuration balances automation efficiency with human oversight, meeting safety and accountability requirements.
Summary
By carefully packaging Claude Code workflows with all plugin components, configuring the Claude Agent SDK with nuanced permission modes and hooks, and designing accountability controls, the architect ensures the AI-assisted development workflow is scalable, safe, and human-centric. This approach aligns with exam domain 7 requirements for the Claude Certified Architect - Professional certification.
More in this topic
Preparing for the Claude Certified Architect Professional exam?
Start free with 5 practice quizzes a day and track your progress.
Practise Claude Certified Architect Professional questions free →