Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
Joined May 2026
258 Following    220 Followers
# Practical ways to use the Claude Agent SDK ๐Ÿค– Delegate specialized tasks to sub-agents and keep your main context lean. Sub-agents delegate specific subtasks to specialized agents, enabling parallel and expert processing without polluting the main agent's context. ๐Ÿ“Œ Title: Sub-agents in the SDK ๐Ÿ”— URL: ๐Ÿงฉ Overview Define specialized agents via the `agents` parameter. The main agent calls them through the `Agent` tool. Each sub-agent gets its own prompt, tool restrictions, and model settings. Results return as summaries to the main agent. ๐Ÿ›  How to use it Define sub-agents in the `agents` parameter using `AgentDefinition` with `description`, `prompt`, `tools`, and `model`. Include `"Agent"` in `allowed_tools` to auto-approve sub-agent invocations. Each sub-agent gets its own tool restrictions, prompt, and model settings. ๐Ÿ— Practical usage - Delegate large file exploration to a `research-assistant` sub-agent, returning only summaries to the parent. Keeps main context lean. - Run `style-checker` / `security-scanner` / `test-coverage` concurrently, reducing code review time from minutes to seconds. - Give a `database-migration` sub-agent SQL best practices and rollback strategies in its prompt for expert handling. - Use factory functions to dynamically select `model: "opus"` vs `sonnet` based on runtime conditions. ๐Ÿ’ก Use cases ๐Ÿ” Delegating large-scale file exploration โšก Parallel code review (style/security/coverage) ๐ŸŽฏ Expert task splitting across specialized agents โš ๏ธ Watch out Sub-agents cannot spawn their own sub-agents (one level only). For large-scale orchestration, use the `Workflow` tool (TS v0.3.149+). Capture `agentId` and `session_id` for follow-up via `resume`. #ClaudeAgentSDK# #AI#
Show more