算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
agentic-ai-workflows【设计与创意】Design and implement agentic AI systems that autonomously chain multiple tools to complete complex tasks. Covers tool composability, multi-step reasoning, approval flows, error recovery, and production deployment patterns.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Agentic AI refers to systems where a language model autonomously plans, executes, and iterates on multi-step tasks using external tools. Unlike single-turn Q&A, agentic workflows involve tool chaining — where the output of one tool feeds the input of the next — enabling complex real-world automation.
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Tool A │────►│ Tool B │────►│ Tool C │
│ (Fetch Data)│ │ (Transform) │ │ (Take Action)│
└──────────────┘ └──────────────┘ └──────────────┘
│ │ │
▼ ▼ ▼
Context grows Model reasons Final result
with results about next step delivered
| Pattern | Description | Example |
|---|---|---|
| Sequential Chain | A → B → C in order | Fetch data → analyze → send report |
| Conditional Branch | If/else based on tool output | Check status → approve or escalate |
| Fan-out/Fan-in | Parallel tools, merge results | Query 3 APIs → combine insights |
| Iterative Loop | Repeat until condition met | Search → refine query → search again |
| Human Checkpoint | Pause for approval | Draft email → user approves → send |
Claude naturally chains 4-5+ tools per turn when given "Always Allow" permissions. This is a decisive advantage over systems like ChatGPT that require per-action approval, creating "Permission Fatigue" that breaks complex workflows.
Rule 1: Each tool should return enough context for the model to decide the next step.
# Bad: returns only an ID
def get_account():
return {"account_id": "acc_123"}
# Good: returns context the model needs for next decision
def get_account():
return {
"account_id": "acc_123",
"balance": 15420.50,
"status": "active",
"last_transaction": "2026-03-28",
"pending_invoices": 3
}
Rule 2: Design tools as composable units, not monolithic endpoints.
# Composable tools for financial analysis
tools = [
"get_account_summary", # Returns balances, status
"list_transactions", # Returns recent transactions
"run_forecast", # Takes balance + transactions, returns projection
"generate_report", # Takes forecast, outputs formatted report
"send_notification", # Sends result to stakeholder
]
For high-stakes actions (payments, deletions, external communications):
server.tool(
"request_approval",
"Pause workflow and request human approval for a proposed action",
{
action: z.string().describe("Description of the action to approve"),
details: z.object({
type: z.enum(["payment", "deletion", "communication", "deployment"]),
impact: z.string(),
reversible: z.boolean(),
}),
},
async ({ action, details }) => {
const approval = await approvalQueue.submit({
action,
details,
timestamp: new Date().toISOString(),
status: "pending",
});
// Block until human responds
const decision = await approvalQueue.waitForDecision(approval.id);
return {
content: [{
type: "text",
text: decision.approved
? `Approved by ${decision.approver}. Proceeding.`
: `Rejected: ${decision.reason}. Workflow halted.`,
}],
};
}
);
┌─────────┐ ┌──────────┐ ┌───────────┐
│ Execute │────►│ Error? │──No─►│ Continue │
│ Tool │ │ │ │ Chain │
└─────────┘ └────┬─────┘ └───────────┘
│Yes
▼
┌──────────────┐
│ Retry with │──Success──► Continue
│ backoff │
└──────┬───────┘
│Fail
▼
┌──────────────┐
│ Graceful │
│ degradation │
└──────────────┘
Patterns:
As tools are chained, each result accumulates in the context window. Strategies:
┌─────────────┐
│ Coordinator │ ◄─── User request
│ Agent │
└──────┬───────┘
│ Delegates
├──────────────────┬──────────────────┐
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Research │ │ Analysis │ │ Execution │
│ Agent │ │ Agent │ │ Agent │
│ (read-only)│ │ (compute) │ │ (actions) │
└─────────────┘ └─────────────┘ └─────────────┘
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-03-31 | Initial documentation |
Part of SkillGalaxy - 10,000+ comprehensive skills for AI-assisted development.