6、git远程库与本地联系报错:fatal: Not a git repository (or any of the parent directories): .git
在github上新建了一个仓库,然后相与本地的仓库联系起来
$ Git remote add origin https://github.com/liona329/learngit.git fatal: Not a git repository (or any of the parent directories): .git
总是报这个错 解决方法:git init
成功
7、github build出错信息会发到注册的邮箱
1 2 3 4 5 6 7 8 9 10 11 12
[hongyitong/hongyitong.github.io] Page build failure G GitHub <support@github.com> 今天, 16:12 你 The page build failed for the `master` branch with the following error:
The tag `fancybox` on line 77 in `themes/landscape/README.md` is not a recognized Liquid tag. For more information, see https://help.github.com/articles/page-build-failed-unknown-tag-error/.
✗ hexo clean ERROR Script load failed: themes/next/scripts/tags/exturl.js Error: Cannot find module 'hexo-util' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/lib/hexo/index.js:213:21) at /Users/lisanlai/lisanlai.github.io/themes/next/scripts/tags/exturl.js:8:12 at /Users/lisanlai/lisanlai.github.io/node_modules/hexo/lib/hexo/index.js:229:12 at tryCatcher (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:502:31) at Promise._settlePromise (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:559:18) at Promise._settlePromise0 (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:683:18) at Promise._fulfill (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:628:18) at Promise._resolveCallback (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:423:57) at Promise._settlePromiseFromHandler (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:514:17) at Promise._settlePromise (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:559:18) at Promise._settlePromise0 (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:683:18) at Promise._fulfill (/Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/promise.js:628:18) at /Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/bluebird/js/release/nodeback.js:42:21 at /Users/lisanlai/lisanlai.github.io/node_modules/hexo/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:78:16 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3) INFO Deleted database.
Appendix C - Quick overview of Agentic Frameworks | 附录C: 智能体框架快速概览
LangChain
LangChain is a framework for developing applications powered by LLMs. Its core strength lies in its LangChain Expression Language (LCEL), which allows you to "pipe" components together into a chain. This creates a clear, linear sequence where the output of one step becomes the input for the next. It's built for workflows that are Directed Acyclic Graphs (DAGs), meaning the process flows in one direction without loops.
● Simple RAG: Retrieve a document, create a prompt, get an answer from an LLM.
简单 RAG:检索文档,创建提示,从LLM获取答案。
● Summarization: Take user text, feed it to a summarization prompt, and return the output.
摘要:获取用户文本,将其输入摘要提示,并返回输出结果。
● Extraction: Extract structured data (like JSON) from a block of text.
提取:从文本块中提取结构化数据(例如JSON)。
Python
1 2 3
# A simple LCEL chain conceptually # (This is not runnable code, just illustrates the flow) chain = prompt | model | output_parse
LangGraph
LangGraph is a library built on top of LangChain to handle more advanced agentic systems. It allows you to define your workflow as a graph with nodes (functions or LCEL chains) and edges (conditional logic). Its main advantage is the ability to create cycles, allowing the application to loop, retry, or call tools in a flexible order until a task is complete. It explicitly manages the application state, which is passed between nodes and updated throughout the process.
● Multi-agent Systems: A supervisor agent routes tasks to specialized worker agents, potentially looping until the goal is met.
多智能体系统:主管智能体将任务分配给专门的工作智能体,可能会循环执行,直到达到目标。
● Plan-and-Execute Agents: An agent creates a plan, executes a step, and then loops back to update the plan based on the result.
计划执行智能体:智能体创建计划,执行步骤,然后循环返回并根据结果更新计划。
● Human-in-the-Loop: The graph can wait for human input before deciding which node to go to next.
人机交互:该图可以等待人工输入,然后再决定下一步要访问哪个节点。
Feature
LangChain
LangGraph
Core Abstraction
Chain (using LCEL)
Graph of Nodes
Workflow Type
Linear (Directed Acyclic Graph)
Cyclical (Graphs with loops)
State Management
Generally stateless per run
Explicit and persistent state object
Primary Use
Simple, predictable sequences
Complex, dynamic, stateful agents
Which One Should You Use? 你应该使用哪一个?
● Choose LangChain when your application has a clear, predictable, and linear flow of steps. If you can define the process from A to B to C without needing to loop back, LangChain with LCEL is the perfect tool.
● Choose LangGraph when you need your application to reason, plan, or operate in a loop. If your agent needs to use tools, reflect on the results, and potentially try again with a different approach, you need the cyclical and stateful nature of LangGraph.
# Show workflow display(Image(parallel_workflow.get_graph().draw_mermaid_png()))
# Invoke state = parallel_workflow.invoke({"topic": "cats"}) print(state["combined_output"])
Google's ADK
Google's Agent Development Kit, or ADK, provides a high-level, structured framework for building and deploying applications composed of multiple, interacting AI agents. It contrasts with LangChain and LangGraph by offering a more opinionated and production-oriented system for orchestrating agent collaboration, rather than providing the fundamental building blocks for an agent's internal logic.
LangChain operates at the most foundational level, offering the components and standardized interfaces to create sequences of operations, such as calling a model and parsing its output. LangGraph extends this by introducing a more flexible and powerful control flow; it treats an agent's workflow as a stateful graph. Using LangGraph, a developer explicitly defines nodes, which are functions or tools, and edges, which dictate the path of execution. This graph structure allows for complex, cyclical reasoning where the system can loop, retry tasks, and make decisions based on an explicitly managed state object that is passed between nodes. It gives the developer fine-grained control over a single agent's thought process or the ability to construct a multi-agent system from first principles.
Google's ADK abstracts away much of this low-level graph construction. Instead of asking the developer to define every node and edge, it provides pre-built architectural patterns for multi-agent interaction. For instance, ADK has built-in agent types like SequentialAgent or ParallelAgent, which manage the flow of control between different agents automatically. It is architected around the concept of a "team" of agents, often with a primary agent delegating tasks to specialized sub-agents. State and session management are handled more implicitly by the framework, providing a more cohesive but less granular approach than LangGraph's explicit state passing. Therefore, while LangGraph gives you the detailed tools to design the intricate wiring of a single robot or a team, Google's ADK gives you a factory assembly line designed to build and manage a fleet of robots that already know how to work together.
Google ADK抽象化了许多底层图构建工作。它无需开发者定义每个节点和边,而是提供了预构建的多智能体交互架构模式。例如,ADK内置了SequentialAgent或ParallelAgent等智能体类型,可以自动管理不同智能体之间的控制流。它的架构围绕着智能体“团队”的概念展开,通常由一个主智能体将任务委派给专门的子智能体。框架以更隐式的方式处理状态和会话管理,提供了一种比LangGraph的显式状态传递更统一但粒度更低的方法。因此,LangGraph提供了设计单个机器人或团队复杂线路的详细工具,而Google ADK 则提供了一条工厂装配线,用于构建和管理一支已经知道如何协同工作的机器人集群。
Python
1 2 3 4 5 6 7 8 9 10
from google.adk.agents import LlmAgent from google.adk.tools import google_Search
dice_agent = LlmAgent( model="gemini-2.0-flash-exp", name="question_answer_agent", description="A helpful assistant agent that can answer questions.", instruction="""Respond to the query using google search""", tools=[google_search], )
This code creates a search-augmented agent. When this agent receives a question, it will not just rely on its pre-existing knowledge. Instead, following its instructions, it will use the Google Search tool to find relevant, real-time information from the web and then use that information to construct its answer.
CrewAI offers an orchestration framework for building multi-agent systems by focusing on collaborative roles and structured processes. It operates at a higher level of abstraction than foundational toolkits, providing a conceptual model that mirrors a human team. Instead of defining the granular flow of logic as a graph, the developer defines the actors and their assignments, and CrewAI manages their interaction.
The core components of this framework are Agents, Tasks, and the Crew. An Agent is defined not just by its function but by a persona, including a specific role, a goal, and a backstory, which guides its behavior and communication style. A Task is a discrete unit of work with a clear description and expected output, assigned to a specific Agent. The Crew is the cohesive unit that contains the Agents and the list of Tasks, and it executes a predefined Process. This process dictates the workflow, which is typically either sequential, where the output of one task becomes the input for the next in line, or hierarchical, where a manager-like agent delegates tasks and coordinates the workflow among other agents.
When compared to other frameworks, CrewAI occupies a distinct position. It moves away from the low-level, explicit state management and control flow of LangGraph, where a developer wires together every node and conditional edge. Instead of building a state machine, the developer designs a team charter. While Googlés ADK provides a comprehensive, production-oriented platform for the entire agent lifecycle, CrewAI concentrates specifically on the logic of agent collaboration and for simulating a team of specialists.
@crew defcrew(self) -> Crew: """Creates the research crew""" return Crew( agents=self.agents, tasks=self.tasks, process=Process.sequential, verbose=True, )
This code sets up a sequential workflow for a team of AI agents, where they tackle a list of tasks in a specific order, with detailed logging enabled to monitor their progress.
Microsoft AutoGen: AutoGen is a framework centered on orchestrating multiple agents that solve tasks through conversation. Its architecture enables agents with distinct capabilities to interact, allowing for complex problem decomposition and collaborative resolution. The primary advantage of AutoGen is its flexible, conversation-driven approach that supports dynamic and complex multi-agent interactions. However, this conversational paradigm can lead to less predictable execution paths and may require sophisticated prompt engineering to ensure tasks converge efficiently.
Microsoft AutoGen:AutoGen是以协调多个智能体通过对话解决任务为核心的框架。其架构允许具有不同能力的智能体进行交互,从而实现复杂问题的分解和协作解决。AutoGen的主要优势在于其灵活的、对话驱动的方法,支持动态且复杂的多智能体交互。然而,这种对话模式可能会导致执行路径难以预测,并且可能需要复杂的提示工程来确保任务高效收敛。
LlamaIndex: LlamaIndex is fundamentally a data framework designed to connect large language models with external and private data sources. It excels at creating sophisticated data ingestion and retrieval pipelines, which are essential for building knowledgeable agents that can perform RAG. While its data indexing and querying capabilities are exceptionally powerful for creating context-aware agents, its native tools for complex agentic control flow and multi-agent orchestration are less developed compared to agent-first frameworks. LlamaIndex is optimal when the core technical challenge is data retrieval and synthesis.
Haystack: Haystack is an open-source framework engineered for building scalable and production-ready search systems powered by language models. Its architecture is composed of modular, interoperable nodes that form pipelines for document retrieval, question answering, and summarization. The main strength of Haystack is its focus on performance and scalability for large-scale information retrieval tasks, making it suitable for enterprise-grade applications. A potential trade-off is that its design, optimized for search pipelines, can be more rigid for implementing highly dynamic and creative agentic behaviors.
MetaGPT: MetaGPT implements a multi-agent system by assigning roles and tasks based on a predefined set of Standard Operating Procedures (SOPs). This framework structures agent collaboration to mimic a software development company, with agents taking on roles like product managers or engineers to complete complex tasks. This SOP-driven approach results in highly structured and coherent outputs, which is a significant advantage for specialized domains like code generation. The framework's primary limitation is its high degree of specialization, making it less adaptable for general-purpose agentic tasks outside of its core design.
SuperAGI: SuperAGI is an open-source framework designed to provide a complete lifecycle management system for autonomous agents. It includes features for agent provisioning, monitoring, and a graphical interface, aiming to enhance the reliability of agent execution. The key benefit is its focus on production-readiness, with built-in mechanisms to handle common failure modes like looping and to provide observability into agent performance. A potential drawback is that its comprehensive platform approach can introduce more complexity and overhead than a more lightweight, library-based framework.
Semantic Kernel: Developed by Microsoft, Semantic Kernel is an SDK that integrates large language models with conventional programming code through a system of "plugins" and "planners." It allows an LLM to invoke native functions and orchestrate workflows, effectively treating the model as a reasoning engine within a larger software application. Its primary strength is its seamless integration with existing enterprise codebases, particularly in .NET and Python environments. The conceptual overhead of its plugin and planner architecture can present a steeper learning curve compared to more straightforward agent frameworks.
Strands Agents: An AWS lightweight and flexible SDK that uses a model-driven approach for building and running AI agents. It is designed to be simple and scalable, supporting everything from basic conversational assistants to complex multi-agent autonomous systems. The framework is model-agnostic, offering broad support for various LLM providers, and includes native integration with the MCP for easy access to external tools. Its core advantage is its simplicity and flexibility, with a customizable agent loop that is easy to get started with. A potential trade-off is that its lightweight design means developers may need to build out more of the surrounding operational infrastructure, such as advanced monitoring or lifecycle management systems, which more comprehensive frameworks might provide out-of-the-box.
Strands Agents:一款轻量级且灵活的 AWS SDK,采用模型驱动方法构建和运行 AI 智能体。它设计简洁且可扩展,支持从基础对话助手到复杂的多智能体自主系统等各种应用。该框架与模型无关,广泛支持各种大语言模型 (LLM) 提供商,并与 MCP 原生集成,方便访问外部工具。其核心优势在于简洁性和灵活性,可自定义的智能体循环易于上手。潜在的不足之处在于,其轻量级设计意味着开发人员可能需要构建更多周边运维基础设施,例如高级监控或生命周期管理系统,而更全面的框架可能提供这些开箱即用的功能。
Conclusion | 结语
The landscape of agentic frameworks offers a diverse spectrum of tools, from low-level libraries for defining agent logic to high-level platforms for orchestrating multi-agent collaboration. At the foundational level, LangChain enables simple, linear workflows, while LangGraph introduces stateful, cyclical graphs for more complex reasoning. Higher-level frameworks like CrewAI and Google's ADK shift the focus to orchestrating teams of agents with predefined roles, while others like LlamaIndex specialize in data-intensive applications. This variety presents developers with a core trade-off between the granular control of graph-based systems and the streamlined development of more opinionated platforms. Consequently, selecting the right framework hinges on whether the application requires a simple sequence, a dynamic reasoning loop, or a managed team of specialists. Ultimately, this evolving ecosystem empowers developers to build increasingly sophisticated AI systems by choosing the precise level of abstraction their project demands.