🤖 CrewAI Integration

How to Publish Podcasts with CrewAI Podcast Hosting API

CrewAI's multi-agent framework pairs perfectly with PodClaw. Assign a researcher agent to find content, a writer agent to draft scripts, and a publisher agent to post episodes — all automated, all API-driven.

Prerequisites

Make sure you have these in place before starting:

pip install crewai crewai-tools requests

Quick Start

The example below defines two PodClaw tools using CrewAI's @tool decorator, creates a producer agent and a publisher agent, assigns each a task, and runs them sequentially in a crew.

python — crewai_podclaw.py
import requests from crewai import Agent, Task, Crew, Process from crewai.tools import tool PODCLAW_API_KEY = "pc_your_api_key_here" @tool("PodClaw Publisher") def publish_podcast_episode(show_id: str, title: str, audio_url: str, description: str) -> str: """Publishes a podcast episode to Apple Podcasts, Spotify, and 20+ platforms via PodClaw.""" response = requests.post( f"https://podclaw.io/api/shows/{show_id}/episodes", headers={"Authorization": f"Bearer {PODCLAW_API_KEY}"}, json={ "title": title, "description": description, "audio_url": audio_url, "status": "published" } ) data = response.json() if data.get("success"): return f"Episode published! Episode ID: {data['episode']['id']}, GUID: {data['episode']['guid']}" return f"Error: {data.get('error', 'Unknown error')}" @tool("PodClaw Show Creator") def create_podcast_show(title: str, description: str, author: str = "AI Podcast Bot") -> str: """Creates a new podcast show on PodClaw and returns the show ID.""" response = requests.post( "https://podclaw.io/api/shows", headers={"Authorization": f"Bearer {PODCLAW_API_KEY}"}, json={"title": title, "description": description, "author": author} ) data = response.json() if data.get("success"): return f"Show created! Show ID: {data['show']['id']}" return f"Error: {data.get('error', 'Unknown error')}" # Define agents producer = Agent( role="Podcast Producer", goal="Create and manage podcast shows on PodClaw", backstory="Expert podcast producer who creates compelling podcast series using AI tools", tools=[create_podcast_show], verbose=True ) publisher = Agent( role="Episode Publisher", goal="Publish podcast episodes to all major platforms", backstory="Technical publishing expert who ensures episodes reach Apple Podcasts, Spotify, and 20+ platforms", tools=[publish_podcast_episode], verbose=True ) # Define tasks create_show_task = Task( description="Create a new podcast show called 'Tech Trends Weekly' about weekly technology news for developers", agent=producer, expected_output="Show created with ID returned" ) publish_task = Task( description="Using the show ID from the previous task, publish an episode titled 'The Rise of Agentic AI' with audio from https://example.com/ep1.mp3 and a 2-sentence description about AI agents taking over software development", agent=publisher, expected_output="Episode published successfully with episode ID" ) # Run the crew crew = Crew( agents=[producer, publisher], tasks=[create_show_task, publish_task], process=Process.sequential, verbose=True ) result = crew.kickoff() print(result)

Multi-agent podcast production

The real power of combining CrewAI with PodClaw is the ability to build fully automated end-to-end podcast pipelines. A typical production crew looks like this:

Agent 1
Researcher
Searches the web, pulls RSS feeds, and identifies the week's most relevant stories using search tools.
Agent 2
Writer
Takes the research and drafts a podcast script, episode title, and show notes in the brand's voice.
Agent 3
Publisher
Calls a TTS API to generate audio, uploads it to cloud storage, then publishes via PodClaw.

Each agent only has access to the tools it needs. The researcher never touches PodClaw. The publisher never browses the web. CrewAI's sequential process passes context between tasks automatically, so the publisher always has the show ID and script from the upstream agents.

Tip: For the audio generation step, add an ElevenLabs or OpenAI TTS tool to the writer agent's toolset. Generate the audio, upload to S3 or Cloudflare R2, and pass the URL to the publisher agent's task.

Frequently Asked Questions

Can CrewAI publish podcasts automatically?

Yes. CrewAI agents can publish podcasts automatically using the PodClaw REST API as a CrewAI tool. Define a tool function with the @tool decorator, pass it to the relevant agent, and any agent in the crew can call it to publish episodes to Apple Podcasts, Spotify, and 20+ platforms without any manual steps.

How do I add PodClaw to a CrewAI agent?

Define a Python function decorated with @tool from crewai.tools that makes an HTTP POST request to the PodClaw API, then pass that function in the tools list when instantiating your CrewAI Agent. The agent will automatically decide when and how to call it based on the tool's docstring description and the task it has been assigned.

Does PodClaw support multi-agent podcast workflows?

Yes. PodClaw's REST API is stateless and supports concurrent calls, making it ideal for multi-agent workflows. Different CrewAI agents can handle research, script writing, and publishing as separate sequential or parallel tasks, with each agent calling PodClaw at the appropriate step in the pipeline.

Build your podcast production crew

Get your free PodClaw API key and start automating podcast publishing with CrewAI today.

Get Started Free →