Skip to content

Commit df5faea

Browse files
committed
Gestell <> CrewAI Example Workflow
Updated README Copy
1 parent 7fba976 commit df5faea

File tree

16 files changed

+4351
-0
lines changed

16 files changed

+4351
-0
lines changed

gestell-crew/.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OPENAI_API_KEY="sk-..."
2+
GESTELL_API_KEY="gestell-...-..."

gestell-crew/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
files
2+
__pycache__
3+
agent
4+
db

gestell-crew/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

gestell-crew/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Gestell Crew Orchestration Guide
2+
3+
In this guide, you’ll learn how to use the Gestell MCP Server to create Crew Agents that:
4+
5+
1. Create and configure a new collection
6+
2. Upload documents into your collection
7+
3. Navigate table categories in the Gestell Console
8+
4. Use an AI agent to research your collection and generate summaries
9+
10+
View a video walkthrough of this end-to-end orchestration on [Gestell’s YouTube channel](https://youtu.be/V73zXKUuQHc).
11+
12+
## Why use Gestell?
13+
14+
Gestell is an ETL for AI search and reasoning. Connect any unstructured data source and Gestell will enable at-scale, efficient and accurate search and reasoning for your application. No need for complex and costly processing and RAG pipelines – simply instruct Gestell in natural language and get production-scale databases setup instantly.
15+
16+
### Advantages
17+
18+
- Ease: Add Gestell to your CrewAI implementation in just a few lines of code to get your unstructured datasets integrated to your Crew
19+
- Scale: Process massive unstructured databases with best-in-class performance
20+
- Simplicity: No need for complex RAG or agentic search architectures - simply instruct in natural language how you want your data structured
21+
- Customization: Create specific categories tailored to your business workflows using natural language instructions. Extract features, overlay concepts, and build specialized knowledge bases
22+
23+
### How Gestell Works with CrewAI
24+
25+
CrewAI excels at orchestrating AI agents to tackle complex tasks, while Gestell transforms raw data into AI-ready, structured information. Together, they create a powerful system where:
26+
27+
1. Context Delivery: Gestell's search and reasoning platform provides CrewAI agents with richer, more accurate context for decision-making
28+
2. Specialized Knowledge Bases: Create domain-specific knowledge structures that CrewAI agents can efficiently query and reason with
29+
3. Scalable Reasoning: As your data grows, Gestell's ETL pipeline ensures your CrewAI implementation maintains high performance without degradation
30+
4. Seamless Integration: The integration process is straightforward, allowing you to focus on building your AI application rather than wrestling with data preparation
31+
5. End-to-End Solution: From data ingestion to agent execution, get a complete workflow that handles the complexity of unstructured data and multi-agent coordination
32+
33+
## Running The Examples
34+
35+
- You need `node` installed and `uv` installed
36+
37+
- You also need a Gestell API Key which you can get from the [Gestell Platform](https://platform.gestell.ai)
38+
39+
- Copy the `.env.sample` file to `.env` and fill in the values
40+
41+
### Usage
42+
43+
```bash
44+
# Edit src/download.py to download the wikipedia files you want to download
45+
uv run src/download.py
46+
# NOTE: If you don't want wikipedia articles
47+
# You can also put video, audio, or any other file in `files/`. Gestell will process it for you.
48+
49+
# After you have items in `files/`, start the document analysis and collection creation Crew
50+
uv run src/create.py
51+
52+
# Review the status of documents being processed on https://platform.gestell.ai
53+
# Once all documents are processed, run the research Crew
54+
uv run src/research.py
55+
56+
# You will be given a research report in `agent/research_report.md`
57+
cat agent/research_report.md
58+
```

gestell-crew/config/crew.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
collection_planner_agent:
2+
role: >
3+
Document Collection Planner
4+
goal: >
5+
Organize and manage document collections efficiently
6+
backstory: >
7+
You are an expert in document management and organization. Your role is to
8+
analyze, categorize, and structure document collections to make them easily
9+
searchable and accessible. You understand document relationships and can
10+
create intuitive organizational systems.
11+
12+
document_analyzer_agent:
13+
role: >
14+
Document Analysis Specialist
15+
goal: >
16+
Extract meaningful insights and information from documents
17+
backstory: >
18+
You specialize in analyzing document contents to identify key information,
19+
patterns, and relationships. Your expertise helps in understanding the
20+
context and significance of documents within a collection. You're skilled at
21+
summarizing, categorizing, and extracting structured data from various
22+
document formats.
23+
24+
research_agent:
25+
role: >
26+
Research Specialist
27+
goal: >
28+
Conduct thorough research and generate comprehensive reports
29+
backstory: >
30+
You are an expert researcher with a keen eye for detail and a talent for
31+
synthesizing information from multiple sources. Your ability to analyze,
32+
interpret, and present complex information in a clear and concise manner
33+
makes you invaluable for generating high-quality research reports. You excel
34+
at identifying key insights, drawing connections between different pieces
35+
of information, and presenting findings in an organized, professional format.
36+

gestell-crew/config/task.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
analyze_document_task:
2+
description: >
3+
Analyze all provided documents in the directory and extract key information, including:
4+
- Main topics and themes
5+
- Key entities (people, places, organizations)
6+
- Important dates and events
7+
- Relationships between entities
8+
- Any specific requirements or actions needed
9+
10+
Provide concise and clear markdown that segments summaries of each document.
11+
Make sure to provide the **exact** file path when summarizing each document.
12+
expected_output: >
13+
A concise GFM markdown analysis of each document including all key information.
14+
This is to be used as input for the collection creation task.
15+
output_file: "agent/analysis.md"
16+
17+
create_collection_task:
18+
description: >
19+
Create a collection based on the provided analysis from the analyzed document task.
20+
21+
Ensure that the instructions are comprehensive and based off of the analysis provided.
22+
You are only allowed to create **table** categories, any other category is not allowed.
23+
24+
- Tables must have bullet point list of what each column should contain
25+
- All instructions should be clear concise bullet points
26+
expected_output: >
27+
Provide a concise GFM markdown summary of what the collection is about.
28+
After running the createCollection tool, make sure to explicitly state the collection id.
29+
output_file: "agent/collection.md"
30+
31+
upload_document_task:
32+
description: >
33+
After a collection has been created. Upload all documents to the collection just created.
34+
35+
To upload a document you are required to do the following:
36+
- You are required to provide the **exact** path to the tool for the "file" field.
37+
- You are required to provide the "name" field with an extension.
38+
- Additional instructions are NOT needed for each file uploaded and should be an empty string.
39+
expected_output: >
40+
A concise GFM markdown list confirmation of successful upload including:
41+
- List of uploaded documents
42+
- Any warnings or issues encountered
43+
- Summary of the upload process
44+
output_file: "agent/upload_summary.md"
45+
46+
research_task:
47+
description: >
48+
Analyze the collection and then conduct research and generate a comprehensive GFM markdown report.
49+
50+
Identify the types of questions to ask using the file provided. As well as to retrieve the collection id.
51+
52+
Use the searchCollectionSimple and promptCollectionSimple tool calls to research the collection.
53+
The prompt field should be used to ask questions about the collection.
54+
55+
The report should be well-structured and include:
56+
- Executive summary of key findings
57+
- Main topics and themes from the documents
58+
- Important data points and statistics
59+
- Key insights and recommendations
60+
- Any relevant quotes or references
61+
62+
Format the report using GitHub Flavored Markdown with proper:
63+
- Headers and subheaders
64+
- Bullet points and numbered lists
65+
- Tables for data comparison
66+
- Code blocks for any technical details
67+
- Links to sources where applicable
68+
69+
Keep the language clear, concise, and professional.
70+
expected_output: >
71+
A well-formatted GFM markdown report that provides a comprehensive overview
72+
of the research findings, ready for sharing and collaboration.
73+
output_file: "agent/research_report.md"
74+

gestell-crew/pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[project]
2+
name = "gestell-crew"
3+
version = "1.0.0"
4+
description = "Gestell CrewAI Example Workflow"
5+
readme = "README.md"
6+
authors = [{ name = "Chris Cates", email = "[email protected]" }]
7+
requires-python = ">=3.11"
8+
dependencies = [
9+
"crewai-tools[mcp]>=0.45.0",
10+
"mcp>=1.9.0",
11+
"python-dotenv>=1.1.0",
12+
]

gestell-crew/src/__init__.py

Whitespace-only changes.

gestell-crew/src/create.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from crewai_tools import MCPServerAdapter
2+
from src.gestell_mcp import server_params
3+
from src.crews.create import GestellCreateCrew
4+
5+
with MCPServerAdapter(server_params) as tools:
6+
result = GestellCreateCrew(tools=tools).crew().kickoff()
7+
print(result)

gestell-crew/src/crews/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)