Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc9053fa1d |
@@ -52,18 +52,6 @@ def publish_skill(review_result, config):
|
|||||||
subprocess.run(["git", "config", "user.email", "hermes@agent.local"], cwd=repo_dir)
|
subprocess.run(["git", "config", "user.email", "hermes@agent.local"], cwd=repo_dir)
|
||||||
subprocess.run(["git", "config", "user.name", "Hermes Pipeline"], cwd=repo_dir)
|
subprocess.run(["git", "config", "user.name", "Hermes Pipeline"], cwd=repo_dir)
|
||||||
|
|
||||||
# Check for duplicates in skills/ directory
|
|
||||||
skills_dir = os.path.join(repo_dir, "skills")
|
|
||||||
existing_skills = []
|
|
||||||
if os.path.isdir(skills_dir):
|
|
||||||
existing_skills = [d for d in os.listdir(skills_dir) if os.path.isdir(os.path.join(skills_dir, d))]
|
|
||||||
|
|
||||||
if skill_name in existing_skills:
|
|
||||||
return {
|
|
||||||
"status": "SKIP",
|
|
||||||
"reason": f"Skill '{skill_name}' already exists in skills/ directory",
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create skill directory
|
# Create skill directory
|
||||||
skill_dir = os.path.join(repo_dir, "skills", skill_name)
|
skill_dir = os.path.join(repo_dir, "skills", skill_name)
|
||||||
os.makedirs(skill_dir, exist_ok=True)
|
os.makedirs(skill_dir, exist_ok=True)
|
||||||
|
|||||||
@@ -137,8 +137,6 @@ def main():
|
|||||||
if publish_output.get("status") == "PUBLISHED":
|
if publish_output.get("status") == "PUBLISHED":
|
||||||
print(f" ✓ Published! PR: {publish_output.get('pr_url', '')}")
|
print(f" ✓ Published! PR: {publish_output.get('pr_url', '')}")
|
||||||
results["published"] += 1
|
results["published"] += 1
|
||||||
elif publish_output.get("status") == "SKIP":
|
|
||||||
print(f" ⏸ Skipped: {publish_output.get('reason', '')}")
|
|
||||||
else:
|
else:
|
||||||
print(f" ! {publish_output.get('status', '?')}: {publish_output.get('message', publish_output.get('error', ''))[:100]}")
|
print(f" ! {publish_output.get('status', '?')}: {publish_output.get('message', publish_output.get('error', ''))[:100]}")
|
||||||
|
|
||||||
|
|||||||
@@ -1,83 +0,0 @@
|
|||||||
---
|
|
||||||
name: langgraph-workflow-creation
|
|
||||||
version: 1.0.0
|
|
||||||
description: Create a LangGraph workflow to gather facts using SerperDevTool and process
|
|
||||||
them with an AI agent.
|
|
||||||
inputs:
|
|
||||||
- API Key for SerperDevTool
|
|
||||||
- Search Query
|
|
||||||
steps:
|
|
||||||
- 'Step 1: Import necessary modules from langgraph and langchain libraries'
|
|
||||||
- 'Step 2: Create a LangGraph agent using `langgraph.create_react_agent` function
|
|
||||||
with SerperDevTool as the tool node'
|
|
||||||
- 'Step 3: Define the search query and pass it to the agent for fact gathering'
|
|
||||||
- 'Step 4: Process the gathered facts within the AI agent'
|
|
||||||
outputs:
|
|
||||||
- Processed Facts
|
|
||||||
tags: []
|
|
||||||
metadata:
|
|
||||||
source_repo: https://github.com/jkmaina/LangGraphProjects.git
|
|
||||||
extracted_at: ''
|
|
||||||
confidence: 0.95
|
|
||||||
---
|
|
||||||
|
|
||||||
# langgraph-workflow-creation
|
|
||||||
|
|
||||||
Create a LangGraph workflow to gather facts using SerperDevTool and process them with an AI agent.
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
**Dependencies:**
|
|
||||||
|
|
||||||
```text
|
|
||||||
pip install langchain serperdev
|
|
||||||
```
|
|
||||||
|
|
||||||
**Setup steps:**
|
|
||||||
|
|
||||||
1. Install required libraries: pip install langchain serperdev
|
|
||||||
1. Add API key to .env file: OPENAPI_API_KEY=your_api_key
|
|
||||||
|
|
||||||
## Key Files
|
|
||||||
|
|
||||||
- `agent.py - Contains the LangGraph agent creation logic`
|
|
||||||
- `tool_node.py - Defines the SerperDevTool node`
|
|
||||||
|
|
||||||
## Steps
|
|
||||||
|
|
||||||
1. Step 1: Import necessary modules from langgraph and langchain libraries
|
|
||||||
2. Step 2: Create a LangGraph agent using `langgraph.create_react_agent` function with SerperDevTool as the tool node
|
|
||||||
3. Step 3: Define the search query and pass it to the agent for fact gathering
|
|
||||||
4. Step 4: Process the gathered facts within the AI agent
|
|
||||||
|
|
||||||
## Implementation Details
|
|
||||||
|
|
||||||
```python
|
|
||||||
import langgraph
|
|
||||||
from serperdev import SerperDevTool
|
|
||||||
|
|
||||||
def create_agent(api_key, query):
|
|
||||||
tool = SerperDevTool(api_key)
|
|
||||||
agent = langgraph.create_react_agent(tool=tool)
|
|
||||||
facts = agent.run(query)
|
|
||||||
return process_facts(facts)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Inputs
|
|
||||||
|
|
||||||
- API Key for SerperDevTool
|
|
||||||
- Search Query
|
|
||||||
|
|
||||||
## Outputs
|
|
||||||
|
|
||||||
- Processed Facts
|
|
||||||
|
|
||||||
## Failure Modes
|
|
||||||
|
|
||||||
- API Key not provided
|
|
||||||
- Invalid Search Query
|
|
||||||
|
|
||||||
## Source
|
|
||||||
|
|
||||||
Extracted from: [https://github.com/jkmaina/LangGraphProjects.git](https://github.com/jkmaina/LangGraphProjects.git)
|
|
||||||
Confidence: 0.95
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Commands: langgraph-workflow-creation
|
|
||||||
|
|
||||||
## Available Commands
|
|
||||||
|
|
||||||
- `/skill langgraph-workflow-creation` — Load this skill
|
|
||||||
- `/run langgraph-workflow-creation` — Execute workflow
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# Examples: langgraph-workflow-creation
|
|
||||||
|
|
||||||
## Usage Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
# How to use this skill
|
|
||||||
# Inputs: API Key for SerperDevTool, Search Query
|
|
||||||
# Process: Step 1: Import necessary modules from langgraph and langchain libraries → Step 2: Create a LangGraph agent using `langgraph.create_react_agent` function with SerperDevTool as the tool node → Step 3: Define the search query and pass it to the agent for fact gathering
|
|
||||||
# Outputs: Processed Facts
|
|
||||||
```
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "langgraph-workflow-creation",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"goal": "Create a LangGraph workflow to gather facts using SerperDevTool and process them with an AI agent.",
|
|
||||||
"inputs": [
|
|
||||||
"API Key for SerperDevTool",
|
|
||||||
"Search Query"
|
|
||||||
],
|
|
||||||
"steps": [
|
|
||||||
"Step 1: Import necessary modules from langgraph and langchain libraries",
|
|
||||||
"Step 2: Create a LangGraph agent using `langgraph.create_react_agent` function with SerperDevTool as the tool node",
|
|
||||||
"Step 3: Define the search query and pass it to the agent for fact gathering",
|
|
||||||
"Step 4: Process the gathered facts within the AI agent"
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
"Processed Facts"
|
|
||||||
],
|
|
||||||
"failure_modes": [
|
|
||||||
"API Key not provided",
|
|
||||||
"Invalid Search Query"
|
|
||||||
],
|
|
||||||
"confidence": 0.95,
|
|
||||||
"explanation": "This workflow is specific to fact gathering and can be adapted for different search queries or tools.",
|
|
||||||
"source_repo": "https://github.com/jkmaina/LangGraphProjects.git",
|
|
||||||
"score": 1.0
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Tests: langgraph-workflow-creation
|
|
||||||
|
|
||||||
## Test Checklist
|
|
||||||
|
|
||||||
- [ ] Workflow has at least 3 steps
|
|
||||||
- [ ] All inputs are defined
|
|
||||||
- [ ] All outputs are defined
|
|
||||||
- [ ] Failure modes are documented
|
|
||||||
- [ ] Skill can be loaded without errors
|
|
||||||
@@ -9,10 +9,10 @@ steps:
|
|||||||
- 'Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel
|
- 'Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel
|
||||||
to gather raw facts about the destination.'
|
to gather raw facts about the destination.'
|
||||||
- 'Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into
|
- 'Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into
|
||||||
a structured travel guide based on the user''s request and raw information provided
|
a structured travel guide based on the user''s request and the raw information provided
|
||||||
by the researcher.'
|
by the researcher.'
|
||||||
- 'Step 3: Writer agent (agent.py) formats the final response, including the structured
|
- 'Step 3: Writer agent (agent.py) formats the final response, including the structured
|
||||||
guide content and prominently features the ''Suggested Web Pages'' section.'
|
travel guide content and prominently featuring the ''Suggested Web Pages'' section.'
|
||||||
outputs:
|
outputs:
|
||||||
- Structured travel guide with key sections
|
- Structured travel guide with key sections
|
||||||
- Final client response
|
- Final client response
|
||||||
@@ -32,24 +32,23 @@ Gather and process information from multiple agents to generate a comprehensive
|
|||||||
**Dependencies:**
|
**Dependencies:**
|
||||||
|
|
||||||
```text
|
```text
|
||||||
pip install python3 fastapi uvicorn strands bedrock-model
|
pip install python langchain strands
|
||||||
```
|
```
|
||||||
|
|
||||||
**Setup steps:**
|
**Setup steps:**
|
||||||
|
|
||||||
1. Install required dependencies using pip
|
1. Install required dependencies using pip and ensure the BedrockModel is properly configured.
|
||||||
1. Set up environment variables for API keys and model IDs
|
|
||||||
|
|
||||||
## Key Files
|
## Key Files
|
||||||
|
|
||||||
- `agents/aws_strands/05-agent-strands-multiagent-workflow-sequential/agent.py - Contains the multi-agent workflow logic.`
|
- `agents/aws_strands/05-agent-strands-multiagent-workflow-sequential/agent.py - Contains the sequential workflow logic for gathering and processing information.`
|
||||||
- `agents/aws_strands/05-agent-strands-multiagent-workflow-sequential/app.py - FastAPI app to handle user queries.`
|
- `agents/aws_strands/05-agent-strands-multiagent-workflow-sequential/app.py - Provides a FastAPI endpoint to interact with the multi-agent system.`
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
1. Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel to gather raw facts about the destination.
|
1. Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel to gather raw facts about the destination.
|
||||||
2. Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into a structured travel guide based on the user's request and raw information provided by the researcher.
|
2. Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into a structured travel guide based on the user's request and the raw information provided by the researcher.
|
||||||
3. Step 3: Writer agent (agent.py) formats the final response, including the structured guide content and prominently features the 'Suggested Web Pages' section.
|
3. Step 3: Writer agent (agent.py) formats the final response, including the structured travel guide content and prominently featuring the 'Suggested Web Pages' section.
|
||||||
|
|
||||||
## Implementation Details
|
## Implementation Details
|
||||||
|
|
||||||
@@ -76,7 +75,7 @@ final_response = writer_agent(writer_prompt, stream=False)
|
|||||||
|
|
||||||
## Failure Modes
|
## Failure Modes
|
||||||
|
|
||||||
- Network issues during API calls could lead to incomplete data collection or processing failures
|
- Specific failure scenario with mitigation: If any of the agents fail to process their tasks (e.g., network issues, model errors), the workflow will fail. Mitigation involves robust error handling and fallback mechanisms.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
```python
|
```python
|
||||||
# How to use this skill
|
# How to use this skill
|
||||||
# Inputs: User query with location
|
# Inputs: User query with location
|
||||||
# Process: Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel to gather raw facts about the destination. → Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into a structured travel guide based on the user's request and raw information provided by the researcher. → Step 3: Writer agent (agent.py) formats the final response, including the structured guide content and prominently features the 'Suggested Web Pages' section.
|
# Process: Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel to gather raw facts about the destination. → Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into a structured travel guide based on the user's request and the raw information provided by the researcher. → Step 3: Writer agent (agent.py) formats the final response, including the structured travel guide content and prominently featuring the 'Suggested Web Pages' section.
|
||||||
# Outputs: Structured travel guide with key sections, Final client response
|
# Outputs: Structured travel guide with key sections, Final client response
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -7,18 +7,18 @@
|
|||||||
],
|
],
|
||||||
"steps": [
|
"steps": [
|
||||||
"Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel to gather raw facts about the destination.",
|
"Step 1: Researcher agent (agent.py) uses LangGraph create_react_agent with BedrockModel to gather raw facts about the destination.",
|
||||||
"Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into a structured travel guide based on the user's request and raw information provided by the researcher.",
|
"Step 2: Travel Guide Generator agent (agent.py) synthesizes the gathered data into a structured travel guide based on the user's request and the raw information provided by the researcher.",
|
||||||
"Step 3: Writer agent (agent.py) formats the final response, including the structured guide content and prominently features the 'Suggested Web Pages' section."
|
"Step 3: Writer agent (agent.py) formats the final response, including the structured travel guide content and prominently featuring the 'Suggested Web Pages' section."
|
||||||
],
|
],
|
||||||
"outputs": [
|
"outputs": [
|
||||||
"Structured travel guide with key sections",
|
"Structured travel guide with key sections",
|
||||||
"Final client response"
|
"Final client response"
|
||||||
],
|
],
|
||||||
"failure_modes": [
|
"failure_modes": [
|
||||||
"Network issues during API calls could lead to incomplete data collection or processing failures"
|
"Specific failure scenario with mitigation: If any of the agents fail to process their tasks (e.g., network issues, model errors), the workflow will fail. Mitigation involves robust error handling and fallback mechanisms."
|
||||||
],
|
],
|
||||||
"confidence": 0.95,
|
"confidence": 0.95,
|
||||||
"explanation": "This workflow is specific but can be adapted for other types of guides or information gathering tasks.",
|
"explanation": "This workflow is specific to generating travel guides but can be adapted for other types of structured content creation.",
|
||||||
"source_repo": "https://github.com/omerbsezer/Fast-LLM-Agent-MCP.git",
|
"source_repo": "https://github.com/omerbsezer/Fast-LLM-Agent-MCP.git",
|
||||||
"score": 1.0
|
"score": 1.0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user