{"id":31580979,"url":"https://github.com/kingabzpro/claude-agent-projects","last_synced_at":"2026-05-18T10:38:31.140Z","repository":{"id":317281194,"uuid":"1066733125","full_name":"kingabzpro/claude-agent-projects","owner":"kingabzpro","description":"Claude Agent SDK + Claude 4.5: three minimal projects, from one-shot to custom-tool agents.","archived":false,"fork":false,"pushed_at":"2025-09-29T22:59:17.000Z","size":13,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-09T13:17:46.513Z","etag":null,"topics":["claude-agent-sdk","claude-code","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kingabzpro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T22:10:08.000Z","updated_at":"2025-10-09T10:48:03.000Z","dependencies_parsed_at":"2025-09-30T01:45:07.434Z","dependency_job_id":null,"html_url":"https://github.com/kingabzpro/claude-agent-projects","commit_stats":null,"previous_names":["kingabzpro/claude-agent-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kingabzpro/claude-agent-projects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2Fclaude-agent-projects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2Fclaude-agent-projects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2Fclaude-agent-projects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2Fclaude-agent-projects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kingabzpro","download_url":"https://codeload.github.com/kingabzpro/claude-agent-projects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2Fclaude-agent-projects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33175193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-agent-sdk","claude-code","python"],"created_at":"2025-10-05T21:51:46.027Z","updated_at":"2026-05-18T10:38:31.127Z","avatar_url":"https://github.com/kingabzpro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Agent SDK Tutorial Projects\n\nThis repository contains three progressive tutorial projects demonstrating the Claude Agent SDK, from simple one-shot queries to advanced multi-tool applications.\n\n## Prerequisites\n\n- Python 3.10+\n- Node.js 18+ (required by Claude Code CLI)\n- Claude Code CLI installed and configured\n- Claude API access\n\n## Installation\n\n### 1. Install Claude Code CLI\n\n**For Windows:**\n```powershell\nirm https://claude.ai/install.ps1 | iex\n```\n\n**For other platforms:**\n```bash\nnpm i -g @anthropic-ai/claude-code\n```\n\n### 2. Install Python SDK\n\n```bash\npip install claude-agent-sdk\n```\n\n### 3. Install project dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n## Tutorial Flow\n\n### 🟢 Easy: One-shot Blog Outline\n\n**Project**: `blog_outline/oneshot_outline.py`\n\nA simple one-shot query that demonstrates basic Claude Agent SDK usage without tools.\n\n```bash\npython blog_outline\\oneshot_outline.py\n```\n\n**What you'll learn:**\n- Basic SDK setup with `ClaudeAgentOptions`\n- Simple async query execution\n- Message streaming and text extraction\n- No tools required - pure AI response\n\n**Key concepts:**\n- `query()` function for one-shot interactions\n- `AssistantMessage` and `TextBlock` handling\n- Async/await patterns\n\n---\n\n### 🟡 Medium: InspireBot CLI\n\n**Project**: `inspire_me/inspire_web.py`\n\nA CLI tool that combines web search with a custom fallback tool for motivational quotes.\n\n```bash\npython inspire_me\\inspire_web.py\npython inspire_me\\inspire_web.py \"women in leadership\"  # with custom topic\n```\n\n**What you'll learn:**\n- Custom tool creation with `@tool` decorator\n- MCP server setup with `create_sdk_mcp_server`\n- Tool fallback strategies (WebSearch → custom tool)\n- Terminal UI enhancements (typewriter effect, colors)\n- Tool usage visualization\n\n**Key concepts:**\n- Custom tool definition and implementation\n- MCP server configuration\n- `allowed_tools` and `mcp_servers` options\n- Tool execution flow and result handling\n- CLI argument parsing\n\n---\n\n### 🔴 Advanced: NoteSmith Multi-Tool App\n\n**Project**: `note_smith/app.py`\n\nA comprehensive notes application with multiple tools, safety hooks, and usage tracking.\n\n```bash\npython note_smith\\app.py\n```\n\n**Commands:**\n- `/summarize \u003curl\u003e` - Summarize web pages\n- `/note \u003ctext\u003e` - Save notes locally\n- `/find \u003cpattern\u003e` - Search saved notes\n- `/help` - Show available commands\n- `/exit` - Quit the application\n\n**What you'll learn:**\n- Multi-tool applications with built-in and custom tools\n- Safety hooks with `HookMatcher` and `HookContext`\n- Persistent data storage (local file system)\n- Interactive CLI with command parsing\n- Usage tracking and cost monitoring\n- Error handling and graceful degradation\n\n**Key concepts:**\n- `ClaudeSDKClient` for persistent sessions\n- Multiple custom tools working together\n- File system operations and data persistence\n- Safety mechanisms to prevent dangerous operations\n- Usage statistics and cost tracking\n- Interactive application patterns\n\n## Project Structure\n\n```\n├── blog_outline/\n│   └── oneshot_outline.py     # Simple one-shot query\n├── inspire_me/\n│   └── inspire_web.py         # CLI with web search + custom tool\n├── note_smith/\n│   ├── app.py                 # Multi-tool notes application\n│   └── notes/                 # Generated notes storage\n├── requirements.txt           # Dependencies\n└── README.md                  # This file\n```\n\n## Key SDK Features Demonstrated\n\n### Core SDK Components\n- **`ClaudeAgentOptions`** - Configuration for model, system prompts, and tools\n- **`query()`** - One-shot interactions\n- **`ClaudeSDKClient`** - Persistent client for interactive applications\n\n### Tool System\n- **`@tool`** - Decorator for custom tool definition\n- **`create_sdk_mcp_server`** - MCP server creation\n- **Built-in tools** - WebSearch, WebFetch, Read, Write, etc.\n\n### Safety \u0026 Control\n- **`HookMatcher`** - Tool execution hooks\n- **`permission_mode`** - Tool execution permissions\n- **`allowed_tools`** - Tool whitelisting\n\n### Message Handling\n- **`AssistantMessage`** - AI responses\n- **`TextBlock`** - Text content\n- **`ToolUseBlock`** - Tool execution requests\n- **`ToolResultBlock`** - Tool execution results\n- **`ResultMessage`** - Final results with usage stats\n\n## Learning Path\n\n1. **Start with Easy**: Understand basic SDK patterns and async programming\n2. **Move to Medium**: Learn tool creation and MCP server setup\n3. **Master Advanced**: Build complex applications with multiple tools and safety features\n\nEach project builds upon the previous one, introducing new concepts while reinforcing core patterns.\n\n## Troubleshooting\n\n- Ensure Claude Agent CLI is properly configured\n- Check that your Claude API key has sufficient credits\n- Verify Python version compatibility (3.8+)\n- For NoteSmith, ensure write permissions in the project directory\n\n## Next Steps\n\nAfter completing these tutorials, you'll be ready to:\n- Build custom tools for your specific use cases\n- Create interactive CLI applications\n- Implement safety mechanisms for production use\n- Design multi-tool workflows\n- Handle complex message streaming patterns\n\nHappy building! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingabzpro%2Fclaude-agent-projects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingabzpro%2Fclaude-agent-projects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingabzpro%2Fclaude-agent-projects/lists"}