← cookbook/crewai-instadash
5 min read·intermediate·updated just now

CrewAI + Instadash — typed crew output, persistent surface

A two-agent CrewAI workflow that produces validated, typed rows via output_pydantic and pushes them to Instadash in a single HTTP call.

#crewai#python#agent#pydantic

What it builds

  • Researcher + Analyst agents in a sequential crew
  • Output constrained to a Pydantic CompetitorList model
  • One HTTP push lands the validated rows in a grid
  • Optional action column lets a human drive the next step

The key step

class Competitor(BaseModel):
    company: str
    url:     str
    pricing: str
    summary: str
 
class CompetitorList(BaseModel):
    competitors: List[Competitor]
 
analyse_task = Task(
    description="Validate pricing + summary for each row.",
    agent=analyst,
    context=[research_task],
    output_pydantic=CompetitorList,   # ← typed contract
)
 
result = crew.kickoff(inputs={"category": "agent infrastructure"})
push_to_instadash([c.model_dump() for c in result.pydantic.competitors])
note
This is the core of the recipe. The full file (including setup, error handling, and the surrounding scaffolding) lives in the GitHub folder linked below — clone or copy it directly.

Run it

bash⎘ copy
git clone https://github.com/instadashio/instadash-recipes
cd instadash-recipes/crewai-instadash
pip install -r requirements.txt
cp .env.example .env       # fill in your keys
python crew.py

Stack

crewaipythonpydantic
Full source on GitHub

README, runnable code, .env.example, dependencies — all in one folder.

↗ view on github
─ related recipesview all →