计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
ai-llm-agentic-tooling-langchain-langgraph【效率与协作】Integrates LangChain/LangGraph for building LLM-powered agents and applications in Python, facilitating advanced logic and workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: ai-llm-agentic-tooling-langchain-langgraph description: Integrates LangChain/LangGraph for building LLM-powered agents and applications in Python, facilitating advanced logic and workflows. license: MIT compatibility: opencode metadata: version: "1.0.0" domain: coding triggers: langchain, langgraph, llm integration, agent, workflows, python archetypes:
Integrates LangChain and LangGraph to facilitate the development of LLM-powered agents and applications. This skill focuses on building advanced logic and workflows using these frameworks in Python.
Use this skill when:
This skill offers an integration guide for LangChain and LangGraph, enabling the development of LLM-powered agents in Python. It facilitates various advanced logic and workflows through examples and best practices.
This example demonstrates how to define a basic LangChain agent:
from langchain import LLMChain, PromptTemplate
# Define a simple LLM chain
prompt = PromptTemplate(input_variables=['input'], template="""You are a helpful assistant. Assist with: {input}.
""")
agent = LLMChain(prompt=prompt)
This section illustrates how to use LangGraph to define tasks:
from langgraph import Executor, Task
@Task
def fetch_data():
return {'data_key': 'value'}
@Task
def process_data(data):
return data['data_key'] + ' processed'
executor = Executor(tasks=[fetch_data, process_data])
executor.run()
Include retries and error logging in your agents. Use state management techniques to preserve data between tasks.
archetypes: tactical
anti_triggers:
- vague conversation
- overly generic request
response_profile:
verbosity: medium
directive_strength: high
abstraction_level: operational
from langchain import LLMChain, PromptTemplate
# Define a simple LLM chain
prompt = PromptTemplate(input_variables=['input'], template="""You are a helpful assistant. Assist with: {input}.
""")
agent = LLMChain(prompt=prompt)
from langgraph import Executor, Task
# Define tasks and executor
@Task
def fetch_data():
return {'data_key': 'value'}
@Task
def process_data(data):
return data['data_key'] + ' processed'
executor = Executor(tasks=[fetch_data, process_data])
executor.run()