- Home
- Skills
- Agents & Orchestration
- Agent SDK Starter: Claude Agents in Python or TS
Works with the AI Agents you already use
Agent SDK Starter: Claude Agents in Python or TS
Scaffolds a production-ready agent on the Claude Agent SDK: custom tools and MCP servers, minimal permissions, sessions, streaming, cost logging, tests and a Docker-ready HTTP or worker wrapper.
Free
Agent SDK Starter: Claude Agents in Python or TS
Example session with this skill installed
Scaffold a Python agent using the Claude Agent SDK that has a tool for searching a local SQLite database and requires permission for any write operations.
- Read your context and instructions
- Compiled the agent sdk starter
I have scaffolded a production-ready Python agent project using the Claude Agent SDK. The structure includes a custom SQLite tool with explicit permission hooks for write operations and a FastAPI wrapper for deployment.
Agent Backend Scaffold
# src/agent.py
import os
from dotenv import load_dotenv
from anthropic_ai_sdk import ClaudeAgent
from tools.db_tool import sqlite_search_tool, sqlite_write_tool
load_dotenv()
def permission_callback(tool_name, inputs):
if tool_name == "sqlite_write_tool":
# Logic for human-in-the-loop or auto-deny
return False
return True
agent = ClaudeAgent(
model="claude-3-5-sonnet-20240620",
system_prompt_path="prompts/system.md",
allowed_tools=[sqlite_search_tool, sqlite_write_tool],
permission_callback=permission_callback,
max_turns=10
)
async def run_query(query: str, session_id: str = None):
async for message in agent.stream(query, session_id=session_id):
print(f"Token usage: {message.usage}")
yield message
# Directory Tree
.
├── agent/
│ ├── src/
│ │ ├── agent.py
│ │ └── tools/
│ │ └── db_tool.py
│ ├── prompts/
│ │ └── system.md
│ ├── tests/
│ │ └── test_agent.py
│ ├── .env.example
│ ├── Dockerfile
│ └── requirements.txt
Next steps
- Add your
ANTHROPIC_API_KEYto the.envfile. - Run
pip install -r requirements.txtto install the SDK and dependencies. - Execute
python src/agent.pyto start the query loop in the CLI.
Connects securely to your tools. The creator never sees your data.
About this skill
Building production-grade agents requires more than just a system prompt. This skill scaffolds full-stack agent backends using the official Claude Agent SDK to handle tool execution, session persistence, and safety guards.
What it does
- Multi-language scaffolding generates complete project structures in either Python or TypeScript using official SDKs.
- Tool integration implements custom tools and MCP server helpers with strict JSON input schemas.
- Session management enables conversation persistence and resuming via unique session IDs.
- Safety implementation configures explicit permission callbacks and tool timeouts to prevent runaway execution.
- Production deployment provides Dockerized FastAPI or Express wrappers for API-ready agent hosting.
How it works
- Define the spec by detailing the agent purpose, required tools, and preferred language (Python/TS).
- Generate the scaffold to receive a structured repository including tool directories and environment templates.
- Configure the core through
allowed_toolsdefinitions, system prompt loading, and streaming setups. - Implement safety by setting up permission hooks and denying destructive actions by default.
- Execute and test using the provided CLI test scripts or end-to-end prompt suites.
Frameworks & tools
Supports Python claude-agent-sdk and TypeScript @anthropic-ai/claude-agent-sdk. Scaffolds include FastAPI, Express, Docker, and MCP (Model Context Protocol).
Why this beats prompting it yourself
Prompting a model to "write an agent" often results in a single-file script that ignores production requirements like token tracking, structured tool errors, and session state. This skill enforces the official SDK patterns and directory structures required for scalable, safe deployments.
Use cases
- Scaffold a customer support agent with access to internal database tools.
- Build a CLI research agent using MCP servers for web search and file access.
- Create a persistent backend for an agentic web application.
- Deploy a secure agent worker that requires human-in-the-loop permission for API calls.
Known limitations
Requires an Anthropic API key and local environment setup for Python or Node.js to run the generated code.
Requires Anthropic API key. User must manually verify generated code against the latest SDK version updates. Scaffolds do not include frontend UI components.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 4 days ago
- Free with an Agensi account