Anthropic agent构建指南详解

停止构建智能体,开始构建技能:Anthropic Agent Skills的深度洞察与AI范式变革 摘要:Anthropic团队提出从构建通用智能体转向构建"AgentSkills"的范式变革,通过封装可组合的程序性知识来弥补AI在专业领域的不足。Skills采用极简设计(文件夹形式),支持运行时加载和渐进式披露,五周内已形成包含基础能力、第三方生态和企业定制三大类型的技能生态。这一变革将专业知识工程化、产品化,与模型连接协议(MCP)形成互补,推动AI从"代码优先"转向"知识优先"。未来Skills将促进集体知识库建设,支持智能体持续学习,标志 阅读详情

Workflow & Agent

Anthropic发布的指南中将agent分为两种范式,一种是预定义工作路径的工作流,另一种是可以自主动态处理任务的agent。工作流包括提示链、路由、并行化、协调者-工作者、评估者-优化者五种设计模式。
工作流(workflow)和智能体(agent)的区别:工作流是通过预定义的代码路径编排LLM和工具的系统;agent则是LLM动态指导自己的工作流程和工具使用以完成任务的系统。
对于定义明确的任务,工作流提供可预测性和一致性,而当大模型需要处理大规模灵活性的决策任务时,构建agent是更好的选择。

构建模块:增强型LLM

在这里插入图片描述

智能体的基本构建模块是添加检索、工具和记忆功能增强的LLM。生成搜索查询、调用合适的工具并确定要保留存储的信息;

工作流:提示链

在这里插入图片描述
提示链式工作流(Prompting-chaining)将任务分解为一系列步骤,每一步都基于前一步的输出。可以在任何步骤中添加代码检查Gate(代码检查点),以确保步骤执行结果的正确性。
首先定义llm_call函数,封装调用LLM模型返回结果的流程:

from anthropic import Anthropic
import os
import re

client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

def llm_call(prompt: str, system_prompt: str = "", model="claude-3-5-sonnet-20241022") -> str:
    """
    Calls the model with the given prompt and returns the response.

    Args:
        prompt (str): The user prompt to send to the model.
        system_prompt (str, optional): The system prompt to send to the model. Defaults to "".
        model (str, optional): The model to use for the call. Defaults to "claude-3-5-sonnet-20241022".

    Returns:
        str: The response from the language model.
    """
    client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
    messages = [{"role": "user", "content": prompt}]
    response = client.messages.create(
        model=model,
        max_tokens=4096,
        system=system_prompt,
        messages=messages,
        temperature=0.1,
    )
    return response.content[0].text

编写prompt-chaining,将任务分解为多个子任务:

from concurrent.futures import ThreadPoolExecutor
from typing import List, Dict, Callable

def chain(input: str, prompts: List[str]) -> str:
    """Chain multiple LLM calls sequentially, passing results between steps."""
    result = input
    for i, prompt in enumerate(prompts, 1):
        print(f"\nStep {i}:")
        result = llm_call(f"{prompt}\nInput: {result}")
        print(result)
    return result
  • 应用场景示例:

    1. LLM生成营销文案,然后翻译成不同的语言;
    2. LLM先编写文档的大纲,检查大纲是否满足特定要求后,再根据大纲生成文档内容。
  • 代码示例:
    以使用LLM提取结构化数据为例:

data_processing_steps = [
    """Extract only the numerical values and their associated metrics from the text.
    Format each as 'value: metric' on a new line.
    Example format:
    92: customer satisfaction
    45%: revenue growth""",
    
    """Convert all numerical values to percentages where possible.
    If not a percentage or points, convert to decimal (e.g., 92 points -> 92%).
    Keep one number per line.
    Example format:
    92%: customer satisfaction
    45%: revenue growth""",
    
    """Sort all lines in descending order by numerical value.
    Keep the format 'value: metric' on each line.
    Example:
    92%: customer satisfaction
    87%: employee satisfaction""",
    
    """Format the sorted data as a markdown table with columns:
    | Metric | Value |
    |:--|--:|
    | Customer Satisfaction | 92% |"""
]

report = """
Q3 Performance Summary:
Our customer satisfaction score rose to 92 points this quarter.
Revenue grew by 45% compared to last year.
Market share is now at 23% in our primary market.
Customer churn decreased to 5% from 8%.
New user acquisition cost is $43 per user.
Product adoption rate increased to 78%.
Employee satisfaction is at 87 points.
Operating margin improved to 34%.
"""

print("\nInput text:")
print(report)
formatted_result = chain(report, data_processing_steps)
print(formatted_result)

工作流:路由

在这里插入图片描述
路由(Routing)对输入进行分类并将其定向到专门的后续任务。路由适合需要将一个复杂的任务分解为多个不同类别的子任务的场景。复杂任务通过路由分发后使用LLM或合适的传统算法模型处理任务。

def extract_xml(text: str, tag: str) -> str:
    """
    Extracts the content of the specified XML tag from the given text. Used for parsing structured responses 

    Args:
        text (str): The text containing the XML.
        tag (str): The XML tag to extract content from.

    Returns:
        str: The content of the specified XML tag, or an empty string if the tag is not found.
    """
    match = re.search(f'<{tag}>(.*?)</{tag}>', text, re.DOTALL)
    return match.group(1) if match else ""

def route(input: str, routes: Dict[str, str]) -> str:
    """Route input to specialized prompt using content classification."""
    # First determine appropriate route using LLM with chain-of-thought
    print(f"\nAvailable routes: {list(routes.keys())}")
    selector_prompt = f"""
    Analyze the input and select the most appropriate support team from these options: {list(routes.keys())}
    First explain your reasoning, then provide your selection in this XML format:

    <reasoning>
    Brief explanation of why this ticket should be routed to a specific team.
    Consider key terms, user intent, and urgency level.
    </reasoning>

    <selection>
    The chosen team name
    </selection>

    Input: {input}""".strip()
    
    route_response = llm_call(selector_prompt)
    reasoning = extract_xml(route_response, 'reasoning')
    route_key = extract_xml(route_response, 'selection').strip().lower()
    
    print("Routing Analysis:")
    print(reasoning)
    print(f"\nSelected route: {route_key}")
    
    # Process input with selected specialized prompt
    selected_prompt = routes[route_key]
    return llm_call(f"{selected_prompt}\nInput: {input}")
  • 应用场景示例:将不同类型的客户服务查询(一般问题、退款请求、技术支持)引导到不同的下游工作流程、提示词和工具调用处理。
  • 代码示例
    以订票任务为例,将该任务拆分成三个子任务:
support_routes = {
    "billing": """You are a billing support specialist. Follow these guidelines:
    1. Always start with "Billing Support Response:"
    2. First acknowledge the specific billing issue
    3. Explain any charges or discrepancies clearly
    4. List concrete next steps with timeline
    5. End with payment options if relevant
    
    Keep responses professional but friendly.
    
    Input: """,
    
    "technical": """You are a technical support engineer. Follow these guidelines:
    1. Always start with "Technical Support Response:"
    2. List exact steps to resolve the issue
    3. Include system requirements if relevant
    4. Provide workarounds for common problems
    5. End with escalation path if needed
    
    Use clear, numbered steps and technical details.
    
    Input: """,
    
    "account": """You are an account security specialist. Follow these guidelines:
    1. Always start with "Account Support Response:"
    2. Prioritize account security and verification
    3. Provide clear steps for account recovery/changes
    4. Include security tips and warnings
    5. Set clear expectations for resolution time
    
    Maintain a serious, security-focused tone.
    
    Input: """,
    
    "product": """You are a product specialist. Follow these guidelines:
    1. Always start with "Product Support Response:"
    2. Focus on feature education and best practices
    3. Include specific examples of usage
    4. Link to relevant documentation sections
    5. Suggest related features that might help
    
    Be educational and encouraging in tone.
    
    Input: """
}

# Test with different support tickets
tickets = [
    """Subject: Can't access my account
    Message: Hi, I've been trying to log in for the past hour but keep getting an 'invalid password' error. 
    I'm sure I'm using the right password. Can you help me regain access? This is urgent as I need to 
    submit a report by end of day.
    - John""",
    
    """Subject: Unexpected charge on my card
    Message: Hello, I just noticed a charge of $49.99 on my credit card from your company, but I thought
    I was on the $29.99 plan. Can you explain this charge and adjust it if it's a mistake?
    Thanks,
    Sarah""",
    
    """Subject: How to export data?
    Message: I need to export all my project data to Excel. I've looked through the docs but can't
    figure out how to do a bulk export. Is this possible? If so, could you walk me through the steps?
    Best regards,
    Mike"""
]

print("Processing support tickets...\n")
for i, ticket in enumerate(tickets, 1):
    print(f"\nTicket {i}:")
    print("-" * 40)
    print(ticket)
    print("\nResponse:")
    print("-" * 40)
    response = route(ticket, support_routes)
    print(response)

工作流:并行化(Parallelization)

在这里插入图片描述
LLM有时可以并行化运行一项任务,并聚合多个输出为最终的结果。具体的,首先将任务分为多个独立的子任务,再多次运行同一任务以获得不同的输出。

  • 适用情况:
  1. 将复杂任务分解成多个独立的小任务并行执行来提升速度;2)需要从不同视角出发解决问题;3)复杂任务中有多种需要考虑的因素,让每次LLM call去注意某个特定领域;
def parallel(prompt: str, inputs: List[str], n_workers: int = 3) -> List[str]:
    """Process multiple inputs concurrently with the same prompt."""
    with ThreadPoolExecutor(max_workers=n_workers) as executor:
        futures = [executor.submit(llm_call, f"{prompt}\nInput: {x}") for x in inputs]
        return [f.result() for f in futures]
  • 应用场景示例:
    分片:1. 实施护栏。2. LLM自动化评估;
    投票:1. 检查一段代码是否存在漏洞;2. 评估给定的内容是否恰当;
  • 代码示例
    分析市场变化对消费者、员工、投资人和供应商等不同群体的影响:
stakeholders = [
    """Customers:
    - Price sensitive
    - Want better tech
    - Environmental concerns""",
    
    """Employees:
    - Job security worries
    - Need new skills
    - Want clear direction""",
    
    """Investors:
    - Expect growth
    - Want cost control
    - Risk concerns""",
    
    """Suppliers:
    - Capacity constraints
    - Price pressures
    - Tech transitions"""
]

impact_results = parallel(
    """Analyze how market changes will impact this stakeholder group.
    Provide specific impacts and recommended actions.
    Format with clear sections and priorities.""",
    stakeholders
)

for result in impact_results:
    print(result)

工作流:协调者-工作者模式

在这里插入图片描述
在 orchestrator-worker 工作流中,中央 LLM 会动态分解任务,将其委派给 worker LLM,并综合其结果。

  • 适用情况
    此工作流程适合于无法预测所需子任务的复杂任务。编排工作流与并行工作流在拓扑结构上类似,与并行工作流的区别在于灵活性,即子任务不是预先定义的,而是由编排器根据特定输入确定的。
    首先分解任务,以字典结构返回:
from typing import Dict, List, Optional
from util import llm_call, extract_xml

def parse_tasks(tasks_xml: str) -> List[Dict]:
    """Parse XML tasks into a list of task dictionaries."""
    tasks = []
    current_task = {}
    
    for line in tasks_xml.split('\n'):
        line = line.strip()
        if not line:
            continue
            
        if line.startswith("<task>"):
            current_task = {}
        elif line.startswith("<type>"):
            current_task["type"] = line[6:-7].strip()
        elif line.startswith("<description>"):
            current_task["description"] = line[12:-13].strip()
        elif line.startswith("</task>"):
            if "description" in current_task:
                if "type" not in current_task:
                    current_task["type"] = "default"
                tasks.append(current_task)
    
    return tasks

编排模型并行处理分解的任务:

class FlexibleOrchestrator:
    """Break down tasks and run them in parallel using worker LLMs."""
    
    def __init__(
        self,
        orchestrator_prompt: str,
        worker_prompt: str,
    ):
        """Initialize with prompt templates."""
        self.orchestrator_prompt = orchestrator_prompt
        self.worker_prompt = worker_prompt

    def _format_prompt(self, template: str, **kwargs) -> str:
        """Format a prompt template with variables."""
        try:
            return template.format(**kwargs)
        except KeyError as e:
            raise ValueError(f"Missing required prompt variable: {e}")

    def process(self, task: str, context: Optional[Dict] = None) -> Dict:
        """Process task by breaking it down and running subtasks in parallel."""
        context = context or {}
        
        # Step 1: Get orchestrator response
        orchestrator_input = self._format_prompt(
            self.orchestrator_prompt,
            task=task,
            **context
        )
        orchestrator_response = llm_call(orchestrator_input)
        
        # Parse orchestrator response
        analysis = extract_xml(orchestrator_response, "analysis")
        tasks_xml = extract_xml(orchestrator_response, "tasks")
        tasks = parse_tasks(tasks_xml)
        
        print("\n=== ORCHESTRATOR OUTPUT ===")
        print(f"\nANALYSIS:\n{analysis}")
        print(f"\nTASKS:\n{tasks}")
        
        # Step 2: Process each task
        worker_results = []
        for task_info in tasks:
            worker_input = self._format_prompt(
                self.worker_prompt,
                original_task=task,
                task_type=task_info['type'],
                task_description=task_info['description'],
                **context
            )
            
            worker_response = llm_call(worker_input)
            result = extract_xml(worker_response, "response")
            
            worker_results.append({
                "type": task_info["type"],
                "description": task_info["description"],
                "result": result
            })
            
            print(f"\n=== WORKER RESULT ({task_info['type']}) ===\n{result}\n")
        
        return {
            "analysis": analysis,
            "worker_results": worker_results,
        }
  • 应用场景示例
    1. 每次编程需要更改多个文件代码的大型APP项目;
    2. 涉及从多个来源收集和分析信息以查找可能的相关信息的搜索任务
  • 代码示例
    一次生成多个版本的营销内容(Marketing Variation Generation):
ORCHESTRATOR_PROMPT = """
Analyze this task and break it down into 2-3 distinct approaches:

Task: {task}

Return your response in this format:

<analysis>
Explain your understanding of the task and which variations would be valuable.
Focus on how each approach serves different aspects of the task.
</analysis>

<tasks>
    <task>
    <type>formal</type>
    <description>Write a precise, technical version that emphasizes specifications</description>
    </task>
    <task>
    <type>conversational</type>
    <description>Write an engaging, friendly version that connects with readers</description>
    </task>
</tasks>
"""

WORKER_PROMPT = """
Generate content based on:
Task: {original_task}
Style: {task_type}
Guidelines: {task_description}

Return your response in this format:

<response>
Your content here, maintaining the specified style and fully addressing requirements.
</response>
"""

orchestrator = FlexibleOrchestrator(
    orchestrator_prompt=ORCHESTRATOR_PROMPT,
    worker_prompt=WORKER_PROMPT,
)

results = orchestrator.process(
    task="Write a product description for a new eco-friendly water bottle",
    context={
    "target_audience": "environmentally conscious millennials",
    "key_features": ["plastic-free", "insulated", "lifetime warranty"]
}
)

工作流:评估者-优化者模式

在这里插入图片描述
Evaluator-Optimizer工作流程中,一个LLM生成响应内容,另一个LLM提供评估和反馈。

  • 适用情况
    对大模型输出内容具备明确的评估标准;具有迭代优化的价值(Value from iterative refinement)。
    定义Generator:
def generate(prompt: str, task: str, context: str = "") -> tuple[str, str]:
    """Generate and improve a solution based on feedback."""
    full_prompt = f"{prompt}\n{context}\nTask: {task}" if context else f"{prompt}\nTask: {task}"
    response = llm_call(full_prompt)
    thoughts = extract_xml(response, "thoughts")
    result = extract_xml(response, "response")
    
    print("\n=== GENERATION START ===")
    print(f"Thoughts:\n{thoughts}\n")
    print(f"Generated:\n{result}")
    print("=== GENERATION END ===\n")
    
    return thoughts, result

定义Evaluator:

def evaluate(prompt: str, content: str, task: str) -> tuple[str, str]:
    """Evaluate if a solution meets requirements."""
    full_prompt = f"{prompt}\nOriginal task: {task}\nContent to evaluate: {content}"
    response = llm_call(full_prompt)
    evaluation = extract_xml(response, "evaluation")
    feedback = extract_xml(response, "feedback")
    
    print("=== EVALUATION START ===")
    print(f"Status: {evaluation}")
    print(f"Feedback: {feedback}")
    print("=== EVALUATION END ===\n")
    
    return evaluation, feedback

循环调用生成器-评估器来迭代优化LLM的输出:

def loop(task: str, evaluator_prompt: str, generator_prompt: str) -> tuple[str, list[dict]]:
    """Keep generating and evaluating until requirements are met."""
    memory = []
    chain_of_thought = []
    
    thoughts, result = generate(generator_prompt, task)
    memory.append(result)
    chain_of_thought.append({"thoughts": thoughts, "result": result})
    
    while True:
        evaluation, feedback = evaluate(evaluator_prompt, result, task)
        if evaluation == "PASS":
            return result, chain_of_thought
            
        context = "\n".join([
            "Previous attempts:",
            *[f"- {m}" for m in memory],
            f"\nFeedback: {feedback}"
        ])
        
        thoughts, result = generate(generator_prompt, task, context)
        memory.append(result)
        chain_of_thought.append({"thoughts": thoughts, "result": result})
    
  • 应用示例
  1. 文学翻译,翻译家LLM提供翻译,评论者LLM提供对翻译结果的评估;
  2. 复杂的搜索任务,需要多轮搜素和分析以收集全面的信息,其中评估者决定是否需要进一步搜索。
    以迭代优化编程结果为例,编写提示词:
evaluator_prompt = """
Evaluate this following code implementation for:
1. code correctness
2. time complexity
3. style and best practices

You should be evaluating only and not attemping to solve the task.
Only output "PASS" if all criteria are met and you have no further suggestions for improvements.
Output your evaluation concisely in the following format.

<evaluation>PASS, NEEDS_IMPROVEMENT, or FAIL</evaluation>
<feedback>
What needs improvement and why.
</feedback>
"""

generator_prompt = """
Your goal is to complete the task based on <user input>. If there are feedback 
from your previous generations, you should reflect on them to improve your solution

Output your answer concisely in the following format: 

<thoughts>
[Your understanding of the task and feedback and how you plan to improve]
</thoughts>

<response>
[Your code implementation here]
</response>
"""

# 以编写栈结构代码的任务为例
task = """
<user input>
Implement a Stack with:
1. push(x)
2. pop()
3. getMin()
All operations should be O(1).
</user input>
"""

loop(task, evaluator_prompt, generator_prompt)

智能体

在这里插入图片描述
智能体在工业生产环境中为LLM提供理解复杂输入、参与推理和规划、可靠的使用工具以及从故障中恢复等能力。

  • 适用情况
    智能体可用于工作步骤和路径难以预测的开放式问题(open-ended problem)
  • 应用场景
  1. Coding agent解决SWE-bench任务;
  2. computer use agent自动操作电脑
    在这里插入图片描述

总结

2024年agent出现了非常多的框架,但是大多数其实是workflow,Anthropic的这份指南总结了agent和workflow的常见模式和适用场景,特别是prompt的分层编写技巧,值得一读。

参考资料

[1] https://www.anthropic.com/research/building-effective-agents
[2] https://github.com/anthropics/anthropic-cookbook/blob/main/patterns/agents/
[3] https://www.langchain.com/langgraph
[4] LLM Powered Autonomous Agents: https://lilianweng.github.io/posts/2023-06-23-agent/

Agent与Anthropic技术实战:构建安全智能体的开发指南 智能体(Agent)技术是AI领域的重要发展方向,通过感知-决策-执行的闭环架构处理复杂任务。其核心技术原理包括多模态感知、强化学习框架和实时反馈机制,在客服自动化、智能决策等场景具有广泛应用价值。Anthropic提出的对齐研究(Alignment Research)为Agent开发引入了安全约束优化和可解释性设计等关键特性,本文结合Datawhale社区实践,详解如何基于Python构建符合人类价值观的智能体系统,涵盖环境配置、技能注册、安全验证等工程实现细节,并分享意图理解偏差调试等典型问题解决方案。 阅读详情

相关推荐

Google、OpenAI和Anthropic Agent开发框架哪家强?

AI智能体开发领域三巨头技术对比:Google ADK采用A2A协议,支持多模态通信和复杂工作流,适合企业级协作;OpenAI SDK专注安全护栏功能,适合高风险场景;Anthropic ClaudeCode SDK强化代码能力,提示缓存可降本90%,适合开发场景。建议根据项目需求选择:复杂协作选Google,安全敏感选OpenAI,代码开发选Anthropic。随着模型能力提升,Agent功能正逐步内化,未来开发将更高效。

2401_82452722的博客 1665

Anthropic:Agents 2024年度总结!

在 LLM 领域取得成功并不在于构建最复杂的系统。而是在于构建适合您需求的系统。从简单的提示开始,通过综合评估对其进行优化,并且仅在较简单的解决方案不足时才添加多步骤智能体系统。在实施智能体时,我们尝试遵循三个核心原则保持智能体设计的简单性。通过明确展示智能体的计划步骤来优先考虑透明度。通过全面的工具文档和测试精心设计您的智能体-计算机接口 (ACI)。框架可以帮助您快速入门,但在投入生产时,请毫不犹豫地减少抽象层并使用基本组件进行构建。

AIBigModel的博客 1145

STM32平台下FreeModbus TCP协议栈集成指南

深入讲解在STM32平台如何移植和配置freemodbus协议栈,实现TCP通信功能。结合嵌入式开发细节,帮助开发者快速掌握freemodbus的应用与调试技巧。

weixin_36001279的博客 1152

别卷框架了!Anthropic开源Agent之道!

Agent”有多种定义方式。一些客户将Agent定义为完全自主的系统,它们可以在较长时间内独立运行,并使用各种工具来完成复杂的任务。其他人则使用该术语来描述遵循预定义工作流程的更规范的实施方案。在 Anthropic,我们将所有这些变体都归类为Agent系统,但在工作流程和Agent工作流程是指通过预定义的代码路径来协调 LLM 和工具的系统。Agent则是指 LLM 动态地指导自身流程和工具使用的系统,并保持对如何完成任务的控制。下面,我们将详细探讨这两种类型的Agent系统。

xx_nm98的博客 1468

《Halcon 100项目-9》Halcon彩色线序检查

Halcon彩色线序检查

doubleintfloat的博客 1053

STM32巡线小车PID调参实战:从五路灰度传感器数据到稳定运行的避坑指南

本文详细介绍了STM32巡线小车的PID调参实战,从五路灰度传感器数据处理到PID参数优化,提供了系统化的调试方法和常见问题解决方案。通过加权平均法计算偏移量,逐步调整比例、积分、微分参数,实现小车稳定巡线。文章还涵盖了定时器配置、控制周期优化及高级调试技巧,帮助开发者避开常见陷阱,提升巡线性能。

weixin_42570484的博客 198

Anthropic发文分享“如何高效构建Agent”,从简单到复杂带你体会Agent应用架构的真谛

Agent 并非一个标准概念,它可以是完全自主的系统,也可以是遵循预定工作流的系统。Anthropic 将这些变体统称为"Agent 系统",并将其在实现架构上划分为两类:工作流(Workflow):通过预定义的代码路径编排 LLM 和工具智能体(Agent):LLM 动态指导自身流程和工具使用,保持对任务完成方式的控制最后,Anthropic 再次强调,LLM 应用开发的成功不在于构建最复杂的系统,而在于构建满足实际需求的正确系统。

m0_59235245的博客 1362

MATLAB基础应用精讲-【数模应用】数字预失真(DPD)(附MATLAB代码实现)

近年来,随着无线通信技术的发展,高功率放大器 (PA) 在提高信号传输功率的同时,也带来了非线性失真问题。PA的非线性失真会造成信号频谱扩展、功率下降、邻道干扰等问题,严重影响系统性能。为了克服PA的非线性失真,数字预失真 (DPD) 技术应运而生。DPD技术通过在发射机中引入一个非线性模块,对信号进行预失真处理,从而补偿PA的非线性失真。

qq_36130719的博客 907

Anthropic 揭秘智能体本质:如何构建真正有效的 AI Agent?

在深入探讨如何构建有效的 Agent 之前,我们需要先厘清 Agent 的本质。Anthropic 将所有具备智能化、自主化特性的系统都归类为“Agent 系统”。然而,这其中又可以进一步细分为两种关键架构:•LLM 和工具在预定义的代码路径下协同工作。这种模式下,LLM 的行为相对受限,更多地扮演执行者的角色,按照预设的流程完成任务,如同“提线木偶”。•LLM 拥有更大的自主权,可以根据任务需求动态调整策略和工具使用。这种模式下,LLM 更像是一位“指挥官”,能够根据实际情况灵活决策,自主完成任务。

2401_85325726的博客 892

【第33话:车辆控制】自动驾驶车辆运动学模型推导及详解

自动驾驶车辆的运动学模型以自行车模型为核心,通过状态方程。

一碗白开水一 838

23、管状剪纸结构的研究与功能生成连杆机构的综合设计

本文研究了管状剪纸结构的压缩运动特性,通过剪纸技术将非刚性可折叠的Yoshimura和Kresling折纸结构转化为刚性可折叠结构,并提出径向可闭合剪纸(RC-kiri)构型。推导了位移与折叠角之间的数学关系,设计了带外部LET接头的RC-kiri模型,建立了力-位移理论模型并通过Abaqus进行有限元验证,制作了3D打印物理模型以测量直径变化。同时,研究了四杆和六杆功能生成连杆机构的综合设计方法,基于负闭合运动链和最小二乘法实现函数生成。结果表明理论、仿真与实验整体吻合良好,误差来源得到分析,为机器人、机

nokia的博客 174

Claude Agent架构终极拆解指南(超详细):一文看懂MCP+PTC+Skills的三维协同,收藏这一篇就够了!

Anthropic 这家“AI 后期之秀”擅长在 Agent 工程领域“整活”。除了大家熟知的MCP(模型上下文协议)外,前两个月抛出了两个新概念:**Skills** (技能)与 **程序化工具调用(PTC)**,并在自身的Claude开发平台落地支持。

m0_59235245的博客 1789

TC8:IPv4_HEADER_01-04

IPv4_HEADER_01: Ensure that the DUT generates an IPv4 Packet with a Total Length greater than or equal to 20 目的 确保DUT生成的IPv4报文的IP头部中的Total Length字段值大于等于20 IPv4协议头部中的Total Length字段表示整个IP数据包的长度,包括IP Header和payload之和,IP首部的长度最少就有20个字节,所以Total Length值肯定大于等于20

jasonj333 3978

Anthropic官方AI Agent开发指南全解析:从核心理念到实战技巧!

本文整合了Anthropic官方的AI Agent开发指南,系统介绍了构建高效AI Agent的核心理念与四大基石(知识、行动、思考、记忆),详细阐述了智能体架构模式选择、提示工程技巧及评估方法。通过"Claude玩宝可梦"等实战案例,分享了长短期记忆结合、上下文窗口压缩等关键技术,为开发者提供了从入门到精通的完整路线图,助力构建强大、可靠且高效的AI Agent系统。

2401_85375151的博客 2560

基于ESP32的智能停车场管理系统开发

智能停车场管理系统通过引入物联网(IoT)技术,实现对停车场内车辆的实时监控、空闲车位的管理、车辆的入场与出场控制等功能,大大提高了停车场的利用率和管理效率。通过集成物联网技术、云平台以及先进的传感器和执行器,系统不仅能实时监控停车场的车位状态,还能提供更好的用户体验。本文将介绍如何基于ESP32开发一个智能停车场管理系统,涵盖系统架构、硬件选择、软件开发以及最新技术的应用,帮助开发者实现高效的智能停车管理。ESP32的代码主要负责处理车位传感器的数据,控制LED指示灯的状态,以及与云平台进行数据交互。

2201_76125393的博客 924

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Agent模式深度解析:小白程序员必备收藏指南,轻松入门大模型开发

2026年技术圈的分化愈发明显:降薪裁员潮持续蔓延,传统开发、测试等岗位大批缩水,不少从业者陷入职业焦虑;与之形成鲜明对比的是,AI大模型相关岗位迎来疯狂扩招,薪资逆势飙升150%,大厂更是直接开出70-100W年薪,疯抢具备实战能力的大模型人才,甚至放宽年龄限制,只求能快速落地技术、创造价值!1、窗口期红利,入门门槛友好:不同于成熟赛道的“内卷式招聘”,2026年大模型人才缺口巨大,简历只要达标(掌握基础AI应用+具备简单项目经验),年龄、学历均非硬性要求,小白可快速入门,转行程序员也能无缝衔接;

m0_48891301的博客 225

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

Claude Agent Skills 开源!模块化技能插件一键解锁专业能力,小白也能轻松上手(收藏必备)

Claude Agent Skills 最核心的价值,是「模块化赋能」——无需重构模型、无需反复喂Prompt,通过加载不同的Skill,即可让Claude快速变身各领域专家,这也是2025年AI大模型从通用能力走向场景化落地的关键抓手。而ModelScope官方推出的ms-agent框架对Agent Skills的深度适配与调用,更是打通了海外优质AI能力与国内开发场景的壁垒,实现了两者的无缝融合,让大模型的专业能力能被国内开发者高效、灵活地调用,真正服务于实际工作与国产化AI发展。

xxue345678的博客 856

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

怎么创建高质量的 AI Agent SKILL

摘要: 本文介绍了如何创建高效的SKILL(任务流程规范),用于指导AI代理(AGENT)完成特定任务。SKILL包含指令、脚本和资源,确保任务执行的稳定性。通过skill-creator工具(Anthropic官方维护),采用交互式迭代方式优化SKILL,包括明确意图、编写初稿、测试评估(定性/定量)和反复改进。文件结构包括主文档(SKILL.md)、子代理、资源文件和评估脚本。关键要点包括:渐进式内容加载(元数据→正文→资源)、领域模块化组织、输出格式标准化,以及禁止恶意内容。测试阶段需准备真实案例并验

monkeyboy_tech的博客 1370

刚刚,Anthropic 发布了 Claude Skills 最佳实践全解

Anthropic发布《Claude Skills终极指南》,提出从Prompt工程向标准化Agent工程的转变。Skills作为模块化能力包,包含指令、元数据和示例,可实现AI能力的复用。指南强调:1)拆解任务为微技能;2)精确命名;3)加入自我验证机制;4)明确Skills与MCP的关系(MCP是工具,Skills是流程)。通过SKILL.md标准格式,企业可实现AI知识沉淀,像管理代码一样管理AI技能。文档还展示了如何将传统长Prompt重构为标准Skill的实例,体现结构化指令的优势。

2401_85725028的博客 1034

Anthropic Agent构建指南【附中文代码,一键运行】

Agent 的定义因人而异,可以是完全自主的系统,也可以是遵循预定义工作流的系统。将所有变体都归类为“Agentic 系统”,并区分 “工作流 (Workflows)” 和 “Agent”:通过预定义代码路径编排 LLM 和工具的系统。LLM 动态指导自身过程和工具使用的系统,控制任务完成方式。成功并不在于构建最复杂的系统,而在于构建最适合需求的系统。从简单的提示开始。通过全面的评估进行优化。仅在更简单的解决方案不足时才添加多步骤 agentic 系统。保持 Agent 设计的简洁性。

xiaoxiaoyu290的博客 1623

别再盲目堆 Agent 了!Anthropic 官方教你从简单做起

在 AI 应用开发领域,奥卡姆剃刀原则依然是最高指导思想。解决问题的关键,不在于你的系统有多复杂,而在于你是否构建了恰到好处的系统。保持简洁:能简单就别复杂确保透明:让 Agent 的规划步骤清晰可见打磨接口:工具文档写清楚,测试做充分从简单的 Prompt 开始。只有当简单方案无法满足需求时,再考虑引入多步骤的 Agentic 系统。别为了 Agent 而 Agent。原文链接。

最短的捷径就是绕远路,绕远路才是我的最短捷径。 3135

【最佳实践】Anthropic:如何构建有效的 Agent

Agent” 可以用多种方式定义。一些客户将 Agent 定义为完全自主的系统,可以在较长时间内独立运行,使用各种工具来完成复杂的任务。其他人则使用该术语来描述遵循预定义 Workflow 的更规范的实现。在 Anthropic,我们将所有这些变体都归类为 agentic 系统,但在Workflow和AgentWorkflow 是通过预定义的代码路径协调 LLM 和工具的系统。Agent 是指 LLM 动态指导其自身流程和工具使用,并保持对其完成任务方式控制的系统。

2401_84494441的博客 1448

Anthropic发了一篇Agent年度雄文,全是知识点。

Agent” 可以有多种定义。一些客户将其定义为能够自主操作并长时间独立执行任务的系统,这类系统能够利用各种工具来完成复杂的任务。而另一些客户则使用这个术语来描述那些遵循预定义工作流的系统。在 Anthropic,我们将所有这些变体统一归类为 Agent 系统,但在架构上我们明确区分了工作流和 Agent:工作流系统是通过预定义的代码路径来协调 LLM 和工具的系统。Agent 则是由 LLM 动态指导,自主执行任务的过程和工具使用,控制完成任务的方式。

具身机器人和通用AI 1294

Anthropic 是如何构建 Multi-Agent Research 系统

本文的 “Agent” 定义:在一个代码循环()中 自主选择和使用工具()的大语言模型()。本文的 Multi-Agent 系统由多个以上的 Agent 组成(具体又分为 Lead Agent 和 sub-agent),协同工作完成一项复杂任务。构建 AI Agent 时,最后一公里往往需要投入巨大精力。尽管存在很多挑战,但已经证明,Multi-Agent 系统是解决开放式任务的最有效方式之一。

hao_wujing的专栏 1250

Anthropic Agent 工程实战笔记 · 延伸阅读

工具定义 + 单轮调用(对应 02 §3.2)@tool"""返回当前 UTC 时间(ISO 8601)。用于用户问「几点了」等需要当前时间的场景。"""@tool"""计算一个数的平方。参数 x 必须为数字(int 或 float),否则返回错误说明。"""try:return "错误:x 必须是数字。请使用例如 {\"x\": 5} 或 {\"x\": 3.14}。

消极的人永远是对的,积极的人选择勇往直前 1486

2025 Agent之年:Anthropic万字文章披露如何构建高效的AI Agent系统

2025 年被许多人称为 “Agent 之年”,越来越多的企业和开发者开始投入到构建 AI Agent 的工作中。近日,Anthropic 公司发布了一篇重磅博客,详细探讨了如何构建高效的 Agent,并分享了他们在这一领域的最新研究成果。

bugyinyin的博客 1152
上一篇: openai swarm agent框架源码详解及应用案例实战
下一篇: operator: openai CUA agent原理介绍
硅星纯牛码
博客等级 码龄7年 1万+粉丝 52原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址